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: Tracking the Program Counter


On Sat, 2012-08-18 at 16:00 +0530, Sherlock Holmes wrote:
> Thanks a lot. I am able to get some really useful results from
> systemtap.
> Sorry,I need a couple of more clarifications:
> 1. For some reason, I cannot get the backtrace. I know that my process
> is waiting quite a few times in the select() call, but I need to know
> what is the user backtrace leading to this call.

Something like the following perhaps?

stap -d /your/program --ldd -e 'probe syscall.select {
  if (pid() == target()) {
    printf("%s(%s)\n", name, argstr);
    print_ubacktrace();
  } }' -c /your/program

> 2. Is there an "oprofile mode" where I can see a system wide profile
> to catch the top CPU consumers?
> or even do this for a single process?

There is not directly a "oprofile mode" equivalent, but there are
several ways to profile using systemtap. See the following examples:
http://sourceware.org/systemtap/examples/keyword-index.html#PROFILING
The pf3.stp example might be what you are looking for.

Cheers,

Mark


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