Re: [PATCH 03/32] perf tools: Kbuild source related fixies

2014-06-03 Thread David Ahern
On 6/3/14, 4:05 PM, Alexis Berlemont wrote: From: Jiri Olsa Fixing several sources config dependencies to allow separate config builds. Signed-off-by: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Paul Mackerras Cc: Corey Ashford Cc: Frederic Weisbecker C

Re: [PATCH 11/13] perf tests: Allow reuse of test_file function

2014-06-03 Thread David Ahern
On 6/3/14, 9:35 AM, Jiri Olsa wrote: + static char buf_templ[sizeof(TEMPL)]; why static? and ... I need to use it outside the test_file function Oh, it's a return variable. David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to

Re: perf tools[ARM]:Not able to detect [kernel.kallsyms] dso on Qualcomm MSM 8974

2014-06-03 Thread David Ahern
On 6/3/14, 8:02 AM, Prankul Garg wrote: Qualcomm MSM 8974 is not able to detect [kernel.kallsyms] dso either with Hardware or Tracepoint events while Exynos do. Add -v to perf-record and perf-report. And try: perf report -D | grep kallsyms Do you see something like: 0 0 0xd8 [0x58]: PERF_RECO

Re: [PATCH 13/13] perf tests: Add test for closing dso objects on EMFILE error

2014-06-03 Thread David Ahern
On 6/2/14, 3:18 PM, Jiri Olsa wrote: Testing that perf properly closes opened dso objects and tries to reopen in case we run out of allowed file descriptors for dso data. Reviewed by: David Ahern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the

Re: [PATCH 12/13] perf tests: Add test for caching dso file descriptors

