From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16449 invoked by alias); 31 Mar 2006 13:35:31 -0000 Received: (qmail 16434 invoked by uid 48); 31 Mar 2006 13:35:25 -0000 Date: Fri, 31 Mar 2006 13:35:00 -0000 Message-ID: <20060331133525.16433.qmail@sourceware.org> From: "guanglei at cn dot ibm 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-q1/txt/msg00909.txt.bz2 ------- Additional Comments From guanglei at cn dot ibm dot com 2006-03-31 13:35 ------- (In reply to comment #2) > When I use backtrace(), I usually run stap with -DMAXSTRINGLEN=256. This seems > to cover back traces on PPC64 very well. As for changing the default, why would > the default of MAXSTRINGLEN=128 need to change if can be tune this way? It seems not a good idea to simplily increase MAXSTRINGLEN, which will cause a lot of unecessary additional memory consumption. MAXSTRINGLEN =128 is ok. But I think we should slightly change the translator: -bash-3.00# diff -uprN translate.cxx.ori translate.cxx --- translate.cxx.ori 2006-03-31 13:26:20.000000000 -0500 +++ translate.cxx 2006-03-31 13:21:29.000000000 -0500 @@ -3774,7 +3774,9 @@ translate_pass (systemtap_session& s) s.op->newline() << "#endif"; // impedance mismatch + s.op->newline() << "#ifndef STP_STRING_SIZE"; s.op->newline() << "#define STP_STRING_SIZE MAXSTRINGLEN"; + s.op->newline() << "#endif"; s.op->newline() << "#define STP_NUM_STRINGS 1"; if (s.bulk_mode) Increasing STP_STRING_SIZE by -D will cause the size of "struct string" defined in runtime/string.h to increase, while keep the size of other types of strings unchanged. So now if I want to print backtrace or want some large _stp_string inside my codes, I can: stap -D STP_STRING_SIZE=2048 ... I tested it and it worked well for me. -- 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.