This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug runtime/2497] STP_STRING_SIZE set by stap is too small
- From: "hunt at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 4 Apr 2006 19:31:28 -0000
- Subject: [Bug runtime/2497] STP_STRING_SIZE set by stap is too small
- References: <20060330093952.2497.guanglei@cn.ibm.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From hunt at redhat dot com 2006-04-04 19:31 -------
Subject: Re: 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
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2497
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.