Jon Weisz | 19 Feb 00:54 2015

operf equivalent of --save?

Hello, 
Is there any equivalent of the opcontrol --save for the operf command?  

I am trying to measure changes in the cpu usage over time as my system proceeds through different phases. Right now, I'm killing operf in a bash script and restarting it with a different output directory, but this seems somehow wasteful and inelegant compared with the previous interface. 

Thanks, 
Jon Weisz
Columbia University Robotics Group
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
oprofile-list mailing list
oprofile-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
Michael Petlan | 17 Feb 12:40 2015
Picon

Re: Ask help for oprofile

Hi Jason,

the 4th line in the unit_masks file has to be uncommented for sure, because when
you comment it out, then it not surprisingly complains about the entries there:

mandatory um zero doesn't contain exactly one entry (arm/armv6)

The format of the unit_masks file seems to be the following:

name:<some_name> type:<unit_mask_type> default:<default_value>
        <and here are the possible values of the unit mask>

So it expects one value for the "zero" unit mask there. If you comment it out,
the entry is missing. The real problem is the first one, but it can't be solved
by commenting the line out.

> ~/oprofile/bin # ./opcontrol --setup --event=CPU_CYCLES:1000:0:0:1
> oprofile: parse error in
> /repo1/ksheng/main1230/sw/vobs/esam/build/reborn/buildroot-isam-reborn-arm-catan/output/host/usr/bin/share/oprofile//arm/armv6/unit_masks,
> line 4
> parse_um() expected :value

Could you please try following?

1) uncomment the line in the unit_masks file

2) run 'ophelp' command and see what it says --> this command should parse the
file as well, so if there's a problem in parsing, it should occur here too

3) try to build 0.9.8 or better 0.9.9 and try operf/ocount instead of the legacy
mode (opcontrol, ...)

The CPU_CYCLES event should be probably the default one, so no need to specify
it in operf then, it should be enough to run:

operf /bin/ls
opreport

## or ##

ocount /bin/ls

...

Or for systemwide run, try 

operf -s
## or ##
ocount -s

If that works, then try to specify the event (or any other event) manually by:

operf -s -e CPU_CYCLES:1000:0:0:1

Regards,
Michael

