Re: [perfmon2] PEBS dump using libpfm

2012-09-04 Thread Arun Sharma
On Tue, Sep 4, 2012 at 7:42 AM, Arkaprava Basu wrote: > Thanks Arun for the reply. Do you know whether the patches that you mentioned > merged with kernel mainline or not? If not, can I trouble you to point me to > which patches you are talking about? Not merged yet. http://marc.info/?l=linux-

Re: [perfmon2] PEBS dump using libpfm

2012-09-03 Thread Arun Sharma
On Sat, Sep 1, 2012 at 5:07 PM, Arkaprava Basu wrote: > Hello, > > I am new to perfmon. I need to use PEBS to collect a trace of processor > state (and ultimately generate address trace) for DTLB miss events. I was > wondering if somebody can point to some example on how I can use libpfm to >

Re: [perfmon2] swig error for libpfm build

2012-06-08 Thread Arun Sharma
On 6/8/12 9:46 AM, William Cohen wrote: > In the meantime it would be good to get libpfm upstream fixed so swig doesn't > complain about this error. I think that the attached patch eliminates this > problem. This is based on the approach mentioned in a similar swig bug > report: > > http://sour

[perfmon2] [PATCH] Remove shbang from python files that are not executable.

2012-04-24 Thread Arun Sharma
@@ -#!/usr/bin/env python # # Copyright (c) 2008 Google, Inc. # Contributed by Arun Sharma diff --git a/python/src/session.py b/python/src/session.py index df22ea6..f598aa4 100644 --- a/python/src/session.py +++ b/python/src/session.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright (c) 2008

Re: [perfmon2] Revisions to the libpfm rpm spec file

2012-04-24 Thread Arun Sharma
On Tue, Apr 24, 2012 at 6:51 AM, William Cohen wrote: > Hi Arun, > > I don't have much experience with python and I am not that familiar with how > these scripts are suppose to be used.  Is there some description how these > are suppose to be used? If everything works fine, you should be able t

Re: [perfmon2] Revisions to the libpfm rpm spec file

2012-04-19 Thread Arun Sharma
On Wed, Mar 28, 2012 at 1:56 PM, William Cohen wrote: > libpfm-python.x86_64: E: non-executable-script > /usr/lib64/python2.6/site-packages/perfmon/pmu.py 0644L /usr/bin/env > libpfm-python.x86_64: E: non-executable-script > /usr/lib64/python2.6/site-packages/perfmon/session.py 0644L /usr/bin/en

Re: [perfmon2] A page fault causes exiting from WFI(wait-for-interrupt) mode for all idling cores?

2011-05-28 Thread Arun Sharma
On Sat, May 28, 2011 at 4:56 AM, heechul Yun wrote: > > Can anyone tell me if this, exiting from WFI on every page fault, is > correct behavior? If so, why? Without knowing the full context, I'd look into the possibility that the kernel is trying to shoot down TLB entries on the other processors

[perfmon2] [PATCH] Fix gcc-4.6 warnings

2011-04-28 Thread Arun Sharma
--- lib/pfmlib_amd64.c |3 --- lib/pfmlib_common.c |8 +--- lib/pfmlib_intel_x86.c |2 -- lib/pfmlib_perf_event.c |3 +-- lib/pfmlib_perf_event_pmu.c | 11 --- perf_examples/self_count.c |4 +++- perf_examples/self_pipe.c |5 ++---

[perfmon2] [PATCH] Teach perf script about PERF_TYPE_RAW

2011-03-22 Thread Arun Sharma
Useful for getting stack traces for hardware events not handled by PERF_TYPE_HARDWARE. Signed-off-by: Arun Sharma Cc: Ingo Molnar Cc: Frederic Weisbecker Cc: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Tom Zanussi Cc: linux-ker

Re: [perfmon2] Last Branch Record support?

2011-03-20 Thread Arun Sharma
2011/3/20 陳韋任 : >  And I am wondering is it possible that libpfm4 exposes LBR to users > even perf_events doesn't? No - the kernel needs to support this functionality by exposing it via a system call. libpfm4 is a user level convenience library that converts an event name into a structure expecte

Re: [perfmon2] Question about event "BRANCH_INSTRUCTIONS_RETIRED" on x86 machine

2011-03-17 Thread Arun Sharma
2011/3/17 陳韋任 : >  The "better match" just means better than usual sampling mechanisms, > right? Arun mentioned that "PEBS is known to be precise, but not > accurate". So we still cannot get the exact IP which causes the event. > Am I right? Appendix B.2.3.3 Precise Execution Events in this doc:

Re: [perfmon2] How does take use of EventName and UnitMask?

