From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23033 invoked by alias); 4 Apr 2006 19:31:30 -0000 Received: (qmail 23016 invoked by alias); 4 Apr 2006 19:31:28 -0000 Date: Tue, 04 Apr 2006 19:31:00 -0000 Message-ID: <20060404193128.23015.qmail@sourceware.org> From: "hunt at redhat dot com" To: systemtap@sources.redhat.com In-Reply-To: <20060330093952.2497.guanglei@cn.ibm.com> References: <20060330093952.2497.guanglei@cn.ibm.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug runtime/2497] STP_STRING_SIZE set by stap is too small X-Bugzilla-Reason: AssignedTo Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2006-q2/txt/msg00032.txt.bz2 ------- 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.