----- Mensaje original -----
> De: "SHENG Jason" <Jason.Sheng <at> alcatel-lucent.com>
> Para: "William Cohen" <wcohen <at> redhat.com>, "oprofile-list" <oprofile-list <at> lists.sourceforge.net>
> Enviados: Miércoles, 11 de Febrero 2015 2:23:56
> Asunto: RE: Ask help for oprofile
> 
> Hi Will and All,
> 
> Thanks for your support in advance.
> 
> My oprofile version is 0.9.5, and CPU is ARM1176JZS (Arm-v6). And kernel
> version is 3.4.24, configured the oprofile module and load the kernel to
> board, there is oprofile in /sys/module/oprofile
> 
> The following is the event file and unit_masks file.
> 
> Events file:
> # ARM V6 events
> #
> event:0x00 counters:0,1 um:zero minimum:500 name:IFU_IFETCH_MISS : number of
> instruction fetch misses
> event:0x01 counters:0,1 um:zero minimum:500 name:CYCLES_IFU_MEM_STALL :
> cycles instruction fetch pipe is stalled
> event:0x02 counters:0,1 um:zero minimum:500 name:CYCLES_DATA_STALL : cycles
> stall occurs for due to data dependency
> event:0x03 counters:0,1 um:zero minimum:500 name:ITLB_MISS : number of
> Instruction MicroTLB misses
> event:0x04 counters:0,1 um:zero minimum:500 name:DTLB_MISS : number of Data
> MicroTLB misses
> event:0x05 counters:0,1 um:zero minimum:500 name:BR_INST_EXECUTED : branch
> instruction executed w/ or w/o program flow change
> event:0x06 counters:0,1 um:zero minimum:500 name:BR_INST_MISS_PRED : branch
> mispredicted
> event:0x07 counters:0,1 um:zero minimum:500 name:INSN_EXECUTED : instructions
> executed
> event:0x09 counters:0,1 um:zero minimum:500 name:DCACHE_ACCESS : data cache
> access, cacheable locations
> event:0x0a counters:0,1 um:zero minimum:500 name:DCACHE_ACCESS_ALL : data
> cache access, all locations
> event:0x0b counters:0,1 um:zero minimum:500 name:DCACHE_MISS : data cache
> miss
> event:0x0c counters:0,1 um:zero minimum:500 name:DCACHE_WB : data cache
> writeback, 1 event for every half cacheline
> event:0x0d counters:0,1 um:zero minimum:500 name:PC_CHANGE : number of times
> the program counter was changed without a mode switch
> event:0x0f counters:0,1 um:zero minimum:500 name:TLB_MISS : Main TLB miss
> event:0x10 counters:0,1 um:zero minimum:500 name:EXP_EXTERNAL : Explict
> external data access
> event:0x11 counters:0,1 um:zero minimum:500 name:LSU_STALL : cycles stalled
> because Load Store request queque is full
> event:0x12 counters:0,1 um:zero minimum:500 name:WRITE_DRAIN : Times write
> buffer was drained
> event:0x20 counters:0,1 um:zero minimum:500 name:ETMEXTOUT0 : nuber of cycles
> ETMEXTOUT[0] signal was asserted
> event:0x21 counters:0,1 um:zero minimum:500 name:ETMEXTOUT1 : nuber of cycles
> ETMEXTOUT[1] signal was asserted
> event:0x22 counters:0,1 um:zero minimum:500 name:ETMEXTOUT_BOTH : nuber of
> cycles both ETMEXTOUT [0] and [1] were asserted * 2
> event:0xff counters:0,1,2 um:zero minimum:500 name:CPU_CYCLES : clock cycles
> counter
> 
> unit_masks:
> 
> # ARM V6 PMU possible unit masks
> #
> name:zero type:mandatory default:0x00
>     0x00 No unit mask
>                         
> 
> In my test, I have to comment line "# 0x00 No unit mask", otherwise, it will
> hit following error.
> 
> ~/oprofile/bin # ./opcontrol --setup --event=CPU_CYCLES:1000:0:0:1
> oprofile: parse error in
> /repo1/ksheng/main1230/sw/vobs/esam/build/reborn/buildroot-isam-reborn-arm-catan/output/host/usr/bin/share/oprofile//arm/armv6/unit_masks,
> line 4
> parse_um() expected :value
> 
> Then I commented this line, will hit the following error which has been
> described in last mail, as follows:
> ~/oprofile/bin # ./opcontrol --start
> > mandatory um zero doesn't contain exactly one entry (arm/armv6)
> > Using default event: CPU_CYCLES:100000:0:1:1
> > mandatory um zero doesn't contain exactly one entry (arm/armv6)
> > 
> > ~/oprofile/bin #>
> > ~/oprofile/bin # ./opcontrol --setup --event=CPU_CYCLES:1000:0:0:1
> > --session-dir=/home/opt
> > mandatory um zero doesn't contain exactly one entry (arm/armv6)
> > ~/oprofile/bin #
> 
> 
> Thanks,
> Jason
> 
> 
> 
> -----Original Message-----
> From: William Cohen [mailto:wcohen <at> redhat.com]
> Sent: 2015年2月10日 23:23
> To: SHENG Jason; oprofile-list
> Subject: Re: Ask help for oprofile
> 
> On 02/10/2015 03:29 AM, SHENG Jason wrote:
> > Hi Cohen,
> > 
> >  
> > 
> > From the oprpfile webpage, I found you are the current maintainers and
> > primary contributes. And I found your mail address in webpage too. During
> > use the oprofile on my own board, I hit an error, searched in internet,
> > but no more help. Could you give me a hand? The following is the detailed
> > information.
> > 
> >  
> > 
> > My board uses a ARM cpu, arm1176s. I used the cross-compile tool built out
> > the oprofile tools and ship to my board with supported files, such as
> > (events, unit_masks).
> > 
> > But when I start the “opcontrol”, it hit the following error. I searched
> > the source code, the error message was printed in function
> > check_unit_mask(), could you please give me a hand? Let the opcontrol can
> > be run on my board.
> > 
> >  
> > 
> > ~/oprofile/bin #
> > 
> > ~/oprofile/bin # ./opcontrol --start
> > 
> > mandatory um zero doesn't contain exactly one entry (arm/armv6)
> > 
> > Using default event: CPU_CYCLES:100000:0:1:1
> > 
> > mandatory um zero doesn't contain exactly one entry (arm/armv6)
> > 
> > ~/oprofile/bin #
> > 
> > ~/oprofile/bin #
> > 
> > ~/oprofile/bin # ./opcontrol --setup --event=CPU_CYCLES:1000:0:0:1
> > --session-dir=/home/opt
> > 
> > mandatory um zero doesn't contain exactly one entry (arm/armv6)
> > 
> > ~/oprofile/bin #
> > 
> > ~/oprofile/bin #
> > 
> >  
> > 
> > Thanks,
> > 
> > Jason
> > 
> >  
> > 
> 
> 
> Hi Jason,
> 
> I am including the oprofile mailing list because others might come across the
> same problem.
> 
> I tried a similar experiment with oprofile-0.9.9 on a "ARM Cortex-A9" which
> should have similar event. It doesn't appear to have that problem:
> 
> [wcohen <at> wecf19arm ~]$ ophelp -d
> CPU_CYCLES:100000:0:1:1
> [wcohen <at> wecf19arm ~]$ sudo opcontrol --start --no-vmlinux
> ATTENTION: Use of opcontrol is discouraged.  Please see the man page for
> operf.
> Using default event: CPU_CYCLES:100000:0:1:1 Using 2.6+ OProfile kernel
> interface.
> Using log file /var/lib/oprofile/samples/oprofiled.log
> Daemon started.
> Profiler running.
> 
> 
> What version of OProfile are you using?  Also could you attach the
> events/arm/armv6/events and events/arm/armv6/unit_masks files from the
> version of oprofile you are using?
> 
> -Will
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> oprofile-list mailing list
> oprofile-list <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oprofile-list
> 

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
oprofile-list mailing list
oprofile-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
Lentes, Bernd | 11 Feb 18:17 2015
Picon

