Using markers
Julio M. Merino Vidal <jmerino <at> ac.upc.edu>
2007-12-01 10:07:29 GMT
Hello,
I am interested in getting traces of the SPU scheduler in the Cell
platform. SystemTap seems like an excellent candidate to take those
traces but I'm having some trouble getting it to work as I need.
Using probes at function entry/exit points works in most cases, which
is great, but some of the functions I'm interested in tracing are
declared as static and therefore the debugging information lacks some
details to access such as, for example, their parameters.
So I've considered using markers as the documentation explains, but I
cannot get them to work. Based on bug 4446, I understand that the
CONFIG_MARKERS support that is in Linux 2.6.23 is not yet supported
by SystemTap (even though I did try them), so I tried to use the
macros defined in stapmark.h as shipped by SystemTap's Git
repository. But those don't seem to work either.
Here is what I added in the probe's point:
trace_mark(spufs_bind_context_new, "spu %d ctx %p", spu->number, ctx);
STAP_MARK_NN(spufs_bind_context_old, (int64_t)spu->number, (int64_t)
ctx);
And here is my test stp file:
probe test.new = kernel.mark("spufs_bind_context_new") { name = "new" }
probe test.old = kernel.mark("spufs_bind_context_old") { name = "old" }
probe test.* { log("marker ".name." hit") }
But then, when running stap on this script, none of the two markers
(Continue reading)