public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Issues with @perf directives in systemtap 3.1 on Ubuntu 16.04LTS
@ 2017-01-23 13:50 Geoffrey Blake
  2017-01-23 15:43 ` David Smith
  0 siblings, 1 reply; 4+ messages in thread
From: Geoffrey Blake @ 2017-01-23 13:50 UTC (permalink / raw)
  To: systemtap

Hi all,

I have been trying to make use of the perf.stp example modified for my
own program I am trying to profile.  I set the perf.hw probes to be
system wide by not supplying a process, but when my other probes
trigger and I read the counters with the @perf() directive, the number
returned for the counters is always the same junk number (it varies
between runs, but never changes during a run).

I am not sure what could be going on.  I have tried the systemtap
package that ships with Ubuntu 16.04LTS and compiled from the tip of
the git repository.  Both versions have the same failure.  Any help
would be appreciated on how to debug this further.

Thanks,
Geoff Blake

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Issues with @perf directives in systemtap 3.1 on Ubuntu 16.04LTS
  2017-01-23 13:50 Issues with @perf directives in systemtap 3.1 on Ubuntu 16.04LTS Geoffrey Blake
@ 2017-01-23 15:43 ` David Smith
  2017-01-23 16:05   ` Geoffrey Blake
  0 siblings, 1 reply; 4+ messages in thread
From: David Smith @ 2017-01-23 15:43 UTC (permalink / raw)
  To: Geoffrey Blake, systemtap

On 01/23/2017 07:50 AM, Geoffrey Blake wrote:
> Hi all,
> 
> I have been trying to make use of the perf.stp example modified for my
> own program I am trying to profile.  I set the perf.hw probes to be
> system wide by not supplying a process, but when my other probes
> trigger and I read the counters with the @perf() directive, the number
> returned for the counters is always the same junk number (it varies
> between runs, but never changes during a run).
> 
> I am not sure what could be going on.  I have tried the systemtap
> package that ships with Ubuntu 16.04LTS and compiled from the tip of
> the git repository.  Both versions have the same failure.  Any help
> would be appreciated on how to debug this further.

Does the unmodified perf.stp example work on your system? How are you
running your modified example?

-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Issues with @perf directives in systemtap 3.1 on Ubuntu 16.04LTS
  2017-01-23 15:43 ` David Smith
@ 2017-01-23 16:05   ` Geoffrey Blake
  2017-01-25 21:18     ` Stan Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Geoffrey Blake @ 2017-01-23 16:05 UTC (permalink / raw)
  To: David Smith; +Cc: systemtap

The unmodified perf.stp script is working fine.  The modification I
made was to probe into a library function call by doing:

process("path").library("path").funtion("func") { /* probe code */ }

process("path").library("path").funtion("func").return { /* probe code */ }

This is still yielding the @perf call giving me the same number on
return all the time.
Does @perf not work with library functions?

Thanks,
Geoff Blake

On Mon, Jan 23, 2017 at 9:42 AM, David Smith <dsmith@redhat.com> wrote:
> On 01/23/2017 07:50 AM, Geoffrey Blake wrote:
>> Hi all,
>>
>> I have been trying to make use of the perf.stp example modified for my
>> own program I am trying to profile.  I set the perf.hw probes to be
>> system wide by not supplying a process, but when my other probes
>> trigger and I read the counters with the @perf() directive, the number
>> returned for the counters is always the same junk number (it varies
>> between runs, but never changes during a run).
>>
>> I am not sure what could be going on.  I have tried the systemtap
>> package that ships with Ubuntu 16.04LTS and compiled from the tip of
>> the git repository.  Both versions have the same failure.  Any help
>> would be appreciated on how to debug this further.
>
> Does the unmodified perf.stp example work on your system? How are you
> running your modified example?
>
> --
> David Smith
> dsmith@redhat.com
> Red Hat
> http://www.redhat.com
> 256.217.0141 (direct)
> 256.837.0057 (fax)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Issues with @perf directives in systemtap 3.1 on Ubuntu 16.04LTS
  2017-01-23 16:05   ` Geoffrey Blake
@ 2017-01-25 21:18     ` Stan Cox
  0 siblings, 0 replies; 4+ messages in thread
From: Stan Cox @ 2017-01-25 21:18 UTC (permalink / raw)
  To: Geoffrey Blake; +Cc: systemtap, David Smith

[-- Attachment #1: Type: text/plain, Size: 245 bytes --]


> Does @perf not work with library functions?
The attached perf library example seems to work fine on Fedora.
  ABCDEFGHIJKLMNOPQRSTUVWXYZ
  count 1 min 882141 max 882141
  ABCDEFGHIJKLMNOPQRSTUVWXYZ
  ...
  count 100 min 888775 max 1594700




[-- Attachment #2: tststperf.sh --]
[-- Type: application/x-shellscript, Size: 685 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-25 21:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-23 13:50 Issues with @perf directives in systemtap 3.1 on Ubuntu 16.04LTS Geoffrey Blake
2017-01-23 15:43 ` David Smith
2017-01-23 16:05   ` Geoffrey Blake
2017-01-25 21:18     ` Stan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).