This is the mail archive of the systemtap@sourceware.org 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:
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.

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 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 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
(<http://ltt.polymtl.ca/>). I've tested the latest cvs systemtap with
<http://ltt.polymtl.ca/lttng/patch-2.6.24-rc2-lttng-0.10- pre23.tar.bz2>
and
<http://ltt.polymtl.ca/lttng/patch-2.6.24-rc3-git1-lttng-0.10- pre33.tar.bz2>
The current version appears to be:
<http://ltt.polymtl.ca/lttng/patch-2.6.24-rc3-git3-lttng-0.10- 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 <jmerino@ac.upc.edu>



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