* [GIT PULL 0/3] perf/urgent fixes
@ 2011-01-11 19:50 Arnaldo Carvalho de Melo
2011-01-11 19:50 ` [PATCH 1/3] perf evsel: Fix order of event list deletion Arnaldo Carvalho de Melo
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-01-11 19:50 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, David Ahern,
Frederic Weisbecker, Ingo Molnar, Kirill Smelkov, Mike Galbraith,
Paul Mackerras, Peter Zijlstra, Stephane Eranian,
Thomas Renninger, Tom Zanussi
Hi Ingo,
Please consider pulling from:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 perf/urgent
Regards,
- Arnaldo
Arnaldo Carvalho de Melo (3):
perf evsel: Fix order of event list deletion
perf top: Fix annotate segv
Revert "perf tools: Emit clearer message for sys_perf_event_open ENOENT return"
tools/perf/builtin-record.c | 4 +---
tools/perf/builtin-stat.c | 1 +
tools/perf/builtin-top.c | 5 +++--
tools/perf/perf.c | 2 --
4 files changed, 5 insertions(+), 7 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] perf evsel: Fix order of event list deletion
2011-01-11 19:50 [GIT PULL 0/3] perf/urgent fixes Arnaldo Carvalho de Melo
@ 2011-01-11 19:50 ` Arnaldo Carvalho de Melo
2011-01-11 19:50 ` [PATCH 2/3] perf top: Fix annotate segv Arnaldo Carvalho de Melo
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-01-11 19:50 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, Frederic Weisbecker,
Ingo Molnar, Mike Galbraith, Paul Mackerras, Peter Zijlstra,
Stephane Eranian, Thomas Renninger, Tom Zanussi
From: Arnaldo Carvalho de Melo <acme@redhat.com>
We need to defer calling perf_evsel_list__delete() till after atexit
registered routines, because we need to traverse the events being
recorded at that time at least on 'perf record'.
This fixes the problem reported by Thomas Renninger where cmd_record
called by cmd_timechart would not write the tracing data to the perf.data
file header because the evsel_list at atexit (control+C on 'perf timechart
record') time would be empty, being already deleted by run_builtin(),
and thus 'perf timechart' when trying to process such perf.data file would
die with:
"no trace data in the file"
Problem introduced in 70d544d.
Reported-by: Thomas Renninger <trenn@suse.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Renninger <trenn@suse.de>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-record.c | 1 +
tools/perf/builtin-stat.c | 1 +
tools/perf/builtin-top.c | 1 +
tools/perf/perf.c | 2 --
4 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 7069bd3..aa7ece3 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -480,6 +480,7 @@ static void atexit_header(void)
process_buildids();
perf_header__write(&session->header, output, true);
perf_session__delete(session);
+ perf_evsel_list__delete();
symbol__exit();
}
}
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index c385a63..0ff11d9 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -743,6 +743,7 @@ int cmd_stat(int argc, const char **argv, const char *prefix __used)
out_free_fd:
list_for_each_entry(pos, &evsel_list, node)
perf_evsel__free_stat_priv(pos);
+ perf_evsel_list__delete();
out:
thread_map__delete(threads);
threads = NULL;
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 6ce4042..4b995ee 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1490,6 +1490,7 @@ int cmd_top(int argc, const char **argv, const char *prefix __used)
out_free_fd:
list_for_each_entry(pos, &evsel_list, node)
perf_evsel__free_mmap(pos);
+ perf_evsel_list__delete();
return status;
}
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index 5b1ecd6..595d0f4 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -286,8 +286,6 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
status = p->fn(argc, argv, prefix);
exit_browser(status);
- perf_evsel_list__delete();
-
if (status)
return status & 0xff;
--
1.6.2.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/3] perf top: Fix annotate segv
2011-01-11 19:50 [GIT PULL 0/3] perf/urgent fixes Arnaldo Carvalho de Melo
2011-01-11 19:50 ` [PATCH 1/3] perf evsel: Fix order of event list deletion Arnaldo Carvalho de Melo
@ 2011-01-11 19:50 ` Arnaldo Carvalho de Melo
2011-01-11 19:50 ` [PATCH 3/3] Revert "perf tools: Emit clearer message for sys_perf_event_open ENOENT return" Arnaldo Carvalho de Melo
2011-01-12 8:36 ` [GIT PULL 0/3] perf/urgent fixes Ingo Molnar
3 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-01-11 19:50 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, Frederic Weisbecker,
Ingo Molnar, Kirill Smelkov, Mike Galbraith, Paul Mackerras,
Peter Zijlstra, Stephane Eranian, Tom Zanussi
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Before we had sym_counter, it was initialized to zero and we used that
as an index in the global attrs variable, now we have a list of evsel
entries, and sym_counter became sym_evsel, that remained initialized to
zero (NULL): b00m.
Fix it by initializing it to the first entry in the evsel list.
Bug-introduced: 69aad6f
Reported-by: Kirill Smelkov <kirr@mns.spb.ru>
Tested-by: Kirill Smelkov <kirr@mns.spb.ru>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Kirill Smelkov <kirr@mns.spb.ru>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-top.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 4b995ee..568b195 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1473,6 +1473,8 @@ int cmd_top(int argc, const char **argv, const char *prefix __used)
pos->attr.sample_period = default_interval;
}
+ sym_evsel = list_entry(evsel_list.next, struct perf_evsel, node);
+
symbol_conf.priv_size = (sizeof(struct sym_entry) +
(nr_counters + 1) * sizeof(unsigned long));
--
1.6.2.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/3] Revert "perf tools: Emit clearer message for sys_perf_event_open ENOENT return"
2011-01-11 19:50 [GIT PULL 0/3] perf/urgent fixes Arnaldo Carvalho de Melo
2011-01-11 19:50 ` [PATCH 1/3] perf evsel: Fix order of event list deletion Arnaldo Carvalho de Melo
2011-01-11 19:50 ` [PATCH 2/3] perf top: Fix annotate segv Arnaldo Carvalho de Melo
@ 2011-01-11 19:50 ` Arnaldo Carvalho de Melo
2011-01-12 8:36 ` [GIT PULL 0/3] perf/urgent fixes Ingo Molnar
3 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-01-11 19:50 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, David Ahern,
Frederic Weisbecker, Ingo Molnar, Mike Galbraith, Paul Mackerras,
Peter Zijlstra, Stephane Eranian, Tom Zanussi
From: Arnaldo Carvalho de Melo <acme@redhat.com>
This reverts commit aa7bc7ef73efc46d7c3a0e185eefaf85744aec98.
It removed the fallback from hardware profiling to software profiling.
.e.g., in a VM with no PMU.
Reported-by: David Ahern <daahern@cisco.com>
Cc: David Ahern <daahern@cisco.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-record.c | 3 ---
tools/perf/builtin-top.c | 2 --
2 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index aa7ece3..1210e64 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -331,9 +331,6 @@ try_again:
else if (err == ENODEV && cpu_list) {
die("No such device - did you specify"
" an out-of-range profile CPU?\n");
- } else if (err == ENOENT) {
- die("%s event is not supported. ",
- event_name(evsel));
} else if (err == EINVAL && sample_id_all_avail) {
/*
* Old kernel, no attr->sample_id_type_all field
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 568b195..05344c6 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1247,8 +1247,6 @@ try_again:
die("Permission error - are you root?\n"
"\t Consider tweaking"
" /proc/sys/kernel/perf_event_paranoid.\n");
- if (err == ENOENT)
- die("%s event is not supported. ", event_name(evsel));
/*
* If it's cycles then fall back to hrtimer
* based cpu-clock-tick sw counter, which
--
1.6.2.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [GIT PULL 0/3] perf/urgent fixes
2011-01-11 19:50 [GIT PULL 0/3] perf/urgent fixes Arnaldo Carvalho de Melo
` (2 preceding siblings ...)
2011-01-11 19:50 ` [PATCH 3/3] Revert "perf tools: Emit clearer message for sys_perf_event_open ENOENT return" Arnaldo Carvalho de Melo
@ 2011-01-12 8:36 ` Ingo Molnar
3 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2011-01-12 8:36 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, David Ahern, Frederic Weisbecker, Kirill Smelkov,
Mike Galbraith, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
Thomas Renninger, Tom Zanussi
* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:
> Hi Ingo,
>
> Please consider pulling from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 perf/urgent
>
> Regards,
>
> - Arnaldo
>
> Arnaldo Carvalho de Melo (3):
> perf evsel: Fix order of event list deletion
> perf top: Fix annotate segv
> Revert "perf tools: Emit clearer message for sys_perf_event_open ENOENT return"
>
> tools/perf/builtin-record.c | 4 +---
> tools/perf/builtin-stat.c | 1 +
> tools/perf/builtin-top.c | 5 +++--
> tools/perf/perf.c | 2 --
> 4 files changed, 5 insertions(+), 7 deletions(-)
Pulled, thanks a lot Arnaldo!
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-01-12 8:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-11 19:50 [GIT PULL 0/3] perf/urgent fixes Arnaldo Carvalho de Melo
2011-01-11 19:50 ` [PATCH 1/3] perf evsel: Fix order of event list deletion Arnaldo Carvalho de Melo
2011-01-11 19:50 ` [PATCH 2/3] perf top: Fix annotate segv Arnaldo Carvalho de Melo
2011-01-11 19:50 ` [PATCH 3/3] Revert "perf tools: Emit clearer message for sys_perf_event_open ENOENT return" Arnaldo Carvalho de Melo
2011-01-12 8:36 ` [GIT PULL 0/3] perf/urgent fixes Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®