2011-03-17 Thread Arun Sharma
On Thu, Mar 17, 2011 at 8:43 AM, Arun Sharma wrote: > > Stephane has disabled the uncore event support in libpfm4 (since the > patch is still not upstream yet). But by uncommenting 2-3 lines of > code, you should be able to get uncore events working. > This is the patch I

Re: [perfmon2] How does take use of EventName and UnitMask?

2011-03-17 Thread Arun Sharma
[ + Lin Ming, linux-perf-users ] On Thu, Mar 17, 2011 at 5:35 AM, Easley wrote: > EventNum and UmaskValue is control bits, but I can't find which address of > msr to wirte. Try Ming Lin's kernel patch here: http://thread.gmane.org/gmane.linux.kernel/1071064 and my patch to link the perf tool

Re: [perfmon2] Question about event "BRANCH_INSTRUCTIONS_RETIRED" on x86 machine

2011-03-16 Thread Arun Sharma
On Wed, Mar 16, 2011 at 7:07 PM, 陳韋任 wrote: >  You mean PEBS makes the skid disappered? Does `perf` or libpfm4 support this? > The example I showed was ran on a x86 machine, it seems `perf` does not use > PEBS > feature. > It depends on the suffix. Try perf record -e branch-misses:p PEBS is kn

[perfmon2] [PATCH] Add libpfm4 support (v3)

2011-03-10 Thread Arun Sharma
libpfm4 is a library that takes a CPU vendor documentation compatible string and fills out perf_event_attr. Typical use case: user wants to look at events other than the ones supported by perf using symbolic names. Signed-off-by: Arun Sharma Cc: Ingo Molnar Cc: Frederic Weisbecker Cc: Mike

[perfmon2] [PATCH] Duplicate function prototpe for pfm_get_perf_event_encoding

2011-03-04 Thread Arun Sharma
This is necessary because swig recognizes the T *output, but not struct T *output as an output argument. --- python/src/perfmon_int.i |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/python/src/perfmon_int.i b/python/src/perfmon_int.i index db6f4c5..b34c6fe 100644 ---

Re: [perfmon2] [PATCH] Add libpfm4 support (v2).

2011-03-02 Thread Arun Sharma
On Wed, Mar 2, 2011 at 7:20 PM, Lin Ming wrote: >> +#ifdef LIBPFM4 >> +       printf("\n"); >> +       pfm_for_all_pmus(i) { >> +               int ret; >> +               pfm_pmu_info_t pinfo; >> +               int count; >> +               int k; >> + > > Need to initialize pinfo before passing

Re: [perfmon2] [PATCH] Add libpfm4 support

2011-03-02 Thread Arun Sharma
On Thu, Mar 03, 2011 at 09:32:55AM +0800, Lin Ming wrote: > > I got a build error with latest libpfm4 git tree(bff5dff), > > CC util/parse-events.o > cc1: warnings being treated as errors > util/parse-events.c: In function ‘print_events’: > util/parse-events.c:1087: error: implicit declaratio

[perfmon2] [PATCH] Initialize the size field as required by libpfm4

2011-03-02 Thread Arun Sharma
This is an incremental patch on top of my earlier -v2 patch. diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index a7e5765..81c154e 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -1045,6 +1045,7 @@ static void print_umasks(pfm_event

[perfmon2] [PATCH] Add libpfm4 support (v2).

2011-03-02 Thread Arun Sharma
of libpfm4. Signed-off-by: Arun Sharma Cc: Ingo Molnar Cc: Frederic Weisbecker Cc: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Tom Zanussi --- tools/perf/Makefile| 13 + tools/perf/feature-tests.mak | 11

Re: [perfmon2] Online monitoring and event set support in perf vs pfmon

2011-03-02 Thread Arun Sharma
On Sat, Feb 26, 2011 at 11:50 AM, Sergey Blagodurov wrote: > 1) pfmon can monitor more events than there are actual physical > counters on the PMU with the event sets mechanism. perf can do event multiplexing too. > > 2) pfmon can print intermediate counts while in system-wide mode. > You can

[perfmon2] [PATCH] Uncore support

2011-02-25 Thread Arun Sharma
This is for supporting uncore events. I tested this diff with Lin Ming's uncore patch against the kernel http://thread.gmane.org/gmane.linux.kernel/1071064 diff --git a/include/perfmon/perf_event.h b/include/perfmon/perf_event.h index defc88e..de5691e 100644 --- a/include/perfmon/perf_event.h +++

[perfmon2] Uncore events and exclude_hv

