Re: [PATCH v3 1/8]Perf: Transform thread_map to linked list

2013-03-17 Thread David Ahern
Hi: On 3/13/13 3:42 AM, chenggang wrote: --- tools/perf/builtin-stat.c |2 +- tools/perf/tests/open-syscall-tp-fields.c |2 +- tools/perf/util/event.c | 12 +- tools/perf/util/evlist.c |2 +- tools/perf/util/evsel.c

Re: [PATCH v3 3/8]Perf: Transform evlist->mmap to xyarray

2013-03-17 Thread David Ahern
On 3/13/13 3:42 AM, chenggang wrote: diff --git a/tools/perf/Makefile b/tools/perf/Makefile index a2108ca..7f3f066 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -209,7 +209,8 @@ BASIC_CFLAGS = \ -Iutil \ -I. \ -I$(TRACE_EVENT_DIR) \ - -D_LARGEFILE64_S

Re: [PATCH v3 4/8]perf: Transform evsel->id to xyarray

2013-03-17 Thread David Ahern
On 3/13/13 3:42 AM, chenggang wrote: tools/perf/util/evlist.c |4 +++- tools/perf/util/evsel.c | 19 +-- tools/perf/util/evsel.h |5 - tools/perf/util/header.c | 28 ++-- tools/perf/util/header.h |3 ++- 5 files changed, 44 ins

[PATCH] timekeeping: Add tracepoints for xtime changes

2013-03-18 Thread David Ahern
One component of tracking perf_clock timestamps to time-of-day is updates to xtime by a user or ntpd. To that end this patch adds tracepoints to the timekeeping code as suggested by Thomas: https://lkml.org/lkml/2011/3/2/186 Signed-off-by: David Ahern Cc: Thomas Gleixner Cc: John Stultz

[PATCH] timekeeping: Add tracepoints for xtime changes - v2

2013-03-19 Thread David Ahern
: David Ahern Cc: Thomas Gleixner Cc: John Stultz Cc: Steven Rostedt --- include/trace/events/timekeeping.h | 51 kernel/time/timekeeping.c | 11 2 files changed, 62 insertions(+) create mode 100644 include/trace/events/timekeeping.h diff

Re: [PATCH 2/2] perf scripts: Fix rwtop record script

2013-02-05 Thread David Ahern
On 2/5/13 9:05 AM, Jiri Olsa wrote: Adding -D option into the rwtop record command line, to get immediate response when there's event in the buffer. Seems like this will dramatically increase CPU usage of perf-record as well as increase the overhead of each event with a process wakeup. How ab

[PATCH] perf: make event_copy local to mmaps

2013-02-05 Thread David Ahern
ble use case no longer fails. The first problem is much more complicated and will be the subject of a future patch. Signed-off-by: David Ahern Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Jiri Olsa Cc: Namhyung Kim --- tools/perf/per

Re: [RFC] perf: need to expose sched_clock to correlate user samples with kernel samples

2013-02-05 Thread David Ahern
On 2/1/13 7:18 AM, Pawel Moll wrote: 8<--- From 2ad51a27fbf64bf98cee190efc3fbd7002819692 Mon Sep 17 00:00:00 2001 From: Pawel Moll Date: Fri, 1 Feb 2013 14:03:56 + Subject: [PATCH] perf: Add ioctl to return current time value To co-relate user space events with the perf events stream a cur

Re: [PATCH 01/23] perf: initial infrasructure for kconfig

2013-04-02 Thread David Ahern
On 4/2/13 2:22 AM, Paul Bolle wrote: tools/perf/Makefile |5 + 1 file changed, 5 insertions(+) create mode 100644 tools/perf/Pconfig All current Kconfig files can be found with git ls-files "*Kconfig*". This file won't. Why does it need to be named differently? It does not. I wil

Re: [PATCH 09/23] perf: make cfi unwind support based on CONFIG_LIBUNWIND

2013-04-02 Thread David Ahern
On 4/2/13 3:32 AM, Paul Bolle wrote: On Mon, 2013-04-01 at 21:54 -0600, David Ahern wrote: --- a/tools/perf/Pconfig +++ b/tools/perf/Pconfig @@ -1,3 +1,14 @@ +config ARCH +string +option env="ARCH" Why does this copy init/Kconfig? +config X86 +def_bool y if A

Re: [PATCH 20/23] perf: consolidate CONFIG_LIBELF checks in Makefile

2013-04-02 Thread David Ahern
On 4/2/13 3:37 AM, Paul Bolle wrote: On Mon, 2013-04-01 at 21:54 -0600, David Ahern wrote: --- a/tools/perf/Makefile +++ b/tools/perf/Makefile [...] @@ -602,6 +590,16 @@ ifdef CONFIG_LIBELF endif else +ifdef CONFIG_DWARF +$(error CONFIG_DWARF depends on LIBELF) +endif

