* [Bug runtime/17216] New: perf.hw counters misbehaviour
@ 2014-07-30 20:38 i.ucar86 at gmail dot com
2014-07-30 20:41 ` [Bug runtime/17216] " fche at redhat dot com
0 siblings, 1 reply; 2+ messages in thread
From: i.ucar86 at gmail dot com @ 2014-07-30 20:38 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=17216
Bug ID: 17216
Summary: perf.hw counters misbehaviour
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: runtime
Assignee: systemtap at sourceware dot org
Reporter: i.ucar86 at gmail dot com
Created attachment 7732
--> https://sourceware.org/bugzilla/attachment.cgi?id=7732&action=edit
Two scripts that reproduce the bug
The following happens, at least, with perf.hw.instructions and
perf.hw.cpu_cycles. I think it's a runtime bug, but I'm not sure.
Check the attachment, please. It contains two files, perf_good.stp and
perf_bad.stp. They serve the same purpose: counting the number of instructions
and CPU cycles of a given executable (/usr/bin/find). And they are essentially
equal, except that the counters are declared in different order.
As one could expect, perf_good.stp prints the good result (I mean, the same as
the kernel tool "perf") while perf_bad.stp prints a bad result (specifically,
the inverse result: instructions as cycles and cycles as instructions).
How to reproduce it? The following commands do the trick (the output numbers
are fake and are provided for illustrative purposes only):
$ perf stat find /usr/bin -name "l*" -printf "%h/%f %s %Cx %Ck%CM %Y\n"
instructions: 25, cycles: 15
$ stap perf_good.stp -c "find /usr/bin -name \"l*\" -printf \"%h/%f %s %Cx
%Ck%CM %Y\n\""
instructions: 25, cycles: 15
$ stap perf_bad.stp -c "find /usr/bin -name \"l*\" -printf \"%h/%f %s %Cx
%Ck%CM %Y\n\""
instructions: 15, cycles: 25
Here is some information about my system:
$ uname -a
Linux tombstone 3.14.9-200.fc20.x86_64 #1 SMP Thu Jun 26 21:40:51 UTC 2014
x86_64 x86_64 x86_64 GNU/Linux
$ stap -V
Systemtap translator/driver (version 2.5/0.158, rpm 2.5-2.fc20)
Copyright (C) 2005-2014 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
enabled features: AVAHI LIBRPM LIBSQLITE3 NSS BOOST_SHARED_PTR
TR1_UNORDERED_MAP NLS DYNINST JAVA LIBVIRT LIBXML2
Please, don't hesitate to ask for more information if you need.
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug runtime/17216] perf.hw counters misbehaviour
2014-07-30 20:38 [Bug runtime/17216] New: perf.hw counters misbehaviour i.ucar86 at gmail dot com
@ 2014-07-30 20:41 ` fche at redhat dot com
0 siblings, 0 replies; 2+ messages in thread
From: fche at redhat dot com @ 2014-07-30 20:41 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=17216
Frank Ch. Eigler <fche at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fche at redhat dot com
Assignee|systemtap at sourceware dot org |scox at redhat dot com
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-30 20:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-30 20:38 [Bug runtime/17216] New: perf.hw counters misbehaviour i.ucar86 at gmail dot com
2014-07-30 20:41 ` [Bug runtime/17216] " fche at redhat dot com
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).