This is the mail archive of the mailing list for the systemtap project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using markers

On 03/12/2007, at 17:28, David Smith wrote:

Julio M. Merino Vidal wrote:

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.

We should probably remove stapmark.h since we don't support it.

fche already did it.

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 = 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 can
be found.

Am I doing something incorrectly?  Do I have to apply some kind of
unofficial patch to either the kernel or systemtap?

Thanks, and kudos for this great tool!

Systemtap supports the latest markers patches from the lttng project
(<>). I've tested the latest cvs systemtap with
< pre23.tar.bz2>
< pre33.tar.bz2>
The current version appears to be:
< pre36.tar.bz2>

In the version I'm using, markers look like the trace mark example you
listed above.

Aha! So all the "fixes" I posted to bug 4446 are useless ;-)

Thanks for the info!

Julio M. Merino Vidal <>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]