Re: [RFC] perf: need to expose sched_clock to correlate user samples with kernel samples

2013-04-03 Thread David Ahern
On 4/3/13 3:17 AM, Stephane Eranian wrote: I haven't done any specific testing with either approach yet. The goal is to use this perf timestamp to correlate user level events to hardware events recorded by the kernel. I would assume there would be situations where those user events could be on th

Re: [RFC] perf: need to expose sched_clock to correlate user samples with kernel samples

2013-04-03 Thread David Ahern
On 4/3/13 8:00 AM, Stephane Eranian wrote: What's the advantage of changing apps -- like the JIT compiler -- to emit perf based timestamps versus having perf emit existing timestamps? ie., monotonic and realtime clocks already have vdso mappings for userspace with well known performance character

Re: [PATCH] perf script: Add a python script to statistic direct io behavior

2013-01-31 Thread David Ahern
Hi On 1/31/13 2:08 AM, chenggang@gmail.com wrote: From: chenggang@gmail.com This patch depends on a prev patch: https://lkml.org/lkml/2013/1/29/47 If the engineers want to analyze the direct io behavior of some applications without source code, perf tools with some appropriate tracepoi

Re: [PATCH 02/25] perf top: Delete maps on exit

2013-01-31 Thread David Ahern
On 1/31/13 10:25 AM, Arnaldo Carvalho de Melo wrote: From: Arnaldo Carvalho de Melo Removing one more memory leak found with valgrind. If you are spending time one memory consumption by perf-top one thing to look at is handling of terminated threads. Currently, terminated threads are stuck

Re: [PATCH 0/4] perf tools: some 'perf script' fixes

2013-01-24 Thread David Ahern
On 1/24/13 11:27 AM, Arnaldo Carvalho de Melo wrote: Em Fri, Jan 18, 2013 at 01:51:24PM -0600, Tom Zanussi escreveu: This patchset fixes various problems I hit while doing a run-through of the existing 'perf script' scripts. Also, sometimes when running rwtop I get a 'failed to read event heade

Re: [PATCH 1/5] perf tools: Fix -C option for record command

2013-02-25 Thread David Ahern
On 2/25/13 11:39 AM, Oleg Nesterov wrote: To clarify, I am not trying to review this patch, I'd like to ask the question... On 02/25, Jiri Olsa wrote: Currently the -C option does not work for record command, because of the targets mismatch when synthesizing threads. Fixing this by using prop

Re: [PATCH v2 1/4] Transform xyarray to linked list

2013-02-27 Thread David Ahern
er of nodes in every row are same. The interface to append and shrink a exist xyarray is provided. 1) xyarray__append() append a column for all rows. 2) xyarray__remove() remove a column for all rows. Cc: David Ahern Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Ingo Molnar Cc: Arnaldo Car

Re: [PATCH v2 2/4] Transform thread_map to linked list

2013-02-27 Thread David Ahern
On 2/26/13 2:41 AM, chenggang wrote: ---8<--- diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 5cd13d7..91d2848 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -327,8 +327,8 @@ int perf_event__synthesize_thread_map(struct perf_tool *tool, err =

[PATCH] perf kvm: fix segfault by initializing file_name to NULL

2013-02-27 Thread David Ahern
Dongsoo reported that perf-kvm was segfaulting. The bug was introduced by commit 3786063 which moved file_name from struct perf_kvm which was initialized on the stack to an uninitialized stack variable. Fix by initializing. Needs to be applied to 3.7 and 3.8 as well. Signed-off-by: David Ahern

Re: [PATCH] perf kvm: fix segfault by initializing file_name to NULL

2013-02-27 Thread David Ahern
On 2/27/13 9:31 PM, Xiao Guangrong wrote: On 02/28/2013 11:29 AM, David Ahern wrote: Dongsoo reported that perf-kvm was segfaulting. The bug was introduced by commit 3786063 which moved file_name from struct perf_kvm which was initialized on the stack to an uninitialized stack variable. Fix by

Re: [PATCH] perf kvm: fix segfault by initializing file_name to NULL

2013-02-28 Thread David Ahern
On 2/28/13 7:24 AM, Arnaldo Carvalho de Melo wrote: Just fast forwarded my perf/urgent to tip/perf/urgent, checked and the fix is there as pointed out by Xiao. hmm hanging out in your perf/core branch rather than perf/urgent. David -- To unsubscribe from this list: send the line "unsubscri

Re: [PATCH v2 3/4] Transform mmap and other related structures to list with new xyarray

2013-02-28 Thread David Ahern
On 2/26/13 2:41 AM, chenggang wrote: diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 774c907..13112c6 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -31,6 +31,8 @@ #include #include +#define MMAP(e, y) (*(struct perf_mmap *)xyarra

Re: [RFC] perf: need to expose sched_clock to correlate user samples with kernel samples

2013-02-18 Thread David Ahern
On 2/18/13 8:16 AM, Stephane Eranian wrote: Hi, I think the advantage of the ioctl() is that is reuses existing infrastructure. The downside is that to get the timestamp you need at a minimum: uint64_t get_perf_timestamp(void) { struct perf_event_attr attr; uint64_t ts = 0; int fd;

[PATCH 2/4] perf: remove unused print_trace_event function

2013-03-12 Thread David Ahern
Signed-off-by: David Ahern --- tools/perf/util/trace-event-parse.c | 13 - tools/perf/util/trace-event.h |1 - 2 files changed, 14 deletions(-) diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c index 8450bec..4454835 100644 --- a

[PATCH 4/4] perf: move machine__remove_thread and make static

2013-03-12 Thread David Ahern
Signed-off-by: David Ahern --- tools/perf/util/machine.c | 22 +++--- tools/perf/util/machine.h |1 - 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index efdb38e..c5e3b12 100644 --- a/tools/perf/util

[PATCH 1/4] perf: remove unused print_event function

2013-03-12 Thread David Ahern
Signed-off-by: David Ahern --- tools/perf/util/trace-event-parse.c | 24 tools/perf/util/trace-event.h |3 --- 2 files changed, 27 deletions(-) diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c index 3aabcd6..8450bec

[PATCH 0/4] perf: remove unused functions

2013-03-12 Thread David Ahern
Hi Arnaldo: Going through my backlog of perf cleanup patches. These remove unused functions and then makes a sole callee static. David Ahern (4): perf: remove unused print_event function perf: remove unused print_trace_event function perf: remove unused perf_session__remove_thread perf

[PATCH 3/4] perf: remove unused perf_session__remove_thread

2013-03-12 Thread David Ahern
Signed-off-by: David Ahern --- tools/perf/util/session.c | 12 tools/perf/util/session.h |1 - 2 files changed, 13 deletions(-) diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index bd85280b..ab265c2 100644 --- a/tools/perf/util/session.c +++ b/tools/perf

Re: [PATCH 6/6] perf util: Change trace info output file name

2013-03-13 Thread David Ahern
On 3/13/13 5:19 AM, Namhyung Kim wrote: -static const char *output_file = "trace.info"; +static const char *output_file = "perf.data"; static int output_fd; Not really needed. Only use is a couple of die() calls. Since the file name is not used on the open the die message would be misleading

perf fails to compile for latest Linus tree

2013-03-13 Thread David Ahern
Hi Arnaldo: I believe this has been fixed but I don't see it in your tree (perf/core or perf/urgent) or in the tip tree: builtin-annotate.c: In function ‘hists__find_annotations’: builtin-annotate.c:161:4: error: duplicate case value builtin-annotate.c:154:4: error: previously used here make:

Re: perf fails to compile for latest Linus tree

2013-03-13 Thread David Ahern
On 3/13/13 1:56 PM, Arnaldo Carvalho de Melo wrote: Em Wed, Mar 13, 2013 at 08:50:35AM -0600, David Ahern escreveu: I believe this has been fixed but I don't see it in your tree (perf/core or perf/urgent) or in the tip tree: builtin-annotate.c: In function ‘hists__find_annotations’: bu

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-28 Thread David Ahern
On 8/28/12 12:35 AM, Andrew Jones wrote: This is the second user. As I said, move the stats code from builtin-stat.c. Or are you suggesting to duplicate the code once, and then refactor the second (really the third) time it's needed? gah, I misunderstood your comment. I see your point now. Dav

Re: [PATCH] [perf] Remove the node from rblist in strlist__remove

2012-08-28 Thread David Ahern
On 8/29/12 12:00 AM, Suzuki K. Poulose wrote: The following commit: author David Ahern Tue, 31 Jul 2012 04:31:33 + (22:31 -0600) committer Arnaldo Carvalho de Melo Fri, 3 Aug 2012 13:39:51 + (10:39 -0300) commit ee8dd3ca43f151d9fbe1edeef68fb8a77eb9f047 causes

[PATCH] perf: remove unneeded include of network header files

2012-08-29 Thread David Ahern
perf does not have networking related functionality, and the inclusion of these headers is one of the causes of compile failures for Android: https://lkml.org/lkml/2012/8/23/316 https://lkml.org/lkml/2012/8/28/293 So, remove them. Signed-off-by: David Ahern Cc: Ingo Molnar Cc: Frederic

Re: [PATCH 02/13] perf tools: update types definitions for Android

2012-08-29 Thread David Ahern
On 8/28/12 4:33 PM, Irina Tirdea wrote: Some systems (e.g. Android) define in their libc types.h __le16, __be16, etc. Since perf is wrapping with a local version, we need to define this constants in the local version too. Errors in Android: In file included from bionic/libc/include/netinet/in.h

Re: [PATCH 03/13] perf tools: drop asm/byteorder.h wrapper

2012-08-29 Thread David Ahern
On 8/28/12 3:59 PM, Irina Tirdea wrote: Wrapping asm/byteorder.h will also replace the glibc header, not only the kernel one. asm/byteorder.h further includes architecture dependent headers that define endianess. Some systems (e.g. Android) need constant definitions that depend on endianess (e.g

Re: [PATCH 05/13] perf tools: fix ALIGN redefinition in system headers

2012-08-29 Thread David Ahern
On 8/28/12 4:02 PM, Irina Tirdea wrote: On some systems (e.g. Android), ALIGN is defined in system headers as ALIGN(p). The definition of ALIGN used in perf takes 2 parameters: ALIGN(x,a). This leads to redefinition conflicts. Redefinition error on Android: In file included from util/include/lin

Re: [PATCH 12/13] perf tools: replace on_exit with atexit

2012-08-29 Thread David Ahern
On 8/28/12 4:06 PM, Irina Tirdea wrote: on_exit() is only available in new versions of glibc. Using on_exit on Android leads to errors at compile time. Replacing on_exit with its more portable version atexit. This leads to using a global variable since on_exit supports sending a parameters while

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-30 Thread David Ahern
In addition to Andrew's comment about making the stats struct and functions generic... On 8/27/12 3:51 AM, Dong Hao wrote: ---8<--- +static void exit_event_decode_key(struct event_key *key, char decode[20]) +{ + const char *exit_reason = get_exit_reason(key->key); + + snprintf(deco

Re: [PATCH] [perf] Fix intlist node removal

2012-08-31 Thread David Ahern
ith the suitable function provided by the user. Signed-off-by: Suzuki K Poulose Cc: David Ahern --- tools/perf/util/intlist.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/intlist.c b/tools/perf/util/intlist.c index fd530dc..77c504f 100644 --- a/to

Re: [PATCH] [perf] Account the nr_entries in rblist properly

2012-08-31 Thread David Ahern
remove_node(rblist, pos); } free(rblist); } Acked-by: David Ahern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-09-03 Thread David Ahern
On 9/3/12 2:48 AM, don wrote: 于 2012年08月31日 02:29, David Ahern 写道: In addition to Andrew's comment about making the stats struct and functions generic... Yes. :-) On 8/27/12 3:51 AM, Dong Hao wrote: ---8<--- +static void exit_event_decode_key(struct event_key *key, char d

Re: [PATCH]Perf top: Add ability to detect new threads dynamically during 'perf top -p 'pid'' is running

2012-09-04 Thread David Ahern
On 8/22/12 8:37 AM, chenggang qin wrote: > From: Chenggang Qin > > While we use "perf top -p 'pid'" to monitor the symbols of specified > processes, some new threads would be created by the monitored processes > during "perf top" is running. In current version, these new threads and > their symbo

Re: [PATCH] perf: allow user to indicate path to objdump in command line

2012-09-04 Thread David Ahern
On 9/4/12 4:32 AM, Maciek Borzecki wrote: When analyzing perf data from hosts of other architecture than one of the local host it's useful to call objdump that is part of a toolchain for that architecture. Instead of calling regular objdump, call one that user specified in command line. Why not

Re: [PATCH 3/3] perf tool: give user better message if precise is not supported

2012-09-11 Thread David Ahern
On 9/11/12 3:20 AM, Robert Richter wrote: On 10.09.12 10:40:16, David Ahern wrote: --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -294,6 +294,11 @@ try_again: perf_evsel__name(pos)); rc = -err

