[PATCH] perf sched: Make cpu based arrays dynamic

2015-03-31 Thread David Ahern
Remove MAX_CPUS and static array sizing in favor of run time growth. Signed-off-by: David Ahern Cc: Ingo Molnar --- tools/perf/builtin-sched.c | 84 -- 1 file changed, 73 insertions(+), 11 deletions(-) diff --git a/tools/perf/builtin-sched.c b/tools

[PATCH] perf sched: Remove max pid assumption from perf-sched

2015-03-31 Thread David Ahern
>= 65536)' failed. Aborted The max pid limitation is removed by converting pid_to_task from a pid based array to an intlist (rblist) with the pid as the index and task_desc stored in the priv element. In the process pid is converted from a long int to int. Signed-off-by: David Ahern Cc: I

Re: [PATCH 3/9] perf sched replay: Alloc the memory of pid_to_task dynamically to adapt to the unexpected change of pid_max

2015-03-31 Thread David Ahern
together last week; just have not had time to send it out. >From 159dc732e0ad66d9151e93761bc9c685872e9fa4 Mon Sep 17 00:00:00 2001 From: David Ahern Date: Tue, 24 Mar 2015 16:57:10 -0400 Subject: [PATCH 3/5] perf sched: Remove max pid assumption from perf-sched 'perf sched replay' currently

Re: [PATCH 2/9] perf sched replay: Increase the MAX_PID value to fix assertion failure problem

2015-03-31 Thread David Ahern
On 3/31/15 7:46 AM, Yunlong Song wrote: diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index a1893e8..c466104 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c @@ -28,7 +28,7 @@ #define MAX_CPUS 4096 #define COMM_LEN 20

Re: [BUG] perf script segfault

2015-03-31 Thread David Ahern
On 3/31/15 6:59 AM, Arnaldo Carvalho de Melo wrote: Em Mon, Mar 30, 2015 at 08:45:33PM -0300, Arnaldo Carvalho de Melo escreveu: Em Mon, Mar 30, 2015 at 04:51:34PM -0600, David Ahern escreveu: tool was moved to ordered_events and is not initialized for pipe mode. I don't have time to look

Re: [PATCH 2/9] perf sched replay: Increase the MAX_PID value to fix assertion failure problem

2015-03-31 Thread David Ahern
On 3/31/15 7:46 AM, Yunlong Song wrote: diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index a1893e8..c466104 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c @@ -28,7 +28,7 @@ #define MAX_CPUS 4096 #define COMM_LEN 20

[PATCH] perf sched: Make cpu based arrays dynamic

2015-03-31 Thread David Ahern
Remove MAX_CPUS and static array sizing in favor of run time growth. Signed-off-by: David Ahern david.ah...@oracle.com Cc: Ingo Molnar mi...@kernel.org --- tools/perf/builtin-sched.c | 84 -- 1 file changed, 73 insertions(+), 11 deletions(-) diff

Re: d63e2e1f3df breaks sparc/T5-8

2015-03-31 Thread David Ahern
On 3/31/15 10:53 AM, Yinghai Lu wrote: On Mon, Mar 30, 2015 at 9:10 PM, David Ahern david.ah...@oracle.com wrote: On 3/30/15 7:06 PM, Yinghai Lu wrote: To make sure I am on the same page: these are a new round of patches? clear out the old, apply these? Clear out the old and apply these new

[PATCH] perf sched: Remove max pid assumption from perf-sched

2015-03-31 Thread David Ahern
= 65536)' failed. Aborted The max pid limitation is removed by converting pid_to_task from a pid based array to an intlist (rblist) with the pid as the index and task_desc stored in the priv element. In the process pid is converted from a long int to int. Signed-off-by: David Ahern david.ah

Re: [PATCH 3/9] perf sched replay: Alloc the memory of pid_to_task dynamically to adapt to the unexpected change of pid_max

2015-03-31 Thread David Ahern
is what i put together last week; just have not had time to send it out. From 159dc732e0ad66d9151e93761bc9c685872e9fa4 Mon Sep 17 00:00:00 2001 From: David Ahern david.ah...@oracle.com Date: Tue, 24 Mar 2015 16:57:10 -0400 Subject: [PATCH 3/5] perf sched: Remove max pid assumption from perf-sched 'perf

Re: [BUG] perf script segfault

2015-03-31 Thread David Ahern
On 3/31/15 6:59 AM, Arnaldo Carvalho de Melo wrote: Em Mon, Mar 30, 2015 at 08:45:33PM -0300, Arnaldo Carvalho de Melo escreveu: Em Mon, Mar 30, 2015 at 04:51:34PM -0600, David Ahern escreveu: tool was moved to ordered_events and is not initialized for pipe mode. I don't have time to look

Re: [PATCH 3/9] perf sched replay: Alloc the memory of pid_to_task dynamically to adapt to the unexpected change of pid_max

2015-03-31 Thread David Ahern
On 3/31/15 2:25 PM, Arnaldo Carvalho de Melo wrote: Humm, we already have an rb_tree for each task, its called machine-threads, and it has struct thread instances, that in turn have a -priv point, can't it be used here? I think that would require a lot of churn to the existing code. The

Re: d63e2e1f3df breaks sparc/T5-8

