[prev in list] [next in list] [prev in thread] [next in thread]
List: oprofile-list
Subject: Re: [PATCH 0/4] ocount: A new oprofile event counting tool
From: Maynard Johnson <maynardj () us ! ibm ! com>
Date: 2013-07-18 19:17:22
Message-ID: 51E83F42.5000603 () us ! ibm ! com
[Download RAW message or body]
On 06/25/2013 08:56 AM, Maynard Johnson wrote:
> To: OProfile community members
> ANNOUNCEMENT: ocount: A new oprofile event counting tool
The ocount tool has been pushed upstream and is now ready for use. Please give it a \
try. Let me know what you think.
For the record, the following patches that were posted to the list have been pushed:
- Jun 25: [PATCH 1/4] Add 'check_count' parameter to parse_events function
- Jun 25: [PATCH 2/4] Various utility routines needed by new ocount tool
- Jun 25: [PATCH 3/4] New ocount tool and associated ocount_counter classes
- Jun 25: [PATCH 4/4] Add manpage for new ocount tool
- Jun 25: [PATCH] Fix problems in ocount patch set found by Coverity
- JUl 17: [PATCH] Add ocount information to user manual
- Jul 18: [PATCH] Post-review fixups for new ocount feature
-Maynard
>
> This set of 4 patches introduces a new tool to the oprofile suite of tools -- \
> *ocount*. This is the implementation of the design posted on May 30 (subject "[RFC] \
> Design for new oprofile event counting tool").
> *Example usage/output*
> Here's the simplest case, letting ocount use the default event for the processor \
> type: $ ocount ./my_memcpy
>
> Event counts (actual) for /home/maynard/test-stuff/memcpyt:
> Event Count % time enabled
> CPU_CLK_UNHALTED 8,667,461,082 100.00
>
> Here's an example that demonstrates counting multiple events for a multi-process \
> app, displaying the results in "brief" format, where event counts are separated by \
> process versus aggregated: $ ocount --brief-format --separate-thread -e \
> CPU_CLK_UNHALTED,INST_RETIRED_ANY_P,LOAD_BLOCK:L1D,L2_RQSTS --process-list=32208 \
> ocount: Press Ctl-c or 'kill -SIGINT 8059' to stop counting ^C
> 32208,CPU_CLK_UNHALTED,16737269773,50.02
> 32208,INST_RETIRED_ANY_P,34985891504,75.00
> 32208,LOAD_BLOCK,119002686,74.98
> 32208,L2_RQSTS,24188636,75.00
> 32209,CPU_CLK_UNHALTED,8506847,16.97
> 32209,INST_RETIRED_ANY_P,6194969,44.71
> 32209,LOAD_BLOCK,888830,97.40
> 32209,L2_RQSTS,185016,85.91
>
> Note that the final value on each output line is the percent of time the event was \
> enabled. This value will be less than 100% when PMU hardware restrictions prevent \
> all specified events being counted simultaneously, thus relying on the kernel to \
> automatically multiplex the events during the run time. The counts are scaled (as \
> described in the ocount manpage), but are, necessarily, only estimates of what the \
> actual count would be had it been enabled 100% of the time.
>
> *Patch set description*
>
> Patch 1/4 makes a minor change to libop/op_parse_event.c to accommodate event \
> specification differences between ocount and the profiling tools (operf and \
> opcontrol).
> Patch 2/4 ("Various utility routines needed by new ocount tool") accounts for about \
> 1/3 of the code in this patch set, but is really just a re-packaging of several \
> utility routines that are already used by operf. I put the utility routines into a \
> libpe_utils library. But to keep this patch set short and sweet, I have not yet \
> changed operf to use the libpe_utils routines, so it still uses its own copies of \
> those utilities (found in libperf_events/operf_utils.cpp and \
> pe_profiling/operf.cpp). Once the ocount patch set is committed upstream, I will \
> write another patch that removes operf's copies of those routines and change operf \
> to use the libpe_utils routines.
> Patch 3/4 ("New ocount tool and associated ocount_counter classes") implements the \
> main executable (ocount.cpp), which parses and validates arguments, and a helper \
> class (ocount_counter.cpp), which is responsible for the interaction with the \
> perf_events kernel subsystem. As can be seen by the size of ocount_count.cpp -- a \
> mere 615 lines -- implementing event counting was quite simple, especially compared \
> to profiling.
> Patch 4/4 is the manpage patch for ocount. The oprofile user manual updates will \
> follow in a separate patch. I wanted to get this implementation out there for \
> people to play with and review.
> Please give this new tool a try-out and give me your feedback. Note that because \
> of the new directories and files being added, you must run *./autogen.sh* before \
> the normal ./configure and make.
> Thanks.
>
> -Maynard
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> oprofile-list mailing list
> oprofile-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oprofile-list
>
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
oprofile-list mailing list
oprofile-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic