From: "Buddy Lumpkin" <buddy.lumpkin@gmail.com>
To: systemtap@sourceware.org
Subject: Debug code enabled on Systemtap verison: 0.8?
Date: Wed, 07 Jan 2009 20:36:00 -0000 [thread overview]
Message-ID: <8fb5fa2d0901071236s6f00a2c4t49647ca61680ee19@mail.gmail.com> (raw)
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 },
};
next reply other threads:[~2009-01-07 20:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-07 20:36 Buddy Lumpkin [this message]
2009-01-07 20:48 ` Buddy Lumpkin
2009-01-07 21:22 ` Stone, Joshua I
2009-01-07 21:40 ` Frank Ch. Eigler
2009-01-07 23:54 ` Buddy Lumpkin
2009-01-08 0:01 ` Frank Ch. Eigler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8fb5fa2d0901071236s6f00a2c4t49647ca61680ee19@mail.gmail.com \
--to=buddy.lumpkin@gmail.com \
--cc=systemtap@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).