no operf after installation

Hi,

i'm new to operf. I have a virtual system (SLES 10 SP4, kernel 2.6.16.60-0.103.1-smp, 64bit) running on a
SLES 11 SP3 host using kvm.
The virtual system always has some percent in top for the softirqs. (5% - 15%) and I don't know why. I hoped
operf might help me by finding the reason for it. I downloaded version 1.0.0 from the sourceforge server,
did "./configure; make; make install", everything went fine, but I have no operf on the virtual box. I
searched the whole disk. Also I'm missing the man pages.
Maybe the version is too recent for my system ?

Thankful for any help.

Bernd

--
Bernd Lentes

Systemadministration
Institut für Entwicklungsgenetik
Gebäude 35.34 - Raum 208
HelmholtzZentrum münchen
bernd.lentes <at> helmholtz-muenchen.de
phone: +49 89 3187 1241
fax:   +49 89 3187 2294
http://www.helmholtz-muenchen.de/idg

Je suis Charlie

Helmholtz Zentrum München
Deutsches Forschungszentrum für Gesundheit und Umwelt (GmbH)
Ingolstädter Landstr. 1
85764 Neuherberg
www.helmholtz-muenchen.de
Aufsichtsratsvorsitzende: MinDir´in Bärbel Brumme-Bothe
Geschäftsführer: Prof. Dr. Günther Wess, Dr. Nikolaus Blum, Dr. Alfons Enhsen
Registergericht: Amtsgericht München HRB 6466
USt-IdNr: DE 129521671

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
William Cohen | 10 Feb 16:22 2015
Picon

Re: Ask help for oprofile

On 02/10/2015 03:29 AM, SHENG Jason wrote:
> Hi Cohen,
> 
>  
> 
> From the oprpfile webpage, I found you are the current maintainers and primary contributes. And I found
your mail address in webpage too. During use the oprofile on my own board, I hit an error, searched in
internet, but no more help. Could you give me a hand? The following is the detailed information.
> 
>  
> 
> My board uses a ARM cpu, arm1176s. I used the cross-compile tool built out the oprofile tools and ship to my
board with supported files, such as (events, unit_masks).
> 
> But when I start the “opcontrol”, it hit the following error. I searched the source code, the error
message was printed in function check_unit_mask(), could you please give me a hand? Let the opcontrol can
be run on my board.
> 
>  
> 
> ~/oprofile/bin #
> 
> ~/oprofile/bin # ./opcontrol --start
> 
> mandatory um zero doesn't contain exactly one entry (arm/armv6)
> 
> Using default event: CPU_CYCLES:100000:0:1:1
> 
> mandatory um zero doesn't contain exactly one entry (arm/armv6)
> 
> ~/oprofile/bin #
> 
> ~/oprofile/bin #
> 
> ~/oprofile/bin # ./opcontrol --setup --event=CPU_CYCLES:1000:0:0:1 --session-dir=/home/opt
> 
> mandatory um zero doesn't contain exactly one entry (arm/armv6)
> 
> ~/oprofile/bin #
> 
> ~/oprofile/bin #
> 
>  
> 
> Thanks,
> 
> Jason
> 
>  
> 