Re: [PATCH 3/3] perf tool: give user better message if precise is not supported

2012-09-11 Thread David Ahern
On 9/11/12 8:01 AM, Robert Richter wrote: Ok, wrong question. Better would have been: Did you run it on a non-pebs Intel machine of an non-ibs AMD machine? Intel: yes. VM for example. All the servers I have now are Nehalem or better - ie., with a PEBS. AMD: no. I do not have any AMD-based s

Re: [PATCH] perf, tools: Stop perf stat -p when profiled process exits v2

2012-09-12 Thread David Ahern
On 9/12/12 8:40 AM, Andi Kleen wrote: - while(!done) sleep(1); + char piddir[40]; + if (target.pid && access("/proc", X_OK) == 0) + snprintf(piddir, sizeof piddir, "/proc/%d", atoi(target.pid)); else path has piddir not set. Also

Re: [PATCH 3/3] perf tool: give user better message if precise is not supported

2012-09-12 Thread David Ahern
On 9/11/12 9:11 AM, Robert Richter wrote: On 11.09.12 08:32:55, David Ahern wrote: My guess would be /usr/include/bits/errno.h: /* Linux has no ENOTSUP error code. */ # define ENOTSUP EOPNOTSUPP Ok, so ENOTSUP is actually the same as EOPNOTSUPP. Since the syscall returns a EOPNOTSUPP, I

