From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5638 invoked by alias); 7 Jan 2009 20:36:35 -0000 Received: (qmail 5631 invoked by uid 22791); 7 Jan 2009 20:36:34 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-gx0-f16.google.com (HELO mail-gx0-f16.google.com) (209.85.217.16) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Jan 2009 20:36:25 +0000 Received: by gxk9 with SMTP id 9so605819gxk.0 for ; Wed, 07 Jan 2009 12:36:23 -0800 (PST) Received: by 10.151.111.15 with SMTP id o15mr509590ybm.15.1231360583174; Wed, 07 Jan 2009 12:36:23 -0800 (PST) Received: by 10.151.118.18 with HTTP; Wed, 7 Jan 2009 12:36:23 -0800 (PST) Message-ID: <8fb5fa2d0901071236s6f00a2c4t49647ca61680ee19@mail.gmail.com> Date: Wed, 07 Jan 2009 20:36:00 -0000 From: "Buddy Lumpkin" To: systemtap@sourceware.org Subject: Debug code enabled on Systemtap verison: 0.8? MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2009-q1/txt/msg00052.txt.bz2 I have a guru mode script that uses a combination of the systemtap language and inline C. Upon upgrading to systemtap 0.8, I noticed an extra message being printed from my scripts output. I assume it is extra debugging of the code interpreter? This is the extra line that is printed: node_addr=0x0 There is a global variable called node_addr in my script. A small adjustment to some code made the message go away: this causes the message to occur: if ((node_addr = node_addr(node_id + 1))) { node_id++; pg_index = 0; mem_map = node_mem_map(node_id); present_pages = node_present_pages(node_id); } Written this way, it goes away: node_addr = node_addr(node_id + 1); if (node_addr) { node_id++; pg_index = 0; mem_map = node_mem_map(node_id); present_pages = node_present_pages(node_id); } Here is what appears to be the relevant portion of a unified diff of the code that is produced: @@ -3696,26 +3701,24 @@ global.s_pages_scanned; }); - (void) - ({ - l->__tmp80 = - ({ - l->__tmp82 = ((global.s_node_id) + (((int64_t)1LL))); - c->locals[c->nesting+1].function_node_addr.node_idx = l->__tmp82; - function_node_addr (c); - if (unlikely(c->last_error)) goto out; - c->locals[c->nesting+1].function_node_addr.__retvalue; - }); - global.s_node_addr = l->__tmp80; - l->__tmp80; - }); - - c->actionremaining -= 3; + c->actionremaining -= 2; if (unlikely (c->actionremaining <= 0)) { c->last_error = "MAXACTION exceeded"; goto out; } - if (global.s_node_addr) { + if ( + ({ + l->__tmp80 = + ({ + l->__tmp82 = ((global.s_node_id) + (((int64_t)1LL))); + c->locals[c->nesting+1].function_node_addr.node_idx = l->__tmp82; + function_node_addr (c); + if (unlikely(c->last_error)) goto out; + c->locals[c->nesting+1].function_node_addr.__retvalue; + }); + global.s_node_addr = l->__tmp80; + l->__tmp80; + })) { { (void) ({ @@ -3949,6 +3952,36 @@ } +#ifdef STP_TIMING +static __cacheline_aligned Stat time_probe_1405; +#endif + +static void probe_1406 (struct context * __restrict__ c) { + struct probe_1406_locals * __restrict__ l = + & c->locals[0].probe_1406; + (void) l; + #ifdef STP_TIMING + c->statp = & time_probe_1405; + #endif + { + (void) + ({ + l->__tmp0 = global.s_node_addr; + _stp_printf ("node_addr=%#llx\n", l->__tmp0); + ((int64_t)0LL); + }); + + } + c->actionremaining -= 1; + if (unlikely (c->actionremaining <= 0)) { + c->last_error = "MAXACTION exceeded"; + goto out; + } +out: + _stp_print_flush(); +} + + /* ---- begin/end probes ---- */ void enter_begin_probe (void (*fn)(struct context*), const char* pp) { struct context* __restrict__ c; @@ -4161,6 +4194,7 @@ } stap_be_probes[] = { { .pp="begin", .ph=&probe_1402, .type=0 }, { .pp="end", .ph=&probe_1404, .type=1 }, + { .pp="end", .ph=&probe_1406, .type=1 }, };