2015-03-31 Thread David Ahern
On 3/31/15 4:38 PM, Yinghai Lu wrote: On Tue, Mar 31, 2015 at 3:29 PM, David Ahern david.ah...@oracle.com wrote: Please check attached three patches on top of current linus tree. new log. Same as before -- PCI_DEBUG, ignore_loglevel ofpci_debug=1 Good, it is clean now. Yes. You can add

Re: d63e2e1f3df breaks sparc/T5-8

2015-03-30 Thread David Ahern
On 3/30/15 7:06 PM, Yinghai Lu wrote: ok, that is really non-pref mmio 64bit. We can workaround the problem by honoring firmware setting, according to https://www.pcisig.com/specifications/pciexpress/base2/PCIe_Base_r2.1_Errata_08Jun10.pdf page 13 Please check attached updated patches that

Re: d63e2e1f3df breaks sparc/T5-8

2015-03-30 Thread David Ahern
On 3/29/15 2:07 PM, Yinghai Lu wrote: [ 286.647560] PCI: scan_bus[/pci@300/pci@1/pci@0/pci@6] bus no 8 [ 286.921232] PCI: Claiming :00:01.0: Resource 15: 8001..8004afff [220c] [ 287.229190] PCI: Claiming :01:00.0: Resource 15: 8001..8004afff

[BUG] perf script segfault

2015-03-30 Thread David Ahern
Surprised Stephane has not hit this one yet: $ perf record -e -a | perf script Segmentation fault (core dumped) It's the second one that core dumps. $ gdb perf core.16704 ... [New LWP 16704] [Thread debugging using libthread_db enabled] Using host libthread_db library

Re: [PATCH v6 1/4] perf,record: Add clockid parameter