[PATCH 0/3 v2] perf: precise mode and exclude_guest

2012-09-12 Thread David Ahern
Hopefully this wraps up the precise mode-exclude_guest dependency. I'm sure someone will let me know if I screwed up the attribution in the second patch. David Ahern (2): perf tool: precise mode requires exclude_guest perf tool: give user better message if precise is not supported

[PATCH 3/3 v2] perf tool: give user better message if precise is not supported

2012-09-12 Thread David Ahern
x27;precise' request may not be supported. Try removing 'p' modifier sleep: Terminated v2: softened message to 'may not be' supported per Robert's suggestion Signed-off-by: David Ahern Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Robert Richter --- tools/perf/built

[PATCH 1/3] perf tool: precise mode requires exclude_guest

2012-09-12 Thread David Ahern
PU supports IBS profiling. Signed-off-by: David Ahern Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Robert Richter Cc: Gleb Natapov Cc: Avi Kivity Link: https://lkml.org/lkml/2012/7/9/264 --- tools/perf/util/parse-events.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/util/parse-e

[PATCH 2/3] perf: require exclude_guest to use PEBS - kernel side enforcement

2012-09-12 Thread David Ahern
virtual machine. Therefore we have to disable PEBS on VT-x enter and re-enable on VT-x exit, enforcing a strict exclude_guest. This patch enforces exclude_guest kernel side. Signed-off-by: David Ahern Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Robert Richter Cc: Gleb Natapov Cc: Avi Kivity Link: h

Re: [PATCH 2/3] perf: require exclude_guest to use PEBS - kernel side enforcement