Hi Jason,

I am including the oprofile mailing list because others might come across the same problem.

I tried a similar experiment with oprofile-0.9.9 on a "ARM Cortex-A9" which should have similar event. It
doesn't appear to have that problem:

[wcohen <at> wecf19arm ~]$ ophelp -d
CPU_CYCLES:100000:0:1:1
[wcohen <at> wecf19arm ~]$ sudo opcontrol --start --no-vmlinux
ATTENTION: Use of opcontrol is discouraged.  Please see the man page for operf.
Using default event: CPU_CYCLES:100000:0:1:1
Using 2.6+ OProfile kernel interface.
Using log file /var/lib/oprofile/samples/oprofiled.log
Daemon started.
Profiler running.

What version of OProfile are you using?  Also could you attach the events/arm/armv6/events and
events/arm/armv6/unit_masks files from the version of oprofile you are using?

-Will

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
Will Schmidt | 30 Jan 20:23 2015
Picon

[Patch V3] Oprofile-testsuite, handle power-savings-mode changes during scaling test

The scaling tests will fail if the power-savings-mode changes while the
test is running.  (idle/slow <-> non-idle/fast).
This adds some logic to check the power state before and after running
the ocount scaling workload, and reruns the workload if the state has
changed before it attempts to process results.

Signed-off-by: Will Schmidt <will_schmidt <at> vnet.ibm.com>
---

 lib/op_util.exp                |   36 ++++++++++++++++++++++++++++++
 oprofile-ocount/ocount-run.exp |   49 ++++++++++++++++++++++++++++++++---------
 2 files changed, 75 insertions(+), 10 deletions(-)

diff --git a/testsuite/lib/op_util.exp b/testsuite/lib/op_util.exp
index 08eaa6c..09e76d3 100644
--- a/testsuite/lib/op_util.exp
+++ b/testsuite/lib/op_util.exp
 <at>  <at>  -27,6 +27,42  <at>  <at>  proc found_error {msg} {
     exit 1
 }