2015-03-30 Thread David Ahern
On 3/30/15 4:19 PM, Stephane Eranian wrote: @@ -761,6 +762,12 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts) attr->disabled = 0; attr->enable_on_exec = 0; } + + if (opts->clockid >= 0) { +

[PATCH v3 2/2] perf tool: Fix ppid for synthesized fork events

2015-03-30 Thread David Ahern
363b785f38 added synthesized fork events and set a thread's parent id to itself. Since we are already processing /proc//status the ppid can be determined properly. Make it so. Signed-off-by: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Jiri Olsa --- v3 - removed isspace and newline checks

[PATCH v2 1/2] perf tool: Refactor comm/tgid lookup

2015-03-30 Thread David Ahern
Rather than parsing /proc/pid/status file one line at a time, read it into a buffer in one shot and search for all strings in one pass. tgid conversion also simplified -- removing the isspace walk. As noted by Arnaldo those are not needed for atoi == strtol calls. Signed-off-by: David Ahern Cc

Re: [PATCH v2 2/2] perf tool: Fix ppid for synthesized fork events

2015-03-30 Thread David Ahern
On 3/30/15 1:40 PM, Arnaldo Carvalho de Melo wrote: @@ -81,6 +84,7 @@ static pid_t perf_event__get_comm_tgid(pid_t pid, char *comm, size_t len) name = strstr(bf, "Name:"); tgids = strstr(bf, "Tgid:"); + ppids = strstr(bf, "PPid:"); can't we make this: ppids =

Re: [PATCH] perf, record: Add clockid parameter

2015-03-30 Thread David Ahern
On 3/30/15 1:34 PM, Peter Zijlstra wrote: diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 1abf6919b8a2..27679ab38511 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -766,7 +766,8 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts

Re: [PATCH] perf, record: Add clockid parameter

2015-03-30 Thread David Ahern
On 3/30/15 1:33 PM, Peter Zijlstra wrote: On Mon, Mar 30, 2015 at 11:24:12AM -0600, David Ahern wrote: This works but the result is not always intuitive as to why it failed. On a kernel that does not support the clock id you get: $ perf sched record -k mono -- sleep 1 Error

Re: [PATCH] perf, record: Add clockid parameter

2015-03-30 Thread David Ahern
On 3/30/15 1:32 PM, Peter Zijlstra wrote: --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -732,13 +732,16 @@ static const struct clockid_map clockids /* available for all events, NMI safe */ CLOCKID_MAP("monotonic", CLOCK_MONOTONIC),

[PATCH v2 2/2] perf tool: Fix ppid for synthesized fork events

2015-03-30 Thread David Ahern
363b785f38 added synthesized fork events and set a thread's parent id to itself. Since we are already processing /proc//status the ppid can be determined properly. Make it so. Signed-off-by: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Jiri Olsa --- v2: - removed changes to function

Re: [PATCH] perf, record: Add clockid parameter

2015-03-30 Thread David Ahern
On 3/28/15 1:55 AM, Peter Zijlstra wrote: @@ -761,6 +762,11 @@ void perf_evsel__config(struct perf_evse attr->disabled = 0; attr->enable_on_exec = 0; } + + if (opts->clockid >= 0) { + attr->use_clockid = 1; + attr->clockid

Re: [PATCH] perf, record: Add clockid parameter

2015-03-30 Thread David Ahern
On 3/28/15 1:55 AM, Peter Zijlstra wrote: @@ -1085,6 +1093,8 @@ static int __perf_evsel__open(struct per } fallback_missing_features: + if (perf_missing_features.clockid) + evsel->attr.use_clockid = 0; if (perf_missing_features.cloexec)

Re: [PATCH] perf, record: Add clockid parameter

2015-03-30 Thread David Ahern
On 3/30/15 3:17 AM, Peter Zijlstra wrote: I did this on top.. --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -732,13 +732,16 @@ static const struct clockid_map clockids /* available for all events, NMI safe */ CLOCKID_MAP("monotonic", CLOCK_MONOTONIC),

Re: [PATCH] perf, record: Add clockid parameter

2015-03-30 Thread David Ahern
On 3/30/15 2:24 AM, Peter Zijlstra wrote: I am clearly missing some kernel patch to try out this perf patch. I have the 4 timekeeper ones; none of those modify perf_event code. What other patches are needed? Was this one (or some variant) accepted: https://lkml.org/lkml/2015/2/20/236

Re: [PATCH 1/2] perf tool: Refactor comm/tgid lookup

2015-03-30 Thread David Ahern
On 3/30/15 2:01 AM, Jiri Olsa wrote: On Sun, Mar 29, 2015 at 04:30:01PM -0600, David Ahern wrote: SNIP + fd = open(filename, O_RDONLY); + if (fd < 0) { pr_debug("couldn't open %s\n", filename); return 0; } - while (!com

Re: [PATCH 2/2] perf tool: Fix ppid for synthesized fork events

2015-03-30 Thread David Ahern
On 3/30/15 2:04 AM, Jiri Olsa wrote: On Sun, Mar 29, 2015 at 04:30:02PM -0600, David Ahern wrote: SNIP -static pid_t perf_event__synthesize_comm(struct perf_tool *tool, -union perf_event *event, pid_t pid

Re: [RFC PATCH] sched: Add cpu based entries to debugfs

2015-03-30 Thread David Ahern
On 3/29/15 9:08 PM, Mike Galbraith wrote: Oh, you can add /proc/sys/kernel/sched_domain diddling to the hotplug todo... which will either create read /sys, poke modify buttons over yonder in /proc situation, or have to duplicate that. -EPARSE. you mean the /proc/sys/kernel/sched_domain/

Re: [RFC PATCH] sched: Add cpu based entries to debugfs

2015-03-30 Thread David Ahern
On 3/30/15 1:44 AM, Peter Zijlstra wrote: On Sun, Mar 29, 2015 at 10:13:33PM -0400, David Ahern wrote: Before spending too much time formalizing this I wanted to see if you guys would entertain the idea of making this info available via debugfs. It does move the existing sched_features file

Re: [RFC PATCH] sched: Add cpu based entries to debugfs

2015-03-30 Thread David Ahern
On 3/30/15 1:44 AM, Peter Zijlstra wrote: On Sun, Mar 29, 2015 at 10:13:33PM -0400, David Ahern wrote: Before spending too much time formalizing this I wanted to see if you guys would entertain the idea of making this info available via debugfs. It does move the existing sched_features file

Re: [RFC PATCH] sched: Add cpu based entries to debugfs

2015-03-30 Thread David Ahern
On 3/29/15 9:08 PM, Mike Galbraith wrote: Oh, you can add /proc/sys/kernel/sched_domain diddling to the hotplug todo... which will either create read /sys, poke modify buttons over yonder in /proc situation, or have to duplicate that. -EPARSE. you mean the /proc/sys/kernel/sched_domain/

Re: [PATCH 2/2] perf tool: Fix ppid for synthesized fork events

2015-03-30 Thread David Ahern
On 3/30/15 2:04 AM, Jiri Olsa wrote: On Sun, Mar 29, 2015 at 04:30:02PM -0600, David Ahern wrote: SNIP -static pid_t perf_event__synthesize_comm(struct perf_tool *tool, -union perf_event *event, pid_t pid

Re: [PATCH 1/2] perf tool: Refactor comm/tgid lookup

2015-03-30 Thread David Ahern
On 3/30/15 2:01 AM, Jiri Olsa wrote: On Sun, Mar 29, 2015 at 04:30:01PM -0600, David Ahern wrote: SNIP + fd = open(filename, O_RDONLY); + if (fd 0) { pr_debug(couldn't open %s\n, filename); return 0; } - while (!comm[0] || (tgid 0

Re: [PATCH] perf, record: Add clockid parameter

2015-03-30 Thread David Ahern
On 3/30/15 3:17 AM, Peter Zijlstra wrote: I did this on top.. --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -732,13 +732,16 @@ static const struct clockid_map clockids /* available for all events, NMI safe */ CLOCKID_MAP(monotonic, CLOCK_MONOTONIC),

Re: [PATCH] perf, record: Add clockid parameter

2015-03-30 Thread David Ahern
On 3/28/15 1:55 AM, Peter Zijlstra wrote: @@ -1085,6 +1093,8 @@ static int __perf_evsel__open(struct per } fallback_missing_features: + if (perf_missing_features.clockid) + evsel-attr.use_clockid = 0; if (perf_missing_features.cloexec) flags

Re: [PATCH] perf, record: Add clockid parameter

2015-03-30 Thread David Ahern
On 3/28/15 1:55 AM, Peter Zijlstra wrote: @@ -761,6 +762,11 @@ void perf_evsel__config(struct perf_evse attr-disabled = 0; attr-enable_on_exec = 0; } + + if (opts-clockid = 0) { + attr-use_clockid = 1; + attr-clockid =

Re: [PATCH] perf, record: Add clockid parameter

2015-03-30 Thread David Ahern
On 3/30/15 2:24 AM, Peter Zijlstra wrote: I am clearly missing some kernel patch to try out this perf patch. I have the 4 timekeeper ones; none of those modify perf_event code. What other patches are needed? Was this one (or some variant) accepted: https://lkml.org/lkml/2015/2/20/236

Re: [PATCH] perf, record: Add clockid parameter

2015-03-30 Thread David Ahern
On 3/30/15 1:33 PM, Peter Zijlstra wrote: On Mon, Mar 30, 2015 at 11:24:12AM -0600, David Ahern wrote: This works but the result is not always intuitive as to why it failed. On a kernel that does not support the clock id you get: $ perf sched record -k mono -- sleep 1 Error

Re: [PATCH] perf, record: Add clockid parameter

2015-03-30 Thread David Ahern
On 3/30/15 1:32 PM, Peter Zijlstra wrote: --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -732,13 +732,16 @@ static const struct clockid_map clockids /* available for all events, NMI safe */ CLOCKID_MAP(monotonic, CLOCK_MONOTONIC),

[PATCH v3 2/2] perf tool: Fix ppid for synthesized fork events

2015-03-30 Thread David Ahern
363b785f38 added synthesized fork events and set a thread's parent id to itself. Since we are already processing /proc/pid/status the ppid can be determined properly. Make it so. Signed-off-by: David Ahern dsah...@gmail.com Cc: Don Zickus dzic...@redhat.com Cc: Joe Mario jma...@redhat.com Cc

[PATCH v2 1/2] perf tool: Refactor comm/tgid lookup

2015-03-30 Thread David Ahern
Rather than parsing /proc/pid/status file one line at a time, read it into a buffer in one shot and search for all strings in one pass. tgid conversion also simplified -- removing the isspace walk. As noted by Arnaldo those are not needed for atoi == strtol calls. Signed-off-by: David Ahern dsah

[PATCH v2 2/2] perf tool: Fix ppid for synthesized fork events

2015-03-30 Thread David Ahern
363b785f38 added synthesized fork events and set a thread's parent id to itself. Since we are already processing /proc/pid/status the ppid can be determined properly. Make it so. Signed-off-by: David Ahern dsah...@gmail.com Cc: Don Zickus dzic...@redhat.com Cc: Joe Mario jma...@redhat.com Cc

Re: [PATCH] perf, record: Add clockid parameter

2015-03-30 Thread David Ahern
On 3/30/15 1:34 PM, Peter Zijlstra wrote: diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 1abf6919b8a2..27679ab38511 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -766,7 +766,8 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts

Re: [PATCH v2 2/2] perf tool: Fix ppid for synthesized fork events

2015-03-30 Thread David Ahern
On 3/30/15 1:40 PM, Arnaldo Carvalho de Melo wrote: @@ -81,6 +84,7 @@ static pid_t perf_event__get_comm_tgid(pid_t pid, char *comm, size_t len) name = strstr(bf, Name:); tgids = strstr(bf, Tgid:); + ppids = strstr(bf, PPid:); can't we make this: ppids =

Re: [PATCH v6 1/4] perf,record: Add clockid parameter

2015-03-30 Thread David Ahern
On 3/30/15 4:19 PM, Stephane Eranian wrote: @@ -761,6 +762,12 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts) attr-disabled = 0; attr-enable_on_exec = 0; } + + if (opts-clockid = 0) { + attr-use_clockid =

Re: d63e2e1f3df breaks sparc/T5-8

2015-03-30 Thread David Ahern
On 3/29/15 2:07 PM, Yinghai Lu wrote: [ 286.647560] PCI: scan_bus[/pci@300/pci@1/pci@0/pci@6] bus no 8 [ 286.921232] PCI: Claiming :00:01.0: Resource 15: 8001..8004afff [220c] [ 287.229190] PCI: Claiming :01:00.0: Resource 15: 8001..8004afff

[BUG] perf script segfault

2015-03-30 Thread David Ahern
Surprised Stephane has not hit this one yet: $ perf record -e any-event -a | perf script Segmentation fault (core dumped) It's the second one that core dumps. $ gdb perf core.16704 ... [New LWP 16704] [Thread debugging using libthread_db enabled] Using host libthread_db library

Re: d63e2e1f3df breaks sparc/T5-8

2015-03-30 Thread David Ahern
On 3/30/15 7:06 PM, Yinghai Lu wrote: ok, that is really non-pref mmio 64bit. We can workaround the problem by honoring firmware setting, according to https://www.pcisig.com/specifications/pciexpress/base2/PCIe_Base_r2.1_Errata_08Jun10.pdf page 13 Please check attached updated patches that

Re: [RFC PATCH] sched: Add cpu based entries to debugfs

2015-03-29 Thread David Ahern
On 3/29/15 8:32 PM, Mike Galbraith wrote: On Sun, 2015-03-29 at 22:13 -0400, David Ahern wrote: diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 62671f53202a..b4d8d0c8260e 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -268,12 +268,173 @@ static const struct

[RFC PATCH] sched: Add cpu based entries to debugfs

2015-03-29 Thread David Ahern
how acceptable it is to move files in debugfs. TO-DO: handle hotplug Signed-off-by: David Ahern --- kernel/sched/core.c | 167 +++- 1 file changed, 164 insertions(+), 3 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index

Re: [PATCH] perf, record: Add clockid parameter

2015-03-29 Thread David Ahern
On 3/28/15 1:55 AM, Peter Zijlstra wrote: Subject: perf, record: Add clockid parameter From: Peter Zijlstra Date: Fri, 27 Mar 2015 15:32:01 +0100 Teach perf-record about the new perf_event_attr::{use_clockid, clockid} fields. Add a simple parameter to set the clock (if any) to be used for the

[PATCH 1/2] perf tool: Refactor comm/tgid lookup

2015-03-29 Thread David Ahern
Rather than parsing /proc/pid/status file one line at a time, read it into a buffer in one shot and search for all strings in one pass. Signed-off-by: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Jiri Olsa --- tools/perf/util/event.c | 80 +++-- 1

[PATCH 2/2] perf tool: Fix ppid for synthesized fork events

2015-03-29 Thread David Ahern
363b785f38 added synthesized fork events and set a thread's parent id to itself. Since we are already processing /proc//status the ppid can be determined properly. Make it so. Signed-off-by: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Jiri Olsa --- tools/perf/util/event.c | 106

[RFC PATCH] sched: Add cpu based entries to debugfs

2015-03-29 Thread David Ahern
how acceptable it is to move files in debugfs. TO-DO: handle hotplug Signed-off-by: David Ahern david.ah...@oracle.com --- kernel/sched/core.c | 167 +++- 1 file changed, 164 insertions(+), 3 deletions(-) diff --git a/kernel/sched/core.c b/kernel

Re: [RFC PATCH] sched: Add cpu based entries to debugfs

2015-03-29 Thread David Ahern
On 3/29/15 8:32 PM, Mike Galbraith wrote: On Sun, 2015-03-29 at 22:13 -0400, David Ahern wrote: diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 62671f53202a..b4d8d0c8260e 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -268,12 +268,173 @@ static const struct

Re: [PATCH] perf, record: Add clockid parameter

2015-03-29 Thread David Ahern
On 3/28/15 1:55 AM, Peter Zijlstra wrote: Subject: perf, record: Add clockid parameter From: Peter Zijlstra pet...@infradead.org Date: Fri, 27 Mar 2015 15:32:01 +0100 Teach perf-record about the new perf_event_attr::{use_clockid, clockid} fields. Add a simple parameter to set the clock (if any)

[PATCH 2/2] perf tool: Fix ppid for synthesized fork events

2015-03-29 Thread David Ahern
363b785f38 added synthesized fork events and set a thread's parent id to itself. Since we are already processing /proc/pid/status the ppid can be determined properly. Make it so. Signed-off-by: David Ahern dsah...@gmail.com Cc: Don Zickus dzic...@redhat.com Cc: Joe Mario jma...@redhat.com Cc

[PATCH 1/2] perf tool: Refactor comm/tgid lookup

2015-03-29 Thread David Ahern
Rather than parsing /proc/pid/status file one line at a time, read it into a buffer in one shot and search for all strings in one pass. Signed-off-by: David Ahern dsah...@gmail.com Cc: Don Zickus dzic...@redhat.com Cc: Joe Mario jma...@redhat.com Cc: Jiri Olsa jo...@redhat.com --- tools/perf

Re: d63e2e1f3df breaks sparc/T5-8

2015-03-28 Thread David Ahern
On 3/27/15 11:26 PM, Yinghai Lu wrote: On Fri, Mar 27, 2015 at 8:45 PM, David Ahern wrote: On 3/27/15 9:19 PM, Yinghai Lu wrote: Good. But we still have annoying warning about "no compatible window". Please try attached patch that support 64bit pci mem space for sparc. BTW, look

Re: d63e2e1f3df breaks sparc/T5-8

2015-03-28 Thread David Ahern
On 3/27/15 11:26 PM, Yinghai Lu wrote: On Fri, Mar 27, 2015 at 8:45 PM, David Ahern david.ah...@oracle.com wrote: On 3/27/15 9:19 PM, Yinghai Lu wrote: Good. But we still have annoying warning about no compatible window. Please try attached patch that support 64bit pci mem space for sparc

Re: d63e2e1f3df breaks sparc/T5-8

2015-03-27 Thread David Ahern
On 3/27/15 9:19 PM, Yinghai Lu wrote: Good. But we still have annoying warning about "no compatible window". Please try attached patch that support 64bit pci mem space for sparc. BTW, looks like you still do not have CONFIG_PCI_DEBUG=y in your .config. otherwise we should more verbose print

Re: d63e2e1f3df breaks sparc/T5-8

2015-03-27 Thread David Ahern
On 3/27/15 9:19 PM, Yinghai Lu wrote: Good. But we still have annoying warning about "no compatible window". Please try attached patch that support 64bit pci mem space for sparc. in place of or on top of the previous patch? BTW, looks like you still do not have CONFIG_PCI_DEBUG=y in your

Re: d63e2e1f3df breaks sparc/T5-8

2015-03-27 Thread David Ahern
On 3/27/15 6:32 PM, David Ahern wrote: On 3/27/15 5:57 PM, Yinghai Lu wrote: On Fri, Mar 27, 2015 at 2:01 PM, Yinghai Lu wrote: On Thu, Mar 26, 2015 at 4:27 PM, David Ahern wrote: Also please make sure your config have CONFIG_PCI_DEBUG=y and capture serial console with "

Re: d63e2e1f3df breaks sparc/T5-8

2015-03-27 Thread David Ahern
On 3/27/15 5:57 PM, Yinghai Lu wrote: On Fri, Mar 27, 2015 at 2:01 PM, Yinghai Lu wrote: On Thu, Mar 26, 2015 at 4:27 PM, David Ahern wrote: Also please make sure your config have CONFIG_PCI_DEBUG=y and capture serial console with "debug ignore_loglevel", so we check if pci 00

Re: [BUG] segfault in perf-top -- thread refcnt

2015-03-27 Thread David Ahern
On 3/27/15 2:11 PM, Arnaldo Carvalho de Melo wrote: Em Fri, Mar 27, 2015 at 11:31:22AM -0600, David Ahern escreveu: >Hi Arnaldo: > >If I leave 'perf top -z' running it eventually crashes with the backtrace in >the new thread refcnt code: Humm, tried here with: perf top -d 1 -z

Re: [PATCH v2] perf tool: Fix ppid for synthesized fork events

2015-03-27 Thread David Ahern
On 3/27/15 1:49 PM, Don Zickus wrote: diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c index 1c8fbc9..7ee3823 100644 --- a/tools/perf/util/thread.c +++ b/tools/perf/util/thread.c @@ -187,6 +187,7 @@ static int thread__clone_map_groups(struct thread *thread, if

Re: [PATCH] perf, record: Add clockid parameter

2015-03-27 Thread David Ahern
On 3/27/15 11:20 AM, Peter Zijlstra wrote: This is a new feature which means use_clockid on older kernels will fail. So need to catch that and throw an error -- perhaps yet another probe function. How does that work? What do I grep to find an example? I figured if the kernel didn't support the

[BUG] segfault in perf-top -- thread refcnt

2015-03-27 Thread David Ahern
Hi Arnaldo: If I leave 'perf top -z' running it eventually crashes with the backtrace in the new thread refcnt code: (gdb) bt #0 __list_del_entry (thread=0x670bd30) at /home/dahern/kernels/linux.git/tools/perf/util/include/../../../../include/linux/list.h:102 #1 list_del_init

Re: [PATCH] perf, record: Add clockid parameter

2015-03-27 Thread David Ahern
On 3/27/15 8:32 AM, Peter Zijlstra wrote: On Fri, Mar 27, 2015 at 04:48:08AM -0700, tip-bot for Peter Zijlstra wrote: perf: Add per event clockid support And here the accompanying userspace; which I'd totally forgotten about. XXX: do we want to store the clockid in the data file as well,

Re: [PATCH v2] perf tool: Fix ppid for synthesized fork events

2015-03-27 Thread David Ahern
On 3/27/15 7:10 AM, Don Zickus wrote: I talked with Joe on my way out the door yesterday and he confirmed, just removing -BN from our test showed a performance hit with your patch. With the -BN option, there is no performance hit and we are perfectly fine with your patch. So, I guess I am

[tip:perf/core] perf/x86: Remove redundant calls to perf_pmu_{dis|en}able()

2015-03-27 Thread tip-bot for David Ahern
Commit-ID: 9332d250b4b4f67c633894b311e022e3cf943bd5 Gitweb: http://git.kernel.org/tip/9332d250b4b4f67c633894b311e022e3cf943bd5 Author: David Ahern AuthorDate: Wed, 18 Feb 2015 10:45:43 -0700 Committer: Ingo Molnar CommitDate: Fri, 27 Mar 2015 09:49:44 +0100 perf/x86: Remove redundant

[tip:perf/core] perf tools: Set JOBS based on CPU or processor

2015-03-27 Thread tip-bot for David Ahern
Commit-ID: 6428c59a97de7c3d88fc4e66317daea5e5008758 Gitweb: http://git.kernel.org/tip/6428c59a97de7c3d88fc4e66317daea5e5008758 Author: David Ahern AuthorDate: Tue, 24 Mar 2015 12:10:55 -0400 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 26 Mar 2015 10:52:28 -0300 perf tools

[tip:perf/core] perf: Bump max number of cpus to 1024

2015-03-27 Thread tip-bot for David Ahern
Commit-ID: 4d255766d28b1fecec7e00ab4166b2c17bfc37be Gitweb: http://git.kernel.org/tip/4d255766d28b1fecec7e00ab4166b2c17bfc37be Author: David Ahern AuthorDate: Tue, 24 Mar 2015 12:10:38 -0400 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 26 Mar 2015 10:52:28 -0300 perf: Bump max

[tip:perf/core] perf timechart: Fix SIBGUS error on sparc64

2015-03-27 Thread tip-bot for David Ahern
Commit-ID: e94eedab3ab8201fd41480171b2fabbf3c5b1ae0 Gitweb: http://git.kernel.org/tip/e94eedab3ab8201fd41480171b2fabbf3c5b1ae0 Author: David Ahern AuthorDate: Tue, 24 Mar 2015 16:14:09 -0400 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 26 Mar 2015 10:52:28 -0300 perf timechart

[tip:perf/core] perf tools: Set JOBS based on CPU or processor

2015-03-27 Thread tip-bot for David Ahern
Commit-ID: 6428c59a97de7c3d88fc4e66317daea5e5008758 Gitweb: http://git.kernel.org/tip/6428c59a97de7c3d88fc4e66317daea5e5008758 Author: David Ahern david.ah...@oracle.com AuthorDate: Tue, 24 Mar 2015 12:10:55 -0400 Committer: Arnaldo Carvalho de Melo a...@redhat.com CommitDate: Thu, 26

[tip:perf/core] perf: Bump max number of cpus to 1024

2015-03-27 Thread tip-bot for David Ahern
Commit-ID: 4d255766d28b1fecec7e00ab4166b2c17bfc37be Gitweb: http://git.kernel.org/tip/4d255766d28b1fecec7e00ab4166b2c17bfc37be Author: David Ahern david.ah...@oracle.com AuthorDate: Tue, 24 Mar 2015 12:10:38 -0400 Committer: Arnaldo Carvalho de Melo a...@redhat.com CommitDate: Thu, 26

[tip:perf/core] perf timechart: Fix SIBGUS error on sparc64

2015-03-27 Thread tip-bot for David Ahern
Commit-ID: e94eedab3ab8201fd41480171b2fabbf3c5b1ae0 Gitweb: http://git.kernel.org/tip/e94eedab3ab8201fd41480171b2fabbf3c5b1ae0 Author: David Ahern david.ah...@oracle.com AuthorDate: Tue, 24 Mar 2015 16:14:09 -0400 Committer: Arnaldo Carvalho de Melo a...@redhat.com CommitDate: Thu, 26

[tip:perf/core] perf/x86: Remove redundant calls to perf_pmu_{dis|en}able()

2015-03-27 Thread tip-bot for David Ahern
Commit-ID: 9332d250b4b4f67c633894b311e022e3cf943bd5 Gitweb: http://git.kernel.org/tip/9332d250b4b4f67c633894b311e022e3cf943bd5 Author: David Ahern dsah...@gmail.com AuthorDate: Wed, 18 Feb 2015 10:45:43 -0700 Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 27 Mar 2015 09:49:44

Re: [PATCH v2] perf tool: Fix ppid for synthesized fork events

2015-03-27 Thread David Ahern
On 3/27/15 7:10 AM, Don Zickus wrote: I talked with Joe on my way out the door yesterday and he confirmed, just removing -BN from our test showed a performance hit with your patch. With the -BN option, there is no performance hit and we are perfectly fine with your patch. So, I guess I am

Re: [PATCH] perf, record: Add clockid parameter

2015-03-27 Thread David Ahern
On 3/27/15 8:32 AM, Peter Zijlstra wrote: On Fri, Mar 27, 2015 at 04:48:08AM -0700, tip-bot for Peter Zijlstra wrote: perf: Add per event clockid support And here the accompanying userspace; which I'd totally forgotten about. XXX: do we want to store the clockid in the data file as well,

[BUG] segfault in perf-top -- thread refcnt

2015-03-27 Thread David Ahern
Hi Arnaldo: If I leave 'perf top -z' running it eventually crashes with the backtrace in the new thread refcnt code: (gdb) bt #0 __list_del_entry (thread=0x670bd30) at /home/dahern/kernels/linux.git/tools/perf/util/include/../../../../include/linux/list.h:102 #1 list_del_init

Re: [PATCH] perf, record: Add clockid parameter

2015-03-27 Thread David Ahern
On 3/27/15 11:20 AM, Peter Zijlstra wrote: This is a new feature which means use_clockid on older kernels will fail. So need to catch that and throw an error -- perhaps yet another probe function. How does that work? What do I grep to find an example? I figured if the kernel didn't support the

Re: [PATCH v2] perf tool: Fix ppid for synthesized fork events

2015-03-27 Thread David Ahern
On 3/27/15 1:49 PM, Don Zickus wrote: diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c index 1c8fbc9..7ee3823 100644 --- a/tools/perf/util/thread.c +++ b/tools/perf/util/thread.c @@ -187,6 +187,7 @@ static int thread__clone_map_groups(struct thread *thread, if

Re: [BUG] segfault in perf-top -- thread refcnt

2015-03-27 Thread David Ahern
On 3/27/15 2:11 PM, Arnaldo Carvalho de Melo wrote: Em Fri, Mar 27, 2015 at 11:31:22AM -0600, David Ahern escreveu: Hi Arnaldo: If I leave 'perf top -z' running it eventually crashes with the backtrace in the new thread refcnt code: Humm, tried here with: perf top -d 1 -z I.e. as you

Re: d63e2e1f3df breaks sparc/T5-8

2015-03-27 Thread David Ahern
On 3/27/15 9:19 PM, Yinghai Lu wrote: Good. But we still have annoying warning about no compatible window. Please try attached patch that support 64bit pci mem space for sparc. in place of or on top of the previous patch? BTW, looks like you still do not have CONFIG_PCI_DEBUG=y in your

Re: d63e2e1f3df breaks sparc/T5-8

2015-03-27 Thread David Ahern
On 3/27/15 5:57 PM, Yinghai Lu wrote: On Fri, Mar 27, 2015 at 2:01 PM, Yinghai Lu ying...@kernel.org wrote: On Thu, Mar 26, 2015 at 4:27 PM, David Ahern david.ah...@oracle.com wrote: Also please make sure your config have CONFIG_PCI_DEBUG=y and capture serial console with debug

Re: d63e2e1f3df breaks sparc/T5-8

2015-03-27 Thread David Ahern
On 3/27/15 6:32 PM, David Ahern wrote: On 3/27/15 5:57 PM, Yinghai Lu wrote: On Fri, Mar 27, 2015 at 2:01 PM, Yinghai Lu ying...@kernel.org wrote: On Thu, Mar 26, 2015 at 4:27 PM, David Ahern david.ah...@oracle.com wrote: Also please make sure your config have CONFIG_PCI_DEBUG=y

Re: d63e2e1f3df breaks sparc/T5-8

2015-03-27 Thread David Ahern
On 3/27/15 9:19 PM, Yinghai Lu wrote: Good. But we still have annoying warning about no compatible window. Please try attached patch that support 64bit pci mem space for sparc. BTW, looks like you still do not have CONFIG_PCI_DEBUG=y in your .config. otherwise we should more verbose print

Re: d63e2e1f3df breaks sparc/T5-8

2015-03-26 Thread David Ahern
On 3/26/15 2:43 PM, Yinghai Lu wrote: Can you send out boot log with "debug ignore_loglevel"? attached PROMLIB: Sun IEEE Boot Prom 'OBP 4.36.2 2014/10/24 08:15' PROMLIB: Root node compatible: sun4v Initializing cgroup subsys cpuset Initializing cgroup subsys cpu Initializing cgroup subsys

Re: [PATCH v2] perf tool: Fix ppid for synthesized fork events

2015-03-26 Thread David Ahern
On 3/26/15 3:11 PM, Don Zickus wrote: Sorry for drawing this out. Originally the performance still seemed off. But as we split the patch up to see where the perf impact was, the problem seemed to have disappeared. So we are testing the original patch again. The only difference now is we were

d63e2e1f3df breaks sparc/T5-8

2015-03-26 Thread David Ahern
Hi: Boot of an 8-socket T5 sparc system fails on top of tree. git bisect points to this commit: commit 904bf6bd150bdafb42ddbb3257ea8 Author: Yinghai Lu Date: Thu Jan 15 16:21:51 2015 -0600 sparc/PCI: Clip bridge windows to fit in upstream windows Every PCI-PCI bridge window should fit

d63e2e1f3df breaks sparc/T5-8

2015-03-26 Thread David Ahern
Hi: Boot of an 8-socket T5 sparc system fails on top of tree. git bisect points to this commit: commit 904bf6bd150bdafb42ddbb3257ea8 Author: Yinghai Lu ying...@kernel.org Date: Thu Jan 15 16:21:51 2015 -0600 sparc/PCI: Clip bridge windows to fit in upstream windows Every PCI-PCI bridge

Re: [PATCH v2] perf tool: Fix ppid for synthesized fork events

2015-03-26 Thread David Ahern
On 3/26/15 3:11 PM, Don Zickus wrote: Sorry for drawing this out. Originally the performance still seemed off. But as we split the patch up to see where the perf impact was, the problem seemed to have disappeared. So we are testing the original patch again. The only difference now is we were

Re: d63e2e1f3df breaks sparc/T5-8

2015-03-26 Thread David Ahern
On 3/26/15 2:43 PM, Yinghai Lu wrote: Can you send out boot log with debug ignore_loglevel? attached PROMLIB: Sun IEEE Boot Prom 'OBP 4.36.2 2014/10/24 08:15' PROMLIB: Root node compatible: sun4v Initializing cgroup subsys cpuset Initializing cgroup subsys cpu Initializing cgroup subsys

Re: [PATCH v4 2/4] perf tools: add Java demangling support

2015-03-25 Thread David Ahern
On 3/25/15 6:57 PM, Stephane Eranian wrote: Im on tip.git and at commit: f05bf44 Merge branch 'perf/core' I had to do this to get the features-tests to work. This setup keeps changing on me. perf patches go through Arnaldo, so new patch sets like this should be against acme's tree, perf/core

Re: [PATCH v4 3/4] perf inject: add jitdump mmap injection support

2015-03-25 Thread David Ahern
On 3/25/15 2:41 PM, Carl E. Love wrote: I do not fine the directory tools/build in the linux kernel tree. I am wondering if the Build file and the tools/build directory might be part of your source tree build environment? you want to use acme's perf/core branch from

Re: [PATCH v2] perf tool: Fix ppid for synthesized fork events

2015-03-25 Thread David Ahern
On 3/25/15 1:15 PM, Don Zickus wrote: On Wed, Mar 25, 2015 at 10:51:10AM -0600, David Ahern wrote: 363b785f38 added synthesized fork events and set a thread's parent id to itself. Since we are already processing /proc//status the ppid can be determined properly. Make it so. Performance impact

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