2012-09-12 Thread David Ahern
On 9/12/12 8:38 PM, Namhyung Kim wrote: Hi David, On Wed, 12 Sep 2012 09:16:29 -0600, David Ahern wrote: From: Peter Zijlstra Per Peter: "Intel PEBS in VT-x context uses the DS address as a guest linear address, even though its programmed by the host as a host linear address.

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-09-12 Thread David Ahern
static const char * const kvm_usage[] = { -"perf kvm [] {top|record|report|diff|buildid-list}", +"perf kvm [] {top|record|report|diff|buildid-list|stat}", NULL }; The usage for the report/record sub commands of stat is never shown. e.g., $ perf kvm stat --> shows help for perf

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-09-13 Thread David Ahern
On 9/13/12 7:45 AM, Arnaldo Carvalho de Melo wrote: Em Wed, Sep 12, 2012 at 10:56:44PM -0600, David Ahern escreveu: static const char * const kvm_usage[] = { +"perf kvm [] {top|record|report|diff|buildid-list|stat}", The usage for the report/record sub commands of stat is n

Re: [PATCH] perf, tools: Stop perf stat -p when profiled process exits v3

2012-09-13 Thread David Ahern
On 9/13/12 9:58 AM, Andi Kleen wrote: From: Andi Kleen When counting a process with perf stat -p check if the process died and exit collection if yes. v2: Add more checks, handle non -p again. Handle /proc not there. v3: Handle multi pid case. Fix non /proc error path Signed-off-by: Andi Kleen

[PATCH 0/3 v3] perf: precise mode and exclude_guest

2012-09-13 Thread David Ahern
Hopefully this wraps up the precise mode-exclude_guest dependency. I'm sure someone will let me know if I screwed up the attribution in the second patch. David Ahern (2): perf tool: precise mode requires exclude_guest perf tool: give user better message if precise is not supported

[PATCH 1/3] perf tool: precise mode requires exclude_guest

2012-09-13 Thread David Ahern
PU supports IBS profiling. Signed-off-by: David Ahern Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Robert Richter Cc: Gleb Natapov Cc: Avi Kivity Link: https://lkml.org/lkml/2012/7/9/264 --- tools/perf/util/parse-events.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/util/parse-e

[PATCH 3/3 v2] perf tool: give user better message if precise is not supported

2012-09-13 Thread David Ahern
x27;precise' request may not be supported. Try removing 'p' modifier sleep: Terminated v2: softened message to 'may not be' supported per Robert's suggestion Signed-off-by: David Ahern Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Robert Richter --- tools/perf/built

[PATCH 2/3] perf: require exclude_guest to use PEBS - kernel side enforcement

2012-09-13 Thread David Ahern
virtual machine. Therefore we have to disable PEBS on VT-x enter and re-enable on VT-x exit, enforcing a strict exclude_guest. This patch enforces exclude_guest kernel side. Signed-off-by: David Ahern Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Robert Richter Cc: Gleb Natapov Cc: Avi Kivity Link: h

Re: [PATCH] perf: add /proc/perf_events file for dump perf events info

2012-09-13 Thread David Ahern
On 7/5/12 7:02 AM, Jovi Zhang wrote: From 91fbcca37a2c9979083f4b9a6fa9c1875fc2886f Mon Sep 17 00:00:00 2001 From: Jovi Zhang Date: Fri, 6 Jul 2012 00:05:40 +0800 Subject: [PATCH] perf: add /proc/perf_events file for dump perf events info This new /proc/perf_events file is used for real time d

Re: [PATCH 3/3 v2] perf tool: give user better message if precise is not supported

2012-09-14 Thread David Ahern
On 9/13/12 11:43 PM, Ingo Molnar wrote: v2: softened message to 'may not be' supported per Robert's suggestion Well, either it's supported on this machine or it's not - why does the text have to be so unsure about it? Because EOPNOTSUPP is returned for more than just precise mode. We cannot

Re: [PATCH 3/3 v2] perf tool: give user better message if precise is not supported

2012-09-14 Thread David Ahern
On 9/14/12 5:36 AM, Ingo Molnar wrote: Well, then that is useful information we *lost*, and that situation needs to be improved on the ABI side: an expanded error code present in the event structure, copied back to user-space on errors, or so. (Alternatively, a special event channel just to pass

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-09-14 Thread David Ahern
On 9/13/12 8:56 PM, Xiao Guangrong wrote: We'd better keep the record/report function, sometimes, we can only get perf.data from the customers whose machine can not be reached for us. Especially, other tracepoints are also interesting for us when the customers encounter the performance issue,

Re: perf script: rwtop: SIGALRM and pipe read race

2012-09-14 Thread David Ahern
On 9/14/12 9:39 AM, Andrew Jones wrote: I recently tried 'perf script rwtop', and it immediately failed with 'failed to read event header'. Running it through strace I found that the when rwtop.pl is reading from the pipe, and gets one of it's alarms, that the ERESTARTSYS seems to confuse it - c

[PATCH] perf kvm: move global variables into a perf_kvm struct

2012-10-02 Thread David Ahern
Cleans up the builtin-kvm code in preparation for the live mode. No functional changes; only code movement. Signed-off-by: David Ahern Cc: Dong Hao Cc: Runzhen Wang Cc: Xiao Guangrong Cc: Ingo Molnar --- tools/perf/builtin-kvm.c | 460 +- 1 file

[PATCH] perf tools: Fix ordering with unstable tsc

2012-10-05 Thread David Ahern
So this is still not a totally robust ordering but it's still better than what we had before. The only way to have a deterministic and solid ordering will be to use per cpu perf.data files. Reported-by: Stephane Eranian Signed-off-by: Frederic Weisbecker Signed-off-by: David Ahern Cc: Peter Zi

why is perf-report asking for objdump path?

2012-11-01 Thread David Ahern
$ /tmp/pbuild/perf report -i perf.data --kallsyms kallsyms Error: Please install objdump for i686. You can add it to PATH, set CROSS_COMPILE or override the default using --objdump. And worse it refuses to run without it. If I was running the annotate command I could understand the request --

Re: why is perf-report asking for objdump path?

2012-11-01 Thread David Ahern
On 11/1/12 7:11 PM, Namhyung Kim wrote: From f0a9d6303f83452c8b6f81081abae8fdf9c81778 Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Fri, 2 Nov 2012 09:48:17 +0900 Subject: [PATCH] perf tools: Use normalized arch name for searching objdump path David reported that perf report for i686 targ

Re: [tip:perf/core] perf tools: Remove the node from rblist in strlist__remove

2012-11-05 Thread David Ahern
On 11/3/12 2:07 PM, Hannes Frederic Sowa wrote: On Fri, Sep 7, 2012 at 8:04 AM, tip-bot for Suzuki K. Poulose wrote: Reported-by: Ananth N. Mavinakayanahalli Signed-off-by: Suzuki K. Poulose Acked-by: David Ahern Cc: Ananth N Mavinakayanahalli Cc: David Ahern Cc: Frederic Weisbecker Cc

Re: [PATCH RESEND 1/3] perf tools: Use normalized arch name for searching objdump path

2012-11-05 Thread David Ahern
. To prevent similar artifacts, normalize arch name when comparing host and file architectures. Reported-by: David Ahern Cc: David Ahern Cc: Irina Tirdea Signed-off-by: Namhyung Kim --- tools/perf/arch/common.c | 40 +--- 1 file changed, 33 insertions(

Re: [PATCH 2/3] perf tools: Introduce struct hist_browser_timer

2012-11-05 Thread David Ahern
nto a struct in order to reduce number of those unused arguments. This is a mechanical change and does not intend a functional change. Cc: David Ahern Cc: Irina Tirdea Signed-off-by: Namhyung Kim --- tools/perf/builtin-annotate.c | 2 +- tools/perf/builtin-report.c | 4 ++--

Re: [PATCH 3/3] perf report: Postpone objdump check until annotation requested

2012-11-05 Thread David Ahern
time doens't make sense. Reported-by: David Ahern Cc: Irina Tirdea Signed-off-by: Namhyung Kim --- tools/perf/builtin-report.c| 9 ++--- tools/perf/builtin-top.c | 3 ++- tools/perf/ui/browsers/hists.c | 22 -- tools/perf/util/hist.h | 7 +

Re: [PATCH 08/11] perf tool: precise mode requires exclude_guest

2012-07-25 Thread David Ahern
On 7/24/12 12:03 PM, Arnaldo Carvalho de Melo wrote: Em Tue, Jul 24, 2012 at 11:28:48AM -0600, David Ahern escreveu: On 7/24/12 10:15 AM, Robert Richter wrote: On AMD cpus precise_ip maps to IBS, which does not support hardware options as perfctrs do. Thus, following attr flags are not

[PATCH] perf top: error handling for counter creation should parallel perf-record

2012-07-29 Thread David Ahern
5a7ed29 fixed up perf-record but not perf-top. Similar argument holds for it -- fallback to PMU only if it does not exist and handle invalid attributes separately. Signed-off-by: David Ahern Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Frederic Weisbecker

[PATCH] perf tool: save cmdline from user in file header vs what is passed to record

2012-07-29 Thread David Ahern
-ag -- sleep 1 v2: simplified to saving the command in parse_options per Stephane's suggestion Signed-off-by: David Ahern CC: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian Cc: Frederic Weisbecker Cc: Peter Zijlstra --- tools/perf/bu

[PATCH] perf kvm: use strtol for walking guestmount directory

2012-07-29 Thread David Ahern
directory name to a pid. For example if guestmount contains a directory with the name 1foo, atoi converts it to a pid of 1 and a machine is created with a pid of 1. This is wrong; this directory really should be ignored. Use strtol to do that. Signed-off-by: David Ahern Cc: Arnaldo Carvalho de Melo Cc

[PATCH 0/4] limit guest messages to once in perf kvm top

2012-07-30 Thread David Ahern
Some refactoring so that strlist and intlist have a common base - rblist. >From there use intlist to only show guest messages once. David Ahern (4): perf tool: introducing rblist perf tool: change strlist to use the new rblist perf tool: introduce intlist perf kvm top: limit guest ker

[PATCH 3/4] perf tool: introduce intlist

2012-07-30 Thread David Ahern
Built on rblist - like strlist. Used in the next patch. Signed-off-by: David Ahern Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Frederic Weisbecker Cc: Peter Zijlstra --- tools/perf/Makefile |2 + tools/perf/util/intlist.c | 101

[PATCH 4/4] perf kvm top: limit guest kernel info message to once

2012-07-30 Thread David Ahern
'perf kvm top' shows a continual flurry of: Can't find guest [5201]'s kernel information if it can't find the guest info and with a lot of VMs running a user has no chance of reading them all. Limit message to once per guest. Signed-off-by: David Ahern Cc: Arnaldo C

[PATCH 1/4] perf tool: introducing rblist

2012-07-30 Thread David Ahern
rblist is the rbtree based code from strlist. It will be the common code for strlist and the to-be-introduced intlist. Signed-off-by: David Ahern Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Frederic Weisbecker Cc: Peter Zijlstra --- tools/perf/Makefile

[PATCH 2/4] perf tool: change strlist to use the new rblist

2012-07-30 Thread David Ahern
Replaces the direct use of rbtree code with the rblist API. In the end the patch is a no-op on strlist functionality; the API for strlist is not changed, only its implementaton. Signed-off-by: David Ahern Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc

Re: [PATCH 2/4] perf tools: configure shell path at compile time

2012-09-20 Thread David Ahern
On 9/20/12 4:13 PM, Irina Tirdea wrote: From: Irina Tirdea Shell path /bin/sh is hardcoded in various places in perf. Android has a different folder structure and does not have /bin/sh. Set the shell path at compile time in the Makefile by setting PERF_SHELL_PATH. By default it is set to /bin/

Re: [PATCH 1/4] perf tools: configure tmp path at build time

2012-09-21 Thread David Ahern
On 9/21/12 1:47 AM, Pekka Enberg wrote: diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index e2e8c69..eb671d5 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -1051,7 +1051,7 @@ int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter)

Re: [PATCH 0/3 v3] perf: precise mode and exclude_guest

2012-09-25 Thread David Ahern
On 9/13/12 2:59 PM, David Ahern wrote: Hopefully this wraps up the precise mode-exclude_guest dependency. I'm sure someone will let me know if I screwed up the attribution in the second patch. David Ahern (2): perf tool: precise mode requires exclude_guest perf tool: give user b

Re: [PATCH] perf record: add meta-data support for pipe-mode

2012-09-25 Thread David Ahern
I like the idea, but can't checkout the patch - does not apply to Arnaldo's latest perf/core branch. mind rebasing? David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.or

Re: [GIT PULL 0/9] perf/core improvements and fixes

2012-10-26 Thread David Ahern
On 10/26/12 8:54 AM, Ingo Molnar wrote: perf/core improvements: . perf inject changes to allow showing where a task sleeps, from Andrew Vagin. . Makefile improvements from Namhyung Kim. These are really useful: there used to be a couple of seconds of wait time at the beginning of every perf b

Re: [PATCH 00/11] perf tool: Add PERF_SAMPLE_READ sample read support

2012-10-26 Thread David Ahern
On 10/26/12 9:39 AM, Namhyung Kim wrote: hm, thats the unique sample_type issue again ;) Once we set PERF_SAMPLE_READ for event or group, we need to set it for all other events in session, otherwise the report fails Sorry, I don't understand why we need to set it for all events. Just setting i

Re: [PATCH 00/11] perf tool: Add PERF_SAMPLE_READ sample read support

2012-10-26 Thread David Ahern
On 10/26/12 10:25 AM, Namhyung Kim wrote: 2012-10-26 (금), 10:14 -0600, David Ahern: On 10/26/12 9:39 AM, Namhyung Kim wrote: hm, thats the unique sample_type issue again ;) Once we set PERF_SAMPLE_READ for event or group, we need to set it for all other events in session, otherwise the report

