This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Debug code enabled on Systemtap verison: 0.8?
Sorry if this is a duplicate, I already sent this once to
systemtap@sourceware.org, re-sending to systemtap@sources.redhat.com.
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 },
};