This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Problem Opening a FILE


Hi Khushboo,

It's hard for anyone to help when we can't see what you've written, so it would be very helpful if you could post your script.  If you're worried about it your work being confidential to Intel, then maybe you can send it to me and I'll try to help you off-list.

Goel, Khushboo wrote:
> I am not printing any information on screen, The purpose of
> introducing the FILE is because I am getting overflow of buffer.

It's probably not appropriate to use aggregates as a buffer.  There's already a lot of buffering in the print mechanisms, so you're just duplicating effort.

On the other hand, you may want to keep it in an array if you're doing some in-kernel processing.  Make sure to use "delete ARRAY[INDEX]" when you're done with a chunk of data, so new indexes can use hash slots.

Help us understand the purpose of your buffer, and we can figure out what will work best for you.

> Using -o FILE won't help me, as I am not printing anything on screen
> during runtime. Infact when I use -FILE I am not able to run for 1
> second also.

I think the point is that you could just print() or printf("%b") any data you want to save, and with "-o FILE" it will be "printed" to the FILE instead of the screen.  Your prints are then very similar to fprintf(fp, ...).

Josh


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]