[PATCH 0/9 v2] perf: consolidate all the open counters loops

2012-10-29 Thread David Ahern
This patch set consolidates all of the open counters loops into a single common one. Rebased to latest perf/core. Added more hooks to ui stubs file. David Ahern (9): perf python: add ui stubs file perf top: make use of perf_record_opts perf evlist: introduce open counters method perf top

[PATCH 1/9] perf python: add ui stubs file

2012-10-29 Thread David Ahern
stdio based implementations of ui_ based functions for the python library. Needed for patch 3 - consolidating open counters method. Signed-off-by: David Ahern Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Frederic Weisbecker Cc: Peter Zijlstra --- tools/perf/util/python-ext-sources

[PATCH 2/9] perf top: make use of perf_record_opts

2012-10-29 Thread David Ahern
Changes top code to use the perf_record_opts struct. Stepping stone to consolidating the open counters code. Signed-off-by: David Ahern Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Frederic Weisbecker Cc: Peter Zijlstra --- tools/perf/builtin-top.c | 84

[PATCH 3/9] perf evlist: introduce open counters method

2012-10-29 Thread David Ahern
Superset of the open counters code in perf-top and perf-record - combining retry handling and error handling. Should be functionally equivalent. Signed-off-by: David Ahern Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Frederic Weisbecker Cc: Peter Zijlstra --- tools/perf/util/evlist.c