2014-06-03 Thread David Ahern
On 6/2/14, 3:18 PM, Jiri Olsa wrote: +static int dsos__create(int cnt, int size) +{ + int i; + + dsos = malloc(sizeof(dsos) * cnt); + TEST_ASSERT_VAL("failed to alloc dsos array", dsos); + + for (i = 0; i < cnt; i++) { + char *file; + + file = t

Re: [PATCH 11/13] perf tests: Allow reuse of test_file function

2014-06-03 Thread David Ahern
On 6/2/14, 3:18 PM, Jiri Olsa wrote: Making the test_file function to be reusable for new tests coming in following patches. Cc: Arnaldo Carvalho de Melo Cc: Corey Ashford Cc: David Ahern Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Jean Pihet Cc: Namhyung Kim Cc: Paul Mackerras Cc

Re: [PATCH 10/13] perf tests: Spawn child for each test

2014-06-03 Thread David Ahern
On 6/2/14, 3:18 PM, Jiri Olsa wrote: In upcoming tests we will setup process limits, which might affect other tests. Spawning child for each test to prevent this. Reviewed-by: David Ahern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

Re: [PATCH 09/13] perf tools: Add dso__data_* interface descriptons

2014-06-03 Thread David Ahern
On 6/2/14, 3:18 PM, Jiri Olsa wrote: Adding descriptions/explanations for dso__data_* interface functions. Shouldn't the descriptions be added when the functions are? David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.ke

Re: [PATCH 06/13] perf tools: Cache dso data file descriptor

2014-06-03 Thread David Ahern
On 6/2/14, 3:18 PM, Jiri Olsa wrote: +static rlim_t get_fd_limit(void) +{ + struct rlimit l; + rlim_t limit = 0; + + /* Allow half of the current open fd limit. */ + if (getrlimit(RLIMIT_NOFILE, &l) == 0) { + if (l.rlim_cur == RLIM_INFINITY) +

Re: [PATCH 06/13] perf tools: Cache dso data file descriptor

2014-06-03 Thread David Ahern
On 6/2/14, 3:18 PM, Jiri Olsa wrote: We keep dsos data file descriptors open until their count reaches the half of the current fd open limit (RLIMIT_NOFILE). In this case we close file descriptor of the first opened dso object. We've got overall speedup (24% for my workload) of report: 'perf r

Re: [PATCH 1/2] perf tools: add cat as fallback pager

2014-05-16 Thread David Ahern
On 5/16/14, 5:14 PM, Stephane Eranian wrote: From: Michael Lentine This patch adds a fallback to cat for the pager. This is useful on environmnents, such as Android, where less does not exist. It is better to default to cat than to abort. Reviewed-by: Stephane Eranian Signed-off-by: Michael L

Re: [PATCH 00/34] perf and kconfig / kbuild

2014-05-13 Thread David Ahern
On 5/13/14, 4:02 PM, Alexis Berlemont wrote: Hello, A few months ago, I tried to make a proposal to introduce Kconfig in perf's generation procedure. (cf. https://lkml.org/lkml/2013/12/20/511) I started from David Ahern's work; I was not aware that Jiri Olsa pushed further the idea and proposed

Re: [PATCH] perf tools: Use tid for finding thread

2014-05-07 Thread David Ahern
bug when each thread has different name, it only reports a main thread for samples in other threads. Cc: Adrian Hunter Cc: David Ahern Cc: Stephane Eranian Signed-off-by: Namhyung Kim Acked-by: David Ahern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel&qu

Re: [PATCH 3/3] perf tools: Clarify the output of perf sched map.

2014-05-05 Thread David Ahern
On 5/5/14, 12:24 PM, Jiri Olsa wrote: On Mon, May 05, 2014 at 04:05:55PM +0900, Dongsheng Yang wrote: From: Dongsheng In output of perf sched map, any shortname of thread will be explained at the first time when it appear. Example: *A0 228836.978985 secs A0 => perf:23032

Re: [PATCH 08/11] perf kvm: allow for variable string sizes

2014-05-05 Thread David Ahern
On 5/5/14, 4:27 AM, Christian Borntraeger wrote: diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index 922706c..806c0e4 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c @@ -75,7 +75,7 @@ struct kvm_events_ops { bool (*is_end_event)(struct perf_evsel *e

Re: [PATCH/RFC 00/11] perf/s390/kvm: trace events, perf kvm stat

2014-05-02 Thread David Ahern
perf tools changes look good to me Review feedback is welcome. CC-ing David Ahern I don't have the original emails, but looking at https://lkml.org/lkml/2014/4/25/331 [PATCH 01/11] s390: add sie exit reasons tables [PATCH 02/11] KVM: s390: Use trace tables from sie.h [PATCH 03/11] KVM: s390:

Re: [PATCH] perf tests: Add static build make test

2014-04-29 Thread David Ahern
sts/make make_static_O - make_static_O: cd . && make -f Makefile O=/tmp/tmp.Ay6r3wEmtX DESTDIR=/tmp/tmp.vK0KQwO0Vi LDFLAGS=-static Cc: Arnaldo Carvalho de Melo Cc: Corey Ashford Cc: David Ahern Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter

Re: [PATCH] perf tools: Fix bfd dependency libraries detection

2014-04-28 Thread David Ahern
On 4/28/14, 9:17 AM, Jiri Olsa wrote: On Mon, Apr 28, 2014 at 09:01:57AM -0600, David Ahern wrote: On 4/28/14, 3:22 AM, Jiri Olsa wrote: From: Jiri Olsa There's false assumption in the library detection code assuming -liberty and -lz are always present once bfd is detected. The fai

Re: [PATCH] perf tools: Fix bfd dependency libraries detection

2014-04-28 Thread David Ahern
hford Cc: David Ahern Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Signed-off-by: Jiri Olsa --- tools/perf/config/Makefile | 34 +++--- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/tools

Re: [PATCH 2/3] perf tools: Cache dso data file descriptor

2014-04-28 Thread David Ahern
On 4/28/14, 7:16 AM, Namhyung Kim wrote: 2014-04-28 (월), 12:01 +0200, Jiri Olsa: On Sun, Apr 27, 2014 at 11:36:35PM +0900, Namhyung Kim wrote: 2014-04-17 (목), 19:39 +0200, Jiri Olsa: Keeping the data file description open for the whole life of the dso object. I suspect there might be an issu

Re: [PATCH 3/5] perf tools: Reference count map_groups objects

2014-04-23 Thread David Ahern
On 4/23/14, 10:31 AM, Jiri Olsa wrote: thoughts?;-) thanks, Only that libperf is still a pipe dream. Don't hold up progress for this, but we should be thinking about making it thread safe. David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a mess

Re: mapping instructions to dynamic languages like java, python, ruby

2014-04-22 Thread David Ahern
On 4/22/14, 1:05 PM, Stephane Eranian wrote: I intend to contribute that code for perf once it is finalized. Note that it uses a module developed by Sonny Rao to export the perf timestamp time source via a posix-clock. This clock discussion has been going on for a while and never reached a conclu

Re: [PATCH] perf tools: Fix pmu object compilation error

2014-04-16 Thread David Ahern
ree_terms(&list); return ret; } - list_add_tail(&clone->list, &list); + list_add_tail(&cloned->list, &list); } list_splice(&list, terms); return 0; Acked-by: David Ahern --

Re: [PATCH 3/5] perf tools: Reference count map_groups objects

2014-04-15 Thread David Ahern
On 4/15/14, 3:56 AM, Jiri Olsa wrote: hum.. I think using atomic type is not enough, we'd need to make map_groups__put/get atomic as well not sure what's the support in user space for that.. will check also not to be negative, but libperf is not thread safe anyway, right? ;-) should be. pret

Re: [PATCH 3/5] perf tools: Reference count map_groups objects

2014-04-14 Thread David Ahern
On 4/14/14, 9:52 AM, Jiri Olsa wrote: From: Arnaldo Carvalho de Melo We will share it among threads in the same process. Signed-off-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: David Ahern Cc: Don Zickus Cc: Frederic Weisbecker Cc: Mike Galbraith Cc: Namhyung Kim Cc: Paul

Re: [PATCH] perf machine: Search for modules in %s/lib/modules/%s

2014-04-11 Thread David Ahern
et_modules_path(struct machine *machine) if (!version) return -1; - snprintf(modules_path, sizeof(modules_path), "%s/lib/modules/%s/kernel", + snprintf(modules_path, sizeof(modules_path), "%s/lib/modules/%s", machine->root_

Re: [PULL 2/2] perf-kvm: fix of 'Min time' counting in report command

2014-04-09 Thread David Ahern
y; + init_stats(&event->total.stats); return event; } Reviewed-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.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] perf: make perf script actually spit out backtraces for events

2014-03-26 Thread David Ahern
On 3/26/14, 12:57 PM, Josef Bacik wrote: We are trying to debug a problem internally and noticed that if we use perf record -g -e and then try to use perf script to get the events and their backtraces that we weren't getting the backtraces, even though they were collected and would show up with

Re: [RFC/PATCHSET 00/14] perf report: Add -F option for specifying output fields (v2)

2014-03-18 Thread David Ahern
On 3/18/14, 7:30 PM, Namhyung Kim wrote: Hi David, On Tue, Mar 18, 2014 at 3:07 PM, David Ahern wrote: On 3/18/14, 12:32 AM, Namhyung Kim wrote: This is a patchset implementing -F/--field option to setup output field/column as Ingo requested. It depends on my perf/percentage patchset (with

Re: [RFC/PATCHSET 00/14] perf report: Add -F option for specifying output fields (v2)

2014-03-18 Thread David Ahern
On 3/18/14, 12:32 AM, Namhyung Kim wrote: This is a patchset implementing -F/--field option to setup output field/column as Ingo requested. It depends on my perf/percentage patchset (with minor updates) [1]. perf-report should be consistent with perf-script which uses --fields. David -- To un

Re: [PATCH 0/4] perf: trivial follow-ons to --list-cmds

2014-03-15 Thread David Ahern
-list-cmds for use by scripts perf mem: introduce --list-cmds for use by scripts perf lock: introduce --list-cmds for use by scripts perf sched: introduce --list-cmds for use by scripts All 4 look good to me. Acked-by: David Ahern -- To unsubscribe from this list: send the line "un

Re: [PATCH 01/10] perf, tools: Add jsmn `jasmine' JSON parser

2014-03-15 Thread David Ahern
On 3/14/14, 8:27 PM, Andi Kleen wrote: On Fri, Mar 14, 2014 at 04:41:31PM -0600, David Ahern wrote: On 3/14/14, 3:31 PM, Andi Kleen wrote: @@ -374,6 +376,8 @@ LIB_OBJS += $(OUTPUT)util/stat.o LIB_OBJS += $(OUTPUT)util/record.o LIB_OBJS += $(OUTPUT)util/srcline.o LIB_OBJS += $(OUTPUT)util

Re: [PATCH 01/10] perf, tools: Add jsmn `jasmine' JSON parser

2014-03-14 Thread David Ahern
On 3/14/14, 3:31 PM, Andi Kleen wrote: @@ -374,6 +376,8 @@ LIB_OBJS += $(OUTPUT)util/stat.o LIB_OBJS += $(OUTPUT)util/record.o LIB_OBJS += $(OUTPUT)util/srcline.o LIB_OBJS += $(OUTPUT)util/data.o +LIB_OBJS += $(OUTPUT)util/jsmn.o +LIB_OBJS += $(OUTPUT)util/json.o LIB_OBJS += $(OUTPUT)ui/

Re: [PATCH] perf/x86/intel: Use rdmsrl_safe when initializing RAPL PMU.

2014-03-14 Thread David Ahern
On 3/14/14, 10:17 AM, Andi Kleen wrote: The Intel ISR section for RDMSR seems to say: "Specifying a reserved or unimplemented MSR address in ECX will also cause a general protection exception". From a guest's perspective, MSR_RAPL_POWER_UNIT is unimplemented; kvm matches this behavior. MSRs a

Re: [PATCH] perf kvm: introduce --list-cmds for use by scripts

2014-03-04 Thread David Ahern
On 3/3/14, 6:26 PM, Ramkumar Ramachandra wrote: Introduce $ perf kvm --list-cmds to dump a raw list of commands for use by the completion script. In order to do this, introduce parse_options_subcommand() for handling subcommands as a special case in the parse-options machinery. Cc: David

Re: [PATCH 2/2] perf tools: Fix strict alias issue for find_first_bit

2014-02-28 Thread David Ahern
On 2/28/14, 2:29 PM, Peter Zijlstra wrote: Hurm; didn't I suggest using -fno-strict-aliasing just like the kernel does? Because the C aliasing rules are bonghits heavy? you, and Ingo in 2009 -- 65014ab3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of

Re: [PATCH v3 00/14] perf, x86: Haswell LBR call stack support

2014-02-26 Thread David Ahern
On 2/26/14, 1:53 PM, Andi Kleen wrote: Is there some reason not to enable frame pointers? It makes code slower. Sure there is some overhead because of the push, mov, pop instructions per function. But, take for example the simple program below. Compile with and without frame pointers gcc

Re: [PATCH v3 00/14] perf, x86: Haswell LBR call stack support

2014-02-26 Thread David Ahern
On 2/26/14, 12:25 PM, Andy Lutomirski wrote: On Wed, Feb 26, 2014 at 11:19 AM, David Ahern wrote: On 2/26/14, 11:59 AM, Andy Lutomirski wrote: I wonder if anyone who uses perf for userspace profiling *ever* uses FP and gets away with it. There's precious little userspace software com

Re: [PATCH v3 00/14] perf, x86: Haswell LBR call stack support

2014-02-26 Thread David Ahern
On 2/26/14, 11:59 AM, Andy Lutomirski wrote: I wonder if anyone who uses perf for userspace profiling *ever* uses FP and gets away with it. There's precious little userspace software compiled with frame pointers these days on most architectures. yes and yes. With control over the entire stack

Re: [PATCH] n_tty: Fix poll() when TIME_CHAR and MIN_CHAR == 0

2014-02-11 Thread David Ahern
ME_CHAR(tty) ? MIN_CHAR(tty) : 1; + int amt = poll && !TIME_CHAR(tty) && MIN_CHAR(tty) ? MIN_CHAR(tty) : 1; if (ldata->icanon && !L_EXTPROC(tty)) { if (ldata->canon_head != ldata->read_tail) Worked for me. Tested-by: David Ahern

Re: [BUG] perf top: --stdio causes continuous refresh

2014-02-06 Thread David Ahern
On 2/6/14, 8:24 AM, Stephane Eranian wrote: On Thu, Feb 6, 2014 at 3:09 PM, Arnaldo Carvalho de Melo wrote: Em Thu, Feb 06, 2014 at 12:07:05PM -0200, Arnaldo Carvalho de Melo escreveu: Em Thu, Feb 06, 2014 at 02:58:01PM +0100, Stephane Eranian escreveu: On Thu, Feb 6, 2014 at 2:56 PM, Arnaldo

Re: [PATCH] Perf: Correct Assumptions about Sample Timestamps in Passes

2014-01-12 Thread David Ahern
On 1/9/14, 8:19 AM, Frederic Weisbecker wrote: On Wed, Jan 08, 2014 at 02:48:37PM -0700, David Ahern wrote: The existing code does not work. Your unstable tsc patch did not work. I have not tried Joseph's patch. Are you proposing that one or do you have something else in mind? I thi

Re: [PATCH 1/9] perf, tools: fix BFD detection on opensuse

2014-01-12 Thread David Ahern
On 1/11/14, 12:42 PM, Andi Kleen wrote: From: Andi Kleen opensuse libbfd requires -lz -liberty to build. Add those to the BFD feature detection. Fixes static builds on Fedora as well. David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message t

Re: [PATCH 6/8] perf tools: Make --raw-dump work as a proper option for perf list.

2014-01-10 Thread David Ahern
On 1/9/14, 7:36 AM, Dongsheng Yang wrote: On 01/08/2014 04:44 PM, David Ahern wrote: On 1/8/14, 8:20 AM, Arnaldo Carvalho de Melo wrote: Em Mon, Dec 30, 2013 at 10:26:41AM -0500, Dongsheng Yang escreveu: >Ramkumar reported that perf list --raw-dump was broken by 44d742e. >Fix by maki

Re: [PATCH] Perf: Correct Assumptions about Sample Timestamps in Passes

2014-01-08 Thread David Ahern
On 1/4/14, 8:05 AM, Frederic Weisbecker wrote: On Fri, Jan 03, 2014 at 03:45:36PM -0700, David Ahern wrote: On 1/3/14, 3:07 PM, Frederic Weisbecker wrote: I'm not sure I understand why we need that. Why doesn't it work by simply flushing events prior to the earliest timestamp among

Re: [PATCH 6/8] perf tools: Make --raw-dump work as a proper option for perf list.

2014-01-08 Thread David Ahern
On 1/8/14, 8:20 AM, Arnaldo Carvalho de Melo wrote: Em Mon, Dec 30, 2013 at 10:26:41AM -0500, Dongsheng Yang escreveu: >Ramkumar reported that perf list --raw-dump was broken by 44d742e. >Fix by making raw-dump a proper argument. > >Signed-off-by: David Ahern Are you sure David S

Re: [PATCH] Perf: Correct Assumptions about Sample Timestamps in Passes

2014-01-03 Thread David Ahern
On 1/3/14, 3:07 PM, Frederic Weisbecker wrote: On Wed, Jan 01, 2014 at 11:37:55AM -0700, David Ahern wrote: On 12/26/13, 8:30 AM, Frederic Weisbecker wrote: On Thu, Dec 26, 2013 at 10:24:03AM -0500, David Ahern wrote: On 12/26/13, 10:14 AM, Frederic Weisbecker wrote: I was carrying that

Re: [PATCH] Perf: Correct Assumptions about Sample Timestamps in Passes

2014-01-01 Thread David Ahern
On 12/26/13, 8:30 AM, Frederic Weisbecker wrote: On Thu, Dec 26, 2013 at 10:24:03AM -0500, David Ahern wrote: On 12/26/13, 10:14 AM, Frederic Weisbecker wrote: I was carrying that patch while working on perf-kvm-stat-live last Fall. It does not solve the problem for live commands, so ended up

Re: [PATCH -tip v2 1/2] [CLEANUP] perf-probe: Expand given path to absolute path

2013-12-27 Thread David Ahern
On 12/27/13, 1:14 AM, Masami Hiramatsu wrote: Nowhere, since there is no terminal code for user command interface. Those memories are released when the program terminated. I think it is just a waste of the time to free the memory pieces which are not used(and allocated) repeatedly. Or, is there

Re: [PATCH] Perf: Correct Assumptions about Sample Timestamps in Passes

2013-12-26 Thread David Ahern
On 12/26/13, 10:14 AM, Frederic Weisbecker wrote: I was carrying that patch while working on perf-kvm-stat-live last Fall. It does not solve the problem for live commands, so ended up dropping it and going with local (to the command) hacks. I still think for live commands getting a perf_clock tim

Re: [PATCH 4/8] perf tools: Introduce struct perf_log

2013-12-26 Thread David Ahern
On 12/26/13, 12:38 AM, Namhyung Kim wrote: diff --git a/tools/perf/util/log.c b/tools/perf/util/log.c new file mode 100644 index ..3838d49f82de --- /dev/null +++ b/tools/perf/util/log.c @@ -0,0 +1,105 @@ +#include +#include +#include "util/debug.h" + +#define LINEMAP_GROW 128 + +st

Re: [PATCH -tip v2 2/2] perf-probe: Support basic dwarf-based operations on uprobe events

2013-12-26 Thread David Ahern
On 12/26/13, 12:41 AM, Masami Hiramatsu wrote: And this shows the available variables at the given line of the function. # ./perf probe -x perf --vars map__load:8 Available variables at map__load:8 @ char* name struct map* map

Re: [PATCH] perf stat: Do not show stats if workload fails

2013-12-26 Thread David Ahern
On 12/26/13, 9:15 AM, Arnaldo Carvalho de Melo wrote: Right, but I can't apply that patch, as it makes 'perf stat whatever-workload' to fail, as I realized when doing a demo to someone interested in using perf ;-\ So for now I'm not applying that one. right, so you want one with < 0 check or w

Re: [PATCH -tip v2 1/2] [CLEANUP] perf-probe: Expand given path to absolute path

2013-12-26 Thread David Ahern
On 12/26/13, 12:41 AM, Masami Hiramatsu wrote: @@ -180,7 +181,20 @@ static int opt_set_target(const struct option *opt, const char *str, else return ret; - params.target = str; + /* Expand given path to absolute path, except fo

Re: [PATCH] perf stat: Do not show stats if workload fails

2013-12-26 Thread David Ahern
On 12/24/13, 8:30 AM, Arnaldo Carvalho de Melo wrote: Em Tue, Dec 24, 2013 at 09:53:42AM -0300, Arnaldo Carvalho de Melo escreveu: >The thing to check is perf_evlist__{prepare,start}_workload notification >errors using SIGUSR1, that we need to check for in the caller, and emit >the message, no?

Re: [PATCH] perf probe: Improve error message when function not found

2013-12-26 Thread David Ahern
Masami: If you do not have any problems with this version please Ack so Arnaldo will pick it up. Thanks, David On 12/20/13, 1:04 PM, David Ahern wrote: When requesting a function from a userspace library the error message to the user is less than helpful. e.g., perf probe -x /lib64

Re: [PATCH] perf stat: Do not show stats if workload fails

2013-12-23 Thread David Ahern
On 12/23/13, 2:37 PM, Arnaldo Carvalho de Melo wrote: int perf_evlist__start_workload(struct perf_evlist *evlist) { if (evlist->workload.cork_fd > 0) { char bf = 0; int ret; /* * Remove the cork, let it rip!

Re: [PATCH] Perf: Correct Assumptions about Sample Timestamps in Passes

2013-12-23 Thread David Ahern
On 12/23/13, 8:10 AM, Frederic Weisbecker wrote: On Fri, Dec 20, 2013 at 10:09:53AM -0700, David Ahern wrote: On 12/20/13, 5:27 AM, Joseph Schuchart wrote: I know this comes late, but: As far as I can see, your change does not preserve the logic of the code I suggested. The idea was to first

Re: perf and Kconfig

2013-12-20 Thread David Ahern
iki (https://perf.wiki.kernel.org/index.php/Todo). I tried to continue the work started by David Ahern (https://github.com/dsahern/linux.git branch:perf-config). This version relies on the features detection tests available in linux/tools/perf/config/feature-checks so as to enable some configuration options (a

[PATCH] perf probe: Improve error message when function not found

2013-12-20 Thread David Ahern
libpthread-2.14.90.so -a 'lock_full=__pthread_mutex_lock_full' no symbols found in /lib64/libpthread-2.14.90.so, maybe install a debug package? Failed to find function in /lib64/libpthread-2.14.90.so. Perhaps it is a local variable? Error: Failed to add events. (-22) Signed-off

Re: [PATCH] Perf: Correct Assumptions about Sample Timestamps in Passes

2013-12-20 Thread David Ahern
On 12/20/13, 5:27 AM, Joseph Schuchart wrote: I know this comes late, but: As far as I can see, your change does not preserve the logic of the code I suggested. The idea was to first gather all the maximum timestamps of all cpus (that is, the last timestamp seen on each cpu) and then determine th

Re: [PATCH 0/7 V2] Add support of user space symboles for guest.

2013-12-20 Thread David Ahern
On 12/20/13, 1:52 PM, Dongsheng Yang wrote: Hi Arnaldo: Please help to review this patchset. Changelog: - v2: * splite the first commit. At best you are creating knowledge of running tasks in the VMs when the perf session is started. That's it. That informatio

[PATCH] perf stat: Do not show stats if workload fails

2013-12-19 Thread David Ahern
perf-stat should not try to print stats. With this change: $ perf stat -v -- foo Failed to start workload Signed-off-by: David Ahern Cc: Ingo Molnar Cc: Stephane Eranian --- tools/perf/builtin-stat.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/pe

Re: [PATCH V3] perf tools: Fix bug for perf kvm report without guestmount.

2013-12-19 Thread David Ahern
lsyms] [g] __switch_to 7.91%:6471 [guest.kernel.kallsyms] [g] scheduler_tick 1.75%:6471 [guest.kernel.kallsyms] [g] native_apic_mem_write 0.21%:6471 [guest.kernel.kallsyms] [g] apic_timer_interrupt Signed-off-by: Dongsheng Yang Acked-by: D

Re: [PATCH V2] perf tools: Fix bug for perf kvm report without guestmount.

2013-12-19 Thread David Ahern
] [unknown] [g] 0x8164f330 This bug was introduced by 207b57926 (perf kvm: Fix regression with guest machine creation). commit 207b5792696206663a38e525b9793644895bad3b Author: David Ahern Date: Sun Jul 1 16:11:37 2012 -0600 perf kvm: Fix regression with guest machine creation

Re: [PATCH 0/4] Add support of guest user space symbols for perf kvm command.

2013-12-19 Thread David Ahern
On 12/19/13, 8:34 AM, Ingo Molnar wrote: Btw., having to specify a '--guestmount /tmp/guestmount/' just to achieve a natural feature (proper guest symbol resolution) is a poor user interface, obviously. Is there perhaps a predictable pattern as to where qemu (or libvirt) puts a user's guest mou

Re: [PATCH 5/5 v2] perf timechart: add emphasize option

2013-12-17 Thread David Ahern
On 12/17/13, 7:15 AM, Arnaldo Carvalho de Melo wrote: Just tried it here, and on fedora 18 one doesn't even needs the --color=always, Default aliases: $ alias alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' alias grep='grep --color=auto' -- To unsubscribe from this list: sen

[tip:perf/core] perf tools: Fix inverted error verification bug in thread__fork

2013-12-16 Thread tip-bot for David Ahern
Commit-ID: 8d00be815c05ed0f0202f606bab4e54f98fd3b30 Gitweb: http://git.kernel.org/tip/8d00be815c05ed0f0202f606bab4e54f98fd3b30 Author: David Ahern AuthorDate: Tue, 10 Dec 2013 21:35:38 -0700 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 13 Dec 2013 10:30:21 -0300 perf tools

Re: [PATCH v0 07/71] perf tools: Record whether a dso is 64-bit

2013-12-15 Thread David Ahern
On 12/11/13, 5:36 AM, Alexander Shishkin wrote: diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index a0c7c59..80817ec 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c @@ -446,6 +446,7 @@ struct dso *dso__new(const char *name) dso->cache = RB_ROOT;

Re: [PATCH] perf kvm: introduce --list-cmds for use by scripts

2013-12-12 Thread David Ahern
On 12/12/13, 10:26 AM, Ramkumar Ramachandra wrote: Introduce $ perf kvm --list-cmds to dump a raw list of commands for use by the completion script. While at it, refactor kvm_usage so that there's only one copy of the command listing. Cc: David Ahern Cc: Arnaldo Carvalho de Melo S

Re: [PATCH v0 07/71] perf tools: Record whether a dso is 64-bit

2013-12-12 Thread David Ahern
On 12/12/13, 12:05 PM, Arnaldo Carvalho de Melo wrote: Well, if we can pass somehow the magic number of an executable mmap in the PERF_RECORD_MMAP2 record, we would be able, together with the data we already have in the perf.data header (uname in a live session), to figure that out, no? Sure,

Re: [PATCH] perf list: fix --raw-dump

2013-12-12 Thread David Ahern
On 12/12/13, 12:34 AM, Ramkumar Ramachandra wrote: David Ahern wrote: Why not make raw_dump a proper argument? Sure, that'd work too. I was thinking of a minimal way to fix the problem myself. diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c index 011195e

Re: [PATCH 1/2] perf completion: complete 'perf kvm'

2013-12-12 Thread David Ahern
On 12/12/13, 2:09 AM, Ramkumar Ramachandra wrote: David Ahern wrote: I don't like the command list being embedded in the completion script. It will get outdated quickly. I could introduce a $ perf kvm --list-cmds but that would mean a printf("record report stat ..") i

Re: [PATCH v0 07/71] perf tools: Record whether a dso is 64-bit

2013-12-12 Thread David Ahern
On 12/12/13, 5:05 AM, Adrian Hunter wrote: diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h index 384f2d9..62680e1 100644 --- a/tools/perf/util/dso.h +++ b/tools/perf/util/dso.h @@ -91,6 +91,7 @@ struct dso { u8 annotate_warned:1; u8 sname_alloc:1;

Re: [PATCH v0 13/71] perf tools: Add machine__get_thread_pid()

2013-12-11 Thread David Ahern
On 12/11/13, 2:18 PM, Andi Kleen wrote: David Ahern writes: Are you looking up the current or next task? If the former why not use sample->pid rather than parsing the sched_switch tracepoint? The itrace stream doesn't have a pid field, and it needs the exact time stamp of the switc

Re: [PATCH] perf list: fix --raw-dump

2013-12-11 Thread David Ahern
Mon Sep 17 00:00:00 2001 From: David Ahern Date: Wed, 11 Dec 2013 14:00:20 -0700 Subject: [PATCH] perf list: Fix raw-dump arg Ramkumar reported that perf list --raw-dump was broken by 44d742e. Fix by making raw-dump a proper argument. Signed-off-by: David Ahern Cc: Ingo Molnar Cc: Arnaldo Carva

Re: [PATCH v0 14/71] perf tools: Add cpu to struct thread

2013-12-11 Thread David Ahern
On 12/11/13, 12:55 PM, Arnaldo Carvalho de Melo wrote: Em Wed, Dec 11, 2013 at 12:30:40PM -0700, David Ahern escreveu: On 12/11/13, 5:36 AM, Alexander Shishkin wrote: diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index 55f3608..52fbfb6 100644 --- a/tools/perf/util

Re: [PATCH 1/2] perf completion: complete 'perf kvm'

2013-12-11 Thread David Ahern
On 12/11/13, 12:50 PM, Arnaldo Carvalho de Melo wrote: Em Wed, Dec 11, 2013 at 04:04:15PM +0530, Ramkumar Ramachandra escreveu: Currently, there is no way to enumerate the subcommands under 'perf kvm', so hardcode them. [acme@ssdandy linux]$ perf kvm -h 2>&1 | grep usage usage: perf kvm [] {

Re: [PATCH v0 54/71] perf script: Always allow fields 'addr' and 'cpu' for itrace

2013-12-11 Thread David Ahern
On 12/11/13, 5:37 AM, Alexander Shishkin wrote: From: Adrian Hunter If a file contains Instruction Tracing data then always allow fields 'addr' and 'cpu' to be selected as options for perf script. This is necessary because Instruction Trace decoding may synthesize events with that information.

Re: [PATCH v0 27/71] perf evlist: Add 'system_wide' option

2013-12-11 Thread David Ahern
On 12/11/13, 5:36 AM, Alexander Shishkin wrote: From: Adrian Hunter Add an option to cause a selected event to be opened always without a pid when configured by perf_evsel__config(). This is needed when using the sched_switch tracepoint to follow object code execution. sched_switch occurs befo

Re: [PATCH v0 14/71] perf tools: Add cpu to struct thread

2013-12-11 Thread David Ahern
On 12/11/13, 5:36 AM, Alexander Shishkin wrote: diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index 55f3608..52fbfb6 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -1412,3 +1412,29 @@ pid_t machine__get_thread_pid(struct machine *machine, pid_t ti

Re: [PATCH v0 13/71] perf tools: Add machine__get_thread_pid()

2013-12-11 Thread David Ahern
On 12/11/13, 5:36 AM, Alexander Shishkin wrote: From: Adrian Hunter Add a function to get the pid from the tid. This is needed when using the sched_switch tracepoint to follow object code execution. sched_switch identifies the thread but, to find the process mmaps, we need the process pid. A

Re: [PATCH v0 07/71] perf tools: Record whether a dso is 64-bit

2013-12-11 Thread David Ahern
On 12/11/13, 5:36 AM, Alexander Shishkin wrote: diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index a0c7c59..80817ec 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c @@ -446,6 +446,7 @@ struct dso *dso__new(const char *name) dso->cache = RB_ROOT;

[tip:perf/core] perf trace: Fix summary percentage when processing files

2013-12-11 Thread tip-bot for David Ahern
Commit-ID: 3160565f0e005d2ec736ae25cf0a79988c0cbe71 Gitweb: http://git.kernel.org/tip/3160565f0e005d2ec736ae25cf0a79988c0cbe71 Author: David Ahern AuthorDate: Wed, 4 Dec 2013 19:41:41 -0700 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 5 Dec 2013 10:09:58 -0300 perf trace: Fix

[tip:perf/core] perf trace: Add support for syscalls vs raw_syscalls

2013-12-11 Thread tip-bot for David Ahern
Commit-ID: 9aca7f1792c5d2d5d367bbe5cfe204fe40517929 Gitweb: http://git.kernel.org/tip/9aca7f1792c5d2d5d367bbe5cfe204fe40517929 Author: David Ahern AuthorDate: Wed, 4 Dec 2013 19:41:39 -0700 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 5 Dec 2013 10:05:45 -0300 perf trace: Add

[PATCH] perf tool: Fix bug in thread__fork

2013-12-10 Thread David Ahern
Commit 1902efe7f for the new comm infra added the wrong check for return code on thread__set_comm. err == 0 is normal, so don't return at that point unless err != 0. Signed-off-by: David Ahern Cc: Frederic Weisbecker --- tools/perf/util/thread.c | 2 +- 1 file changed, 1 insertion(

Re: [PATCH V3] perf tools: Change the default filenames for perf kvm diff to perf.data.xxx and perf.data.xxx.old

2013-12-10 Thread David Ahern
On 12/11/13, 9:30 AM, Dongsheng Yang wrote: @@ -1001,8 +1002,28 @@ static int data_init(int argc, const char **argv) use_default = false; } } else if (perf_guest) { - defaults[0] = "perf.data.host"; - defaults[1] = "perf.

Re: [PATCH 1/2] tools/: Convert to new topic libraries

2013-12-10 Thread David Ahern
On 12/9/13, 9:14 AM, Borislav Petkov wrote: From: Borislav Petkov Move debugfs.* to api/fs/. We have a common tools/lib/api/ place where the Makefile lives and then we place the headers in subdirs. For example, all the fs-related stuff goes to tools/lib/api/fs/ from which we get libapikfs.a (ac

[PATCH] perf: POSIX CLOCK_PERF to report current time value

2013-12-10 Thread David Ahern
imespec ts; clock_gettime(CLOCK_PERF, &ts); Updated to 3.13 Signed-off-by: Pawel Moll Signed-off-by: David Ahern Cc: Ingo Molnar Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Mike Galbraith Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian Cc: J

Re: [PATCH] perf tools: Fix bug for perf kvm report without guestmount.

2013-12-09 Thread David Ahern
On 12/10/13, 11:54 AM, Dongsheng Yang wrote: Okey, David, I saw your commit 207b57926 (perf kvm: Fix regression with guest machine creation) here. It is applied to fix a bug of SEGFAULT. I have to say that it changed the behavior of report and lead to current bug. Dongsheng, I appreciate your

Re: [PATCH 0/2] perf tools: Add --header/--header-only options

2013-12-09 Thread David Ahern
de Melo Cc: David Ahern --- tools/perf/Documentation/perf-report.txt | 6 ++ tools/perf/Documentation/perf-script.txt | 6 ++ tools/perf/builtin-report.c | 19 --- tools/perf/builtin-script.c | 13 ++--- 4 files changed, 38

Re: [PATCH] perf tools: Fix bug for perf kvm report without guestmount.

2013-12-09 Thread David Ahern
On 12/9/13, 11:49 AM, Arnaldo Carvalho de Melo wrote: Em Mon, Dec 09, 2013 at 11:08:05AM -0700, David Ahern escreveu: On 12/9/13, 11:07 AM, Arnaldo Carvalho de Melo wrote: Em Sun, Dec 08, 2013 at 10:39:36AM -0700, David Ahern escreveu: On 12/6/13, 4:56 AM, Arnaldo Carvalho de Melo wrote: You

[PATCH] perf diff: Add kallsyms option

2013-12-09 Thread David Ahern
Required for off-box analysis to convert kernel addresses. Signed-off-by: David Ahern Cc: Jiri Olsa --- tools/perf/Documentation/perf-diff.txt | 3 +++ tools/perf/builtin-diff.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/tools/perf/Documentation/perf-diff.txt b/tools

Re: [PATCH] perf tools: Fix bug for perf kvm report without guestmount.

2013-12-09 Thread David Ahern
On 12/9/13, 11:07 AM, Arnaldo Carvalho de Melo wrote: Em Sun, Dec 08, 2013 at 10:39:36AM -0700, David Ahern escreveu: On 12/6/13, 4:56 AM, Arnaldo Carvalho de Melo wrote: You get correct results because the modules/kallsyms info you provided matches the VM you're testing, i.e. the pid te

Re: [PATCH] perf tool: Ensure forward progress unwinding frames

2013-12-09 Thread David Ahern
On 12/9/13, 3:02 AM, Jiri Olsa wrote: On 12/1/13, 5:01 PM, David Ahern wrote: The dwarf option for callstacks is getting stuck on the unwind and showing repeated frames. For example, qemu-system-x86 13759 [001] 287663.084957: syscalls:sys_enter_futex: uaddr: 0x7f770a958700, op: 0x0081

Re: [PATCH] perf tools: Fix bug for perf kvm report without guestmount.

2013-12-08 Thread David Ahern
On 12/9/13, 10:12 AM, Dongsheng Yang wrote: On 12/08/2013 10:42 PM, David Ahern wrote: On 12/9/13, 8:20 AM, Dongsheng Yang wrote: How about introduce an option named --guestpid? Then we can make the usage of perf kvm more clear: * perf kvm --guestkallsyms --guestmodules --guestpid [top

Re: [PATCH] perf tools: Fix bug for perf kvm report without guestmount.

2013-12-08 Thread David Ahern
On 12/9/13, 8:20 AM, Dongsheng Yang wrote: How about introduce an option named --guestpid? Then we can make the usage of perf kvm more clear: * perf kvm --guestkallsyms --guestmodules --guestpid [top|record|report] This usage is for only one guest and will not resolve the symbols fr

Re: [PATCH 2/2] perf probe: Allow user to specify address within executable

2013-12-08 Thread David Ahern
On 12/4/13, 12:39 AM, Masami Hiramatsu wrote: > What would you like to do with perf probe? Direct address accessing for > userspace is not a good way to do, because userspace is relocatable... Masami, I am referring to the address within the executable which is what perf-probe pushes to the kernel

Re: [PATCH] perf tool: Ensure forward progress unwinding frames

2013-12-08 Thread David Ahern
ping.. Jiri, any thoughts on this? On 12/1/13, 5:01 PM, David Ahern wrote: The dwarf option for callstacks is getting stuck on the unwind and showing repeated frames. For example, qemu-system-x86 13759 [001] 287663.084957: syscalls:sys_enter_futex: uaddr: 0x7f770a958700, op: 0x0081, val

Re: [PATCH 0/2] perf tool: Carve out fs.* stuff

2013-12-08 Thread David Ahern
On 12/5/13, 10:47 AM, Arnaldo Carvalho de Melo wrote: Sorry, some editing problem happened here... Now with proper subject line. - Arnaldo Em Thu, Dec 05, 2013 at 05:25:50PM +0100, Borislav Petkov escreveu: From: Borislav Petkov Ok, step one: carve out fs-related stuff into a libapikfs.a li

<    4   5   6   7   8   9   10   11   12   13   >