+# collect the current power_mode_data value.  We collect it from
+# the lparcfg interface.  The field value ultimately comes from firmware.
+proc get_baseline_power_savings_mode {} {
+    global initial_power_mode_data_string
+    set initial_power_mode_data_string [ local_exec "grep ^power_mode_data /proc/ppc64/lparcfg" "" ""
100 ]
+    if { [ regexp -line "power_mode_data=\[0-9\]+" $initial_power_mode_data_string line] != 1 } {
+        verbose "Did not find a power_mode_data value.\n"
+        set initial_power_mode_data_string "unset"
+    }
+}
+
+# verify the current power_mode_data value is unchanged.  A change in this value
+# indicates the systems power saving state has changed, which will affect the
+# test results.
+proc confirm_power_savings_mode {} {
+    global initial_power_mode_data_string
+    global power_mode_has_changed
+    # Pause a few seconds here.  This allows the lparcfg reported value to
+    # catch up with the current setting.  In practice, the lparcfg reported
+    # value does not immediately reflect the change in power modes.
+    local_exec "sleep 10" "" "" 30
+    set current_power_mode_data_string [ local_exec "grep ^power_mode_data /proc/ppc64/lparcfg" "" ""
100 ]
+    if { [ regexp -line "power_mode_data=\[0-9\]+" $current_power_mode_data_string line] != 1 } {
+        verbose "did not find a power_mode_data value.\n"
+        set current_power_mode_data_string "unset"
+        set power_mode_has_changed 0
+    } elseif { $initial_power_mode_data_string != $current_power_mode_data_string } {
+        verbose "  power_mode_data value has changed. was:  \[$initial_power_mode_data_string\] \n"
+        verbose "                                     now:  \[$current_power_mode_data_string\] \n"
+        set power_mode_has_changed 1
+    } else {
+        verbose "power_mode_data value has not changed since the last baseline check.\n"
+        set power_mode_has_changed 0
+    }
+}
+
 # read contents of file and return
 proc op_get_file_contents {fname} {
     set fd [open $fname]
diff --git a/testsuite/oprofile-ocount/ocount-run.exp b/testsuite/oprofile-ocount/ocount-run.exp
index 9c75fda..f3ffedf 100644
--- a/testsuite/oprofile-ocount/ocount-run.exp
+++ b/testsuite/oprofile-ocount/ocount-run.exp
 <at>  <at>  -110,16 +110,45  <at>  <at>  proc do_test_ocount_scaling {workload_exec} {

     set event [get_cycles_event]

-    set pid [exec $workload_exec > /tmp/junky.xwyesu.xse &]
-
-    # allow workload to reach steady state
-    local_exec "sleep 1" "" "" 10
-
-    set result1 [local_exec "taskset -c 0 ocount -e ${event} --time-interval $run_time_interval1:1 -p
$pid" "" "" 60]
-    set result2 [local_exec "taskset -c 0 ocount -e ${event} --time-interval $run_time_interval2:1 -p
$pid" "" "" 60]
-    set result4 [local_exec "taskset -c 0 ocount -e ${event} --time-interval $run_time_interval4:1 -p
$pid" "" "" 60]
-
-    test_kill_workload $pid
+    # Logic here to handle a scenario where the system is switching between
+    # power states.  Since a change in power saving modes will throw off
+    # the scaling test results, if we detect the state has changed, we
+    # will re-run the tests before attempting to process any results.
+    set retry_limit 3
+    set retry_count 0
+    global power_mode_has_changed
+    set power_mode_has_changed 99
+
+    # loop to validate power_savings_mode status begins here
+    while {$power_mode_has_changed > 0} {
+        incr retry_count
+        get_baseline_power_savings_mode
+
+        set pid [exec $workload_exec > /tmp/junky.xwyesu.xse &]
+
+        # allow workload to reach steady state
+        local_exec "sleep 1" "" "" 10
+
+        set result1 [local_exec "taskset -c 0 ocount -e ${event} --time-interval $run_time_interval1:1 -p
$pid" "" "" 60]
+        set result2 [local_exec "taskset -c 0 ocount -e ${event} --time-interval $run_time_interval2:1 -p
$pid" "" "" 60]
+        set result4 [local_exec "taskset -c 0 ocount -e ${event} --time-interval $run_time_interval4:1 -p
$pid" "" "" 60]
+
+        test_kill_workload $pid
+
+        confirm_power_savings_mode
+
+        if { $power_mode_has_changed == 0 } {
+            # no change detected.  Good to go.
+            verbose "valid run (The power_savings_mode value was stable, or not present)\n"
+        } elseif {$retry_count > $retry_limit} {
+            # exceeded our arbitrary retry limit.
+            send "Warning: Unable to verify a clean run due to power_savings_mode fluctuations.\n"
+            break
+        } else {
+            verbose "Informational: Detected power_savings_mode fluctuation. (iteration #$retry_count)\n"
+        }
+    # end of power_savings_mode loop.
+    }

     set count1 [get_event_count $result1 $event]
     set count2 [get_event_count $result2 $event]

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
Will Schmidt | 30 Jan 20:23 2015
Picon

Re: [Patch V2] Oprofile-testsuite, handle power-savings-mode changes during scaling test

On Mon, 2015-01-12 at 13:50 -0600, Will Schmidt wrote:
> On Mon, 2015-01-12 at 10:59 -0500, William Cohen wrote:
> > On 01/08/2015 01:53 PM, Will Schmidt wrote:
> > > The scaling tests will fail if the power-savings-mode changes while the
> > > test is running.  (idle/slow <-> non-idle/fast).
> > > This adds some logic to check the power state before and after running
> > > the ocount scaling workload, and reruns the workload if the state has
> > > changed before it attempts to process results.
> > 
> > Hi Will,
> 
> There is one typo in what I posted below, (sleep delay was too short),
> so there will be a V3 of this patch, but in the mean-time..
> 

V3 following momentarily, only change wrt/V2 is the sleep delay
adjustment.   Additional chatter below.

> > 
> > Aren't other processors such as x86 going to have similar issues as they change clock frequency? 
> 
> Possibly, but maybe not.  My best guess to why it's not been an issue in
> the past is that non-ppc platforms are making the frequency change quick
> enough (within the initial 10 second window for $workload_exec to reach
> steady state), that they just don't hit this scenario.

My experimentation with a few x86* systems I've got access to are
confirming for me that the frequency changes have settled before the
test gets as far as the measuring stage, so this would seem to be an
issue only for ppc64 (due to the multi-second delay in power mode
changes).

I'll note that I was able to force a failure on x86* by directly
dropping the processor frequency during the critical time period, but I
don't consider that typical behavior.

> >  Would it be possible  make this portable to other architectures in addition to the ppc64?
> 
> Yes.  I can poke at this some on x86 and see if I can confirm my guess
> from above.   If not, I'll see what I can whip up. 

So I'm going with a 'no', I don't believe that is necessary.
If we want the utility function names to be changed to something ppc64
specific, that would be reasonable, though I'd need input on what to
change them to. :-)
And all that said, I'm happy to revisit if anyone sees this fail on
another architecture.

Thanks, 
-Will

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
William Cohen | 29 Jan 16:28 2015
Picon

Re: operf taking 100% cpu

On 01/28/2015 08:13 PM, Xin Tong wrote:
> is there a GUI based tool to read perfect output? I use IBM VPA to read the .opm produced by oprofile
> 
> thanks 
> xin

Hi Xin,

There is a Text User Interface (TUI) in the "perf report" to navigate the information.  There is also an
plugin for Eclipse to read information from perf:

https://eclipse.org/linuxtools/projectPages/perf/

I don't know how either of those compare to IBM's Visual Performance Analyzer.

-Will

> 
> On Wednesday, January 28, 2015, William Cohen <wcohen <at> redhat.com <mailto:wcohen <at> redhat.com>> wrote:
> 
>     On 01/28/2015 03:47 PM, Xin Tong wrote:
>     > does perf has anything to do with operf ?
>     >
>     > Xin
> 
>     Hi Xin,
> 
>     The names are similar but they are different tools. perf is a tool developed by kernel engineers. operf is a
tool in the oprofile.  They both are using the same underlying linux kernel perf support to access the
performance monitoring hardware, but store their data in different formats and have different options.
> 
>     -Will
>     >
>     > On Tue, Jan 27, 2015 at 9:03 PM, William Cohen <wcohen <at> redhat.com <javascript:;>
<mailto:wcohen <at> redhat.com <javascript:;>>> wrote:
>     >
>     >     On 01/27/2015 06:51 PM, Xin Tong wrote:
>     >     > ​what does perf do ? is it a different tool from operf ? the perf command generates perf.data and i do not
need to tell it what performance counters i want to collect ?
>     >     >
>     >     > bash-4.1$ perf record --pid=44637
>     >     >    755 root      39  19     0    0    0 R 100.0  0.0  14085:51 kipmi0
>     >     >  44637 xintong1  20   0  3928  344  268 R 100.0  0.0   0:37.75 loop
>     >
>     >     Hi Xin,
>     >
>     >     perf is a tools that is included in the kernel source that also uses the performance monitoring hardware
like operf. Most newer linux distributions also package the perf executables in a package.  By default it
uses cycles as the thing sampling metric.  Assuming that you have perf installed on the machine you can do
record some data with the following (hit cntl-c to stop data recording)
>     >
>     >     $ perf record --pid=44637
>     >
>     >     This will record data in perf.data in the directory.  The use the following to look at the data
>     >
>     >     $ perf report
>     >
>     >     The following URL has more information about perf:
>     >
>     >     http://web.eece.maine.edu/~vweaver/projects/perf_events/
>     >
>     >     -Will
>     >
> 

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
oprofile-list mailing list
oprofile-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
William Cohen | 28 Jan 23:30 2015
Picon

Re: operf taking 100% cpu

On 01/28/2015 03:47 PM, Xin Tong wrote:
> does perf has anything to do with operf ? 
> 
> Xin

Hi Xin,

The names are similar but they are different tools. perf is a tool developed by kernel engineers. operf is a
tool in the oprofile.  They both are using the same underlying linux kernel perf support to access the
performance monitoring hardware, but store their data in different formats and have different options.

-Will
> 
> On Tue, Jan 27, 2015 at 9:03 PM, William Cohen <wcohen <at> redhat.com <mailto:wcohen <at> redhat.com>> wrote:
> 
>     On 01/27/2015 06:51 PM, Xin Tong wrote:
>     > ​what does perf do ? is it a different tool from operf ? the perf command generates perf.data and i do not
need to tell it what performance counters i want to collect ?
>     >
>     > bash-4.1$ perf record --pid=44637
>     >    755 root      39  19     0    0    0 R 100.0  0.0  14085:51 kipmi0
>     >  44637 xintong1  20   0  3928  344  268 R 100.0  0.0   0:37.75 loop
> 
>     Hi Xin,
> 
>     perf is a tools that is included in the kernel source that also uses the performance monitoring hardware
like operf. Most newer linux distributions also package the perf executables in a package.  By default it
uses cycles as the thing sampling metric.  Assuming that you have perf installed on the machine you can do
record some data with the following (hit cntl-c to stop data recording)
> 
>     $ perf record --pid=44637
> 
>     This will record data in perf.data in the directory.  The use the following to look at the data
> 
>     $ perf report
> 
>     The following URL has more information about perf:
> 
>     http://web.eece.maine.edu/~vweaver/projects/perf_events/
> 
>     -Will
> 

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
oprofile-list mailing list
oprofile-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
William Cohen | 28 Jan 06:03 2015
Picon

Re: operf taking 100% cpu

On 01/27/2015 06:51 PM, Xin Tong wrote:
> ​what does perf do ? is it a different tool from operf ? the perf command generates perf.data and i do not
need to tell it what performance counters i want to collect ?
> 
> bash-4.1$ perf record --pid=44637
>    755 root      39  19     0    0    0 R 100.0  0.0  14085:51 kipmi0
>  44637 xintong1  20   0  3928  344  268 R 100.0  0.0   0:37.75 loop

Hi Xin,

perf is a tools that is included in the kernel source that also uses the performance monitoring hardware
like operf. Most newer linux distributions also package the perf executables in a package.  By default it
uses cycles as the thing sampling metric.  Assuming that you have perf installed on the machine you can do
record some data with the following (hit cntl-c to stop data recording)

$ perf record --pid=44637

This will record data in perf.data in the directory.  The use the following to look at the data

$ perf report

The following URL has more information about perf:

http://web.eece.maine.edu/~vweaver/projects/perf_events/

-Will

> 
> 
> ​
> 
> On Tue, Jan 27, 2015 at 8:44 AM, William Cohen <wcohen <at> redhat.com <mailto:wcohen <at> redhat.com>> wrote:
> 
>     On 01/27/2015 08:31 AM, Maucci, Cyrille wrote:
>     > Did you try ‘perf top’ on operf ? J
> 
>     "perf top" will require root privileges. Alternatively,  as a normal users you could use:
> 
>     - "perf record --pid=<monitored_operf_pid>"
>     - in a different directory to avoid overwiting the data you could use another operf with the --pid=<monitored_operf_pid>
> 
>     Xin, could you post the results on this mailing lis?.  It would be good to eliminate this issue from operf.
> 
>     -Will
>     >
>     >
>     >
>     > *From:*Xin Tong [mailto:trent.tong <at> gmail.com <mailto:trent.tong <at> gmail.com>]
>     > *Sent:* Friday, January 23, 2015 12:57 AM
>     > *To:* oprofile-list <at> lists.sourceforge.net <mailto:oprofile-list <at> lists.sourceforge.net>
>     > *Subject:* operf taking 100% cpu
>     >
>     >
>     >
>     > I am running oprofile on a linux intel haswell machine. and the operf process is taking close to 100% of the
time. what is operf doing with that amount of cpu cycles ? maybe its polling on something ? how do i fix this ?
>     >
>     >
>     >
>     > operf --separate-thread --event=CPU_CLK_UNHALTED:10000000 ./gcc/bin/viterb00data_2.exe
-autogo && opreport  -l -g -d --xml -o current.opm
>     >
>     >
>     >
>     > top - 15:56:34 up 69 days,  2:59, 13 users,  load average: 2.04, 1.71, 1.43
>     >
>     > Tasks: 1196 total,   4 running, 1191 sleeping,   1 stopped,   0 zombie
>     >
>     > Cpu(s):  1.1%us,  0.1%sy,  0.0%ni, 98.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
>     >
>     > Mem:  60853364k total, 39834668k used, 21018696k free,   818524k buffers
>     >
>     > Swap: 20479992k total,     1428k used, 20478564k free, 34594044k cached
>     >
>     >
>     >
>     >    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>     >
>     >    755 root      39  19     0    0    0 R 98.3  0.0   6891:01 kipmi0
>     >
>     > 118201 xintong1  20   0 14448 1700 1412 R 98.3  0.0   0:03.06 operf
>     >
>     > 118206 xintong1  20   0 15020  660  524 R 98.3  0.0   0:03.06 viterb00data_2.
>     >
>     >
>     >
>     >
>     >
>     > Thanks,
>     >
>     > Xin
>     >
>     >
>     >
>     > ------------------------------------------------------------------------------
>     > Dive into the World of Parallel Programming. The Go Parallel Website,
>     > sponsored by Intel and developed in partnership with Slashdot Media, is your
>     > hub for all things parallel software development, from weekly thought
>     > leadership blogs to news, videos, case studies, tutorials and more. Take a
>     > look and join the conversation now. http://goparallel.sourceforge.net/
>     >
>     >
>     >
>     > _______________________________________________
>     > oprofile-list mailing list
>     > oprofile-list <at> lists.sourceforge.net <mailto:oprofile-list <at> lists.sourceforge.net>
>     > https://lists.sourceforge.net/lists/listinfo/oprofile-list
>     >
> 
> 

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
oprofile-list mailing list
oprofile-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
Andrew Jones | 26 Jan 13:28 2015
Picon

opcontrol sh: write error: Invalid argument

Hi Everyone,

Recently I cross-compiled Oprofiler for MIPS.
When  I run --start, I'm getting 'write error'.  Details are below:

# pwd
/root
# export OPROFILE_EVENTS_DIR=/root
# ./opcontrol --deinit
dump fail: daemon died during last run ?
Detected stale lock file. Removing.
# ./opcontrol --no-vmlinux
# ./opcontrol --reset
# ./opcontrol --init
# ./opcontrol --event=CYCLES:1000:0:1:1
# ./opcontrol --status
Daemon not running
Session-dir: /var/lib/oprofile
Event 0: CYCLES:1000:0:1:1
Separate options: none
vmlinux file: none
Image filter: none
Call-graph depth: 0
# ./opcontrol --start
sh: write error: Invalid argument
Using 2.6+ OProfile kernel interface.
Using log file /var/lib/oprofile/samples/oprofiled.log
Daemon started.
Profiler running.


Unfortunately my sh isn't giving me a line number along with that error.
Any help would greatly appreciated.

oprofiled.log:
oprofiled started Tue Nov 30 00:46:05 1999
kernel pointer size: 4
Failed to exec opjitconv: No such file or directory
oprofiled: open of /var/lib/oprofile/samples//current/{root}//bin/busybox/{dep}/{root}//bin/busybox/INSTRUCTIONS.100000.0.all.all.all failed: Invalid argument
...


Thankyou so much!
Andrew


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
oprofile-list mailing list
oprofile-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
Xin Tong | 23 Jan 00:57 2015
Picon

operf taking 100% cpu

I am running oprofile on a linux intel haswell machine. and the operf process is taking close to 100% of the time. what is operf doing with that amount of cpu cycles ? maybe its polling on something ? how do i fix this ?

operf --separate-thread --event=CPU_CLK_UNHALTED:10000000 ./gcc/bin/viterb00data_2.exe -autogo && opreport  -l -g -d --xml -o current.opm

top - 15:56:34 up 69 days,  2:59, 13 users,  load average: 2.04, 1.71, 1.43
Tasks: 1196 total,   4 running, 1191 sleeping,   1 stopped,   0 zombie
Cpu(s):  1.1%us,  0.1%sy,  0.0%ni, 98.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  60853364k total, 39834668k used, 21018696k free,   818524k buffers
Swap: 20479992k total,     1428k used, 20478564k free, 34594044k cached

   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
   755 root      39  19     0    0    0 R 98.3  0.0   6891:01 kipmi0
118201 xintong1  20   0 14448 1700 1412 R 98.3  0.0   0:03.06 operf
118206 xintong1  20   0 15020  660  524 R 98.3  0.0   0:03.06 viterb00data_2.


Thanks,
Xin
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
oprofile-list mailing list
oprofile-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list

Gmane