[PATCH 4/9] perf top: use the new perf_evlist__open_counters method

2012-10-29 Thread David Ahern
Remove open counters code with all the retry and error handling in favor of the new perf_evlist__open_counters method which is based on the top code. Signed-off-by: David Ahern Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Frederic Weisbecker Cc: Peter Zijlstra --- tools/perf/builtin

[PATCH 5/9] perf record: use the new perf_evlist__open_counters method

2012-10-29 Thread David Ahern
Remove open counters code with all the retry and error handling in favor of the new perf_evlist__open_counters method which is based on the existing code. Signed-off-by: David Ahern Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Frederic Weisbecker Cc: Peter Zijlstra --- tools/perf

[PATCH 6/9] perf stat: move user options to perf_record_opts

2012-10-29 Thread David Ahern
This is required for perf-stat to use perf_evlist__open_counters. And move opts to a stack variable. Signed-off-by: David Ahern Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Frederic Weisbecker Cc: Peter Zijlstra --- tools/perf/builtin-stat.c | 167

[PATCH 7/9] perf evlist: add stat unique code to open_counters method

2012-10-29 Thread David Ahern
perf-stat continues on some open failures. top and record opt out to maintain existing behavior. Signed-off-by: David Ahern Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Frederic Weisbecker Cc: Peter Zijlstra --- tools/perf/builtin-record.c |2 +- tools/perf/builtin-top.c|2

[PATCH 8/9] perf stat: move to perf_evlist__open_counters

2012-10-29 Thread David Ahern
Removes a lot of duplicated code moving to the common open method. Signed-off-by: David Ahern Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Frederic Weisbecker Cc: Peter Zijlstra --- tools/perf/builtin-stat.c | 103 ++--- 1 file changed, 22

[PATCH 9/9] perf evsel: remove perf_evsel__open_per_cpu

2012-10-29 Thread David Ahern
No longer needed with perf-stat converted to perf_evlist__open_counters. Signed-off-by: David Ahern Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Frederic Weisbecker Cc: Peter Zijlstra --- tools/perf/util/evsel.c |6 -- tools/perf/util/evsel.h |2 -- 2 files changed, 8

  1   2   3   4   5   6   7   8   9   10   >