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: [Bug runtime/2497] STP_STRING_SIZE set by stap is too small


On Tue, 2006-04-04 at 02:08 +0000, guij at cn dot ibm dot com wrote:

> I think _lket_trace() is more like:
> bin_write("%n%1b%4b%1b%ld%4b%4b%s",this_event_len(), cmd->device->sdev_state,
> [...], _stp_string_ptr(str))
> The total length of the trace record (including backtrace string) is to be
> calculated and filled by bin_write(), thus only #2 can work.

OK, I see the problem.  It seems the simplest thing is to just do what
you proposed and either increase STP_STRING_SIZE or make it definable on
the command line, or both The only remaining use of STP_STRING_SIZE is
for strings used while doing stack traces, so it seems like a good idea
to set it higher by default, because the current default is not useful.
Maybe 512 or 1024?  You can check in the change, or I will if you
prefer.

By the way, in the above example, what is the purpose of
this_event_len()?  It seems that you have defined "%n" to write the
length of the finished string to that location, but why does that need
an argument?

Martin




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