2011-02-25 Thread Arun Sharma
I had to hack around one thing to make perf+libpfm4 work with uncore events: --- a/lib/pfmlib_perf_event.c +++ b/lib/pfmlib_perf_event.c @@ -153,7 +153,7 @@ pfmlib_perf_event_encode(void *this, const char *str, int dfl_plm, void *data) attr->exclude_user = !(plm & PFM_PLM3); at

Re: [perfmon2] [PATCH] Handle API changes for python

2011-02-18 Thread Arun Sharma
BTW, pfm_for_each_event() still refers to the obsolete/unimplemented pfm_get_event_first(). We should either fix up the macro or kill it completely. -Arun -- The ultimate all-in-one performance toolkit: Intel(R) Parall

Re: [perfmon2] [PATCH] Handle API changes for python

2011-02-15 Thread Arun Sharma
On Tue, Feb 15, 2011 at 11:48:17PM +0100, Stephane Eranian wrote: > > Why do you need to remove #if 0 code? I don't need to. Feel free to ignore that part of the patch :) -Arun -- The ultimate all-in-one performance to

[perfmon2] [PATCH] Handle API changes for python

2011-02-15 Thread Arun Sharma
* Remove unimplemented functions from headers (so swig doesn't generate code for them) * Rename the output argument so swig can handle it properly. * Pass the new pfm_os_t arg properly --- include/perfmon/pfmlib.h |3 +-- lib/pfmlib_common.c | 44 --

Re: [perfmon2] updating perf tool

2011-02-14 Thread Arun Sharma
On Mon, Feb 14, 2011 at 3:01 PM, Can Hankendi wrote: > Hi again, > > What I'm looking for is creating performance traces. Let's say I've a > program running for 5 seconds, and I wanna collect performance data for > every 10 ms. In the end, I'll have a trace with 500 stats (1 stat for each > 10ms).

Re: [perfmon2] updating perf tool

2011-02-11 Thread Arun Sharma
On Fri, Feb 11, 2011 at 12:54 PM, Can Hankendi wrote: > I receive an error when I try to use -A. ""Error: unknown switch" > How can I update the tool to use -A ability. Your perf binary is not new enough. Please rebuild from source. git log tools/perf/builtin-stat.c [...] commit f5b4a9c3ab53d544

Re: [perfmon2] updating perf tool

2011-02-11 Thread Arun Sharma
[ bcc: perfmon2-devel, +linux-perf-users ] On Fri, Feb 11, 2011 at 11:16 AM, Can Hankendi wrote: > Hi, > > I'm using 2.6.38 kernel and trying to run performance tests for individual > cores on my system. But it seems like current kernel doesn't include the > patches for perf events. I tried to co

[perfmon2] [PATCH] Add libpfm4 support

2011-02-03 Thread Arun Sharma
libpfm4 is a library that takes a CPU vendor documentation compatible string and fills out perf_event_attr. Typical use case: user wants to look at events other than the ones supported by perf using symbolic names. Signed-off-by: Arun Sharma Cc: Ingo Molnar Cc: Frederic Weisbecker Cc: Mike

[perfmon2] rpm spec file for libpfm4

2011-01-18 Thread Arun Sharma
Hi All, I spent some time packaging libpfm4 for rpm based systems. %patch0 should be necessary only if your python is installed somewhere other than /usr. -Arun libpfm4.spec Description: Binary data python-install-path.patch Description: Binary data --

[perfmon2] [PATCH] Pid should be -1 in system wide mode

2010-04-19 Thread Arun Sharma
--- python/src/session.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/python/src/session.py b/python/src/session.py index f90e541..df22ea6 100644 --- a/python/src/session.py +++ b/python/src/session.py @@ -59,7 +59,7 @@ class SystemWideSession(Session): self.cp

Re: [perfmon2] AMD Barcelona IBS

2008-05-05 Thread Arun Sharma
On Mon, May 5, 2008 at 2:42 PM, Vivek Thakkar <[EMAIL PROTECTED]> wrote: > I am also reading the documents mentioned by Anoop. It looks like IBS > supports time based sampling and not event based sampling ala PEBS. I am not > sure how much lossy the information would be. Anyways, a related questi

[perfmon2] [PATCH] Support multi-cpu profiling in python

2008-03-27 Thread Arun Sharma
Patch attached. -Arun python-multi-cpu.patch Description: Binary data - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.n

[perfmon2] linux scheduler interface for python users

2008-03-26 Thread Arun Sharma
This might be of interest to users of python bindings: I had an interface to the linux scheduler APIs in glibc as a part of another module. I've moved it into it's own namespace (linux.sched) now: http://code.google.com/p/pycpuid/source/browse/trunk/linux/sched/sched_int.i Example code: http://

Re: [perfmon2] [PATCH] Updated python bindings patch

2008-03-26 Thread Arun Sharma
On Tue, Mar 25, 2008 at 1:55 PM, stephane eranian <[EMAIL PROTECTED]> wrote: > Arun, > > The Python bindings patch has now being applied to CVS. > Please verify that I got everything correctly as I encountered > some conflicts while merging your latest patches. > Hi Stephane, Looks like this li

Re: [perfmon2] [PATCH] Updated python bindings patch

2008-03-25 Thread Arun Sharma
On Tue, Mar 25, 2008 at 1:55 PM, stephane eranian <[EMAIL PROTECTED]> wrote: > Arun, > > The Python bindings patch has now being applied to CVS. > Please verify that I got everything correctly as I encountered > some conflicts while merging your latest patches. Looks good to me. Thanks. At som

Re: [perfmon2] [PATCH] Updated python bindings patch

2008-03-25 Thread Arun Sharma
vent() for common event types, which return strings. -Arun Fix some issues with examples. * We only support self profiling. Not other threads * The user needs to specify events to monitor Signed-off-by: Arun Sharma <[EMAIL PROTECTED]> --- a/python/self.py Tue Mar 25 07:33:50 2008 + +++

Re: [perfmon2] [PATCH] Updated python bindings patch

2008-03-25 Thread Arun Sharma
On Mon, Mar 24, 2008 at 8:21 PM, Arun Sharma <[EMAIL PROTECTED]> wrote: > > Stephane, your changes look good to me. But I'm almost done > refactoring the examples roughly as follows: Updated patch attached. I think I captured most of your comments in this patch - but I

Re: [perfmon2] [PATCH] Updated python bindings patch

2008-03-24 Thread Arun Sharma
On Mon, Mar 24, 2008 at 5:04 PM, stephane eranian <[EMAIL PROTECTED]> wrote: > Hello Arun, > > Thanks for the patch. > > I made made some changes to tthe examples. They both had problems > reading the 2 events. See the attached updated versions. > Stephane, your changes look good to me. But I'm

[perfmon2] [PATCH] Updated python bindings patch

2008-03-24 Thread Arun Sharma
hon related patches I've posted to the list so far. -Arun PS: The strings os_err_t, pfm_err_t don't matter. We could rename them to something else if you like. Python bindings for libpfm. Signed-off-by: Arun Sharma <[EMAIL PROTECTED]> --- a/include/perfmon/perfmon.h Fri Mar 21

Re: [perfmon2] [PATCH] python bindings

2008-03-21 Thread Arun Sharma
On Fri, Mar 21, 2008 at 2:58 PM, stephane eranian <[EMAIL PROTECTED]> wrote: > > > http://www.swig.org/Doc1.3/Python.html#Python_nn44 > > > This one looks easy to do for the syscall calls, only 12 of them. That's 12 syscalls + 29 library calls + future API changes. > But we'd have to write one

Re: [perfmon2] [PATCH] python bindings

2008-03-21 Thread Arun Sharma
On Fri, Mar 21, 2008 at 2:45 PM, Arun Sharma <[EMAIL PROTECTED]> wrote: > On Fri, Mar 21, 2008 at 2:19 PM, stephane eranian <[EMAIL PROTECTED]> > wrote: > > > Arun, > > > > Not all functions are syscalls here. only the first 12. The others are > > ju

Re: [perfmon2] [PATCH] python bindings

2008-03-21 Thread Arun Sharma
on. The other method is %exception: http://www.swig.org/Doc1.3/Python.html#Python_nn44 But we'd have to write one exception block per function. Also, my earlier patch breaks self.py and sys.py. This incremental patch should fix it. -Arun Some functions can return non-zero values on succe

Re: [perfmon2] [PATCH] python bindings

2008-03-21 Thread Arun Sharma
Hi Stephane, The attached patch converts libpfm errors into python exceptions. Please review. -Arun On Thu, Mar 20, 2008 at 3:54 PM, Arun Sharma <[EMAIL PROTECTED]> wrote: > Hi Stephane, > > Here's an initial version of my python bindings patch. > > The patch depends

[perfmon2] [PATCH] python bindings

2008-03-20 Thread Arun Sharma
or perfmon/libpfm. Signed-off-by: Arun Sharma <[EMAIL PROTECTED]> --- libpfm-old/python/Makefile 1970-01-01 00:00:00.0 + +++ libpfm-py.hg/python/Makefile 2008-03-20 22:27:10.796894000 + @@ -0,0 +1,9 @@ +all: + ./setup.py build + +install: + ./setup.py install + +clean: