* [GIT PULL 0/4] perf tools fixes
@ 2010-05-13 20:19 Arnaldo Carvalho de Melo
2010-05-13 20:19 ` [PATCH 1/4] perf hist: Fix hists__browse no-newt case Arnaldo Carvalho de Melo
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-05-13 20:19 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, David S. Miller,
Frédéric Weisbecker, Kirill Smelkov, Paul Mackerras,
Peter Zijlstra, Mike Galbraith, Tom Zanussi
Hi Ingo,
Please pull from:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 perf
Regards,
- Arnaldo
Frederic Weisbecker (2):
perf hist: Fix hists__browse no-newt case
perf hist: Fix missing getline declaration
Kirill Smelkov (1):
perf trace scripts: Fix typos in perf-trace-python.txt
Stephane Eranian (1):
perf tools: change event inheritance logic in stat and record
tools/perf/Documentation/perf-record.txt | 4 ++--
tools/perf/Documentation/perf-stat.txt | 4 ++--
tools/perf/Documentation/perf-trace-python.txt | 4 ++--
tools/perf/builtin-record.c | 12 ++++++------
tools/perf/builtin-stat.c | 10 +++++-----
tools/perf/util/hist.c | 1 +
tools/perf/util/hist.h | 2 +-
7 files changed, 19 insertions(+), 18 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/4] perf hist: Fix hists__browse no-newt case
2010-05-13 20:19 [GIT PULL 0/4] perf tools fixes Arnaldo Carvalho de Melo
@ 2010-05-13 20:19 ` Arnaldo Carvalho de Melo
2010-05-13 20:19 ` [PATCH 2/4] perf hist: Fix missing getline declaration Arnaldo Carvalho de Melo
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-05-13 20:19 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Frederic Weisbecker, Ingo Molnar, Peter Zijlstra,
Arnaldo Carvalho de Melo, Paul Mackerras
From: Frederic Weisbecker <fweisbec@gmail.com>
Fix mistake in a parameter type of the no-newt hists__browse()
version.
Fixes:
builtin-report.c: In function ‘__cmd_report’:
builtin-report.c:314: erreur: incompatible type for argument 1 of ‘hists__browse’
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1273771378-8577-1-git-send-regression-fweisbec@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/hist.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index ed9c067..0b4c8df 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -78,7 +78,7 @@ void hists__filter_by_dso(struct hists *self, const struct dso *dso);
void hists__filter_by_thread(struct hists *self, const struct thread *thread);
#ifdef NO_NEWT_SUPPORT
-static inline int hists__browse(struct hists self __used,
+static inline int hists__browse(struct hists *self __used,
const char *helpline __used,
const char *input_name __used)
{
--
1.6.2.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] perf hist: Fix missing getline declaration
2010-05-13 20:19 [GIT PULL 0/4] perf tools fixes Arnaldo Carvalho de Melo
2010-05-13 20:19 ` [PATCH 1/4] perf hist: Fix hists__browse no-newt case Arnaldo Carvalho de Melo
@ 2010-05-13 20:19 ` Arnaldo Carvalho de Melo
2010-05-13 20:19 ` [PATCH 3/4] perf tools: change event inheritance logic in stat and record Arnaldo Carvalho de Melo
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-05-13 20:19 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Frederic Weisbecker, Ingo Molnar, Peter Zijlstra,
Arnaldo Carvalho de Melo, Paul Mackerras
From: Frederic Weisbecker <fweisbec@gmail.com>
hist.c needs to include util.h so that it gets stdio.h
inclusion with __GNU_SOURCE defined.
Fixes:
util/hist.c: In function ‘hist_entry__parse_objdump_line’:
util/hist.c:931: erreur: implicit declaration of function ‘getline’
util/hist.c:931: erreur: nested extern declaration of ‘getline’
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1273772836-11533-1-git-send-regression-fweisbec@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/hist.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 451d2e4..5dc4f84 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -1,3 +1,4 @@
+#include "util.h"
#include "hist.h"
#include "session.h"
#include "sort.h"
--
1.6.2.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] perf tools: change event inheritance logic in stat and record
2010-05-13 20:19 [GIT PULL 0/4] perf tools fixes Arnaldo Carvalho de Melo
2010-05-13 20:19 ` [PATCH 1/4] perf hist: Fix hists__browse no-newt case Arnaldo Carvalho de Melo
2010-05-13 20:19 ` [PATCH 2/4] perf hist: Fix missing getline declaration Arnaldo Carvalho de Melo
@ 2010-05-13 20:19 ` Arnaldo Carvalho de Melo
2010-05-13 20:19 ` [PATCH 4/4] perf trace scripts: Fix typos in perf-trace-python.txt Arnaldo Carvalho de Melo
2010-05-14 6:22 ` [GIT PULL 0/4] perf tools fixes Ingo Molnar
4 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-05-13 20:19 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Stephane Eranian, David S. Miller,
Frédéric Weisbecker, Ingo Molnar, Paul Mackerras,
Peter Zijlstra, Arnaldo Carvalho de Melo
From: Stephane Eranian <eranian@google.com>
By default, event inheritance across fork and pthread_create was on but the -i
option of stat and record, which enabled inheritance, led to believe it was off
by default.
This patch fixes this logic by inverting the meaning of the -i option. By
default inheritance is on whether you attach to a process (-p), a thread (-t)
or start a process. If you pass -i, then you turn off inheritance. Turning off
inheritance if you don't need it, helps limit perf resource usage as well.
The patch also fixes perf stat -t xxxx and perf record -t xxxx which did not
start the counters.
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <4bea9d2f.d60ce30a.0b5b.08e1@mx.google.com>
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Documentation/perf-record.txt | 4 ++--
tools/perf/Documentation/perf-stat.txt | 4 ++--
tools/perf/builtin-record.c | 12 ++++++------
tools/perf/builtin-stat.c | 10 +++++-----
4 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
index 020d871..34e255f 100644
--- a/tools/perf/Documentation/perf-record.txt
+++ b/tools/perf/Documentation/perf-record.txt
@@ -69,8 +69,8 @@ OPTIONS
Output file name.
-i::
---inherit::
- Child tasks inherit counters.
+--no-inherit::
+ Child tasks do not inherit counters.
-F::
--freq=::
Profile at this frequency.
diff --git a/tools/perf/Documentation/perf-stat.txt b/tools/perf/Documentation/perf-stat.txt
index 484080d..2cab8e8 100644
--- a/tools/perf/Documentation/perf-stat.txt
+++ b/tools/perf/Documentation/perf-stat.txt
@@ -31,8 +31,8 @@ OPTIONS
hexadecimal event descriptor.
-i::
---inherit::
- child tasks inherit counters
+--no-inherit::
+ child tasks do not inherit counters
-p::
--pid=<pid>::
stat events on existing pid
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 6b77b28..0f467cf 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -54,7 +54,7 @@ static pid_t target_tid = -1;
static pid_t *all_tids = NULL;
static int thread_num = 0;
static pid_t child_pid = -1;
-static bool inherit = true;
+static bool no_inherit = false;
static enum write_mode_t write_mode = WRITE_FORCE;
static bool call_graph = false;
static bool inherit_stat = false;
@@ -298,8 +298,8 @@ static void create_counter(int counter, int cpu)
attr->mmap = track;
attr->comm = track;
- attr->inherit = inherit;
- if (target_pid == -1 && !system_wide) {
+ attr->inherit = !no_inherit;
+ if (target_pid == -1 && target_tid == -1 && !system_wide) {
attr->disabled = 1;
attr->enable_on_exec = 1;
}
@@ -641,7 +641,7 @@ static int __cmd_record(int argc, const char **argv)
close(child_ready_pipe[0]);
}
- if ((!system_wide && !inherit) || profile_cpu != -1) {
+ if ((!system_wide && no_inherit) || profile_cpu != -1) {
open_counters(profile_cpu);
} else {
nr_cpus = read_cpu_map();
@@ -821,8 +821,8 @@ static const struct option options[] = {
"event period to sample"),
OPT_STRING('o', "output", &output_name, "file",
"output file name"),
- OPT_BOOLEAN('i', "inherit", &inherit,
- "child tasks inherit counters"),
+ OPT_BOOLEAN('i', "no-inherit", &no_inherit,
+ "child tasks do not inherit counters"),
OPT_INTEGER('F', "freq", &user_freq,
"profile at this frequency"),
OPT_INTEGER('m', "mmap-pages", &mmap_pages,
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index e619ac8..ff8c413 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -72,7 +72,7 @@ static unsigned int nr_cpus = 0;
static int run_idx = 0;
static int run_count = 1;
-static bool inherit = true;
+static bool no_inherit = false;
static bool scale = true;
static pid_t target_pid = -1;
static pid_t target_tid = -1;
@@ -167,8 +167,8 @@ static int create_perf_stat_counter(int counter)
++ncreated;
}
} else {
- attr->inherit = inherit;
- if (target_pid == -1) {
+ attr->inherit = !no_inherit;
+ if (target_pid == -1 && target_tid == -1) {
attr->disabled = 1;
attr->enable_on_exec = 1;
}
@@ -518,8 +518,8 @@ static const struct option options[] = {
OPT_CALLBACK('e', "event", NULL, "event",
"event selector. use 'perf list' to list available events",
parse_events),
- OPT_BOOLEAN('i', "inherit", &inherit,
- "child tasks inherit counters"),
+ OPT_BOOLEAN('i', "no-inherit", &no_inherit,
+ "child tasks do not inherit counters"),
OPT_INTEGER('p', "pid", &target_pid,
"stat events on existing process id"),
OPT_INTEGER('t', "tid", &target_tid,
--
1.6.2.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] perf trace scripts: Fix typos in perf-trace-python.txt
2010-05-13 20:19 [GIT PULL 0/4] perf tools fixes Arnaldo Carvalho de Melo
` (2 preceding siblings ...)
2010-05-13 20:19 ` [PATCH 3/4] perf tools: change event inheritance logic in stat and record Arnaldo Carvalho de Melo
@ 2010-05-13 20:19 ` Arnaldo Carvalho de Melo
2010-05-14 6:22 ` [GIT PULL 0/4] perf tools fixes Ingo Molnar
4 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-05-13 20:19 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Kirill Smelkov, Tom Zanussi,
Arnaldo Carvalho de Melo
From: Kirill Smelkov <kirr@mns.spb.ru>
option option -> option
special special -> special
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <1273747165-17242-1-git-send-email-kirr@mns.spb.ru>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Documentation/perf-trace-python.txt | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/Documentation/perf-trace-python.txt b/tools/perf/Documentation/perf-trace-python.txt
index 864aac2..693be80 100644
--- a/tools/perf/Documentation/perf-trace-python.txt
+++ b/tools/perf/Documentation/perf-trace-python.txt
@@ -182,7 +182,7 @@ mean either that the record step recorded event types that it wasn't
really interested in, or the script was run against a trace file that
doesn't correspond to the script.
-The script generated by -g option option simply prints a line for each
+The script generated by -g option simply prints a line for each
event found in the trace stream i.e. it basically just dumps the event
and its parameter values to stdout. The print_header() function is
simply a utility function used for that purpose. Let's rename the
@@ -582,7 +582,7 @@ files:
flag_str(event_name, field_name, field_value) - returns the string represention corresponding to field_value for the flag field field_name of event event_name
symbol_str(event_name, field_name, field_value) - returns the string represention corresponding to field_value for the symbolic field field_name of event event_name
-The *autodict* function returns a special special kind of Python
+The *autodict* function returns a special kind of Python
dictionary that implements Perl's 'autovivifying' hashes in Python
i.e. with autovivifying hashes, you can assign nested hash values
without having to go to the trouble of creating intermediate levels if
--
1.6.2.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [GIT PULL 0/4] perf tools fixes
2010-05-13 20:19 [GIT PULL 0/4] perf tools fixes Arnaldo Carvalho de Melo
` (3 preceding siblings ...)
2010-05-13 20:19 ` [PATCH 4/4] perf trace scripts: Fix typos in perf-trace-python.txt Arnaldo Carvalho de Melo
@ 2010-05-14 6:22 ` Ingo Molnar
4 siblings, 0 replies; 6+ messages in thread
From: Ingo Molnar @ 2010-05-14 6:22 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, David S. Miller, Fr??d??ric Weisbecker,
Kirill Smelkov, Paul Mackerras, Peter Zijlstra, Mike Galbraith,
Tom Zanussi
* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:
> Hi Ingo,
>
> Please pull from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 perf
>
> Regards,
>
> - Arnaldo
>
>
> Frederic Weisbecker (2):
> perf hist: Fix hists__browse no-newt case
> perf hist: Fix missing getline declaration
>
> Kirill Smelkov (1):
> perf trace scripts: Fix typos in perf-trace-python.txt
>
> Stephane Eranian (1):
> perf tools: change event inheritance logic in stat and record
>
> tools/perf/Documentation/perf-record.txt | 4 ++--
> tools/perf/Documentation/perf-stat.txt | 4 ++--
> tools/perf/Documentation/perf-trace-python.txt | 4 ++--
> tools/perf/builtin-record.c | 12 ++++++------
> tools/perf/builtin-stat.c | 10 +++++-----
> tools/perf/util/hist.c | 1 +
> tools/perf/util/hist.h | 2 +-
> 7 files changed, 19 insertions(+), 18 deletions(-)
Pulled, thanks Arnaldo!
Ingo
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-05-14 6:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-13 20:19 [GIT PULL 0/4] perf tools fixes Arnaldo Carvalho de Melo
2010-05-13 20:19 ` [PATCH 1/4] perf hist: Fix hists__browse no-newt case Arnaldo Carvalho de Melo
2010-05-13 20:19 ` [PATCH 2/4] perf hist: Fix missing getline declaration Arnaldo Carvalho de Melo
2010-05-13 20:19 ` [PATCH 3/4] perf tools: change event inheritance logic in stat and record Arnaldo Carvalho de Melo
2010-05-13 20:19 ` [PATCH 4/4] perf trace scripts: Fix typos in perf-trace-python.txt Arnaldo Carvalho de Melo
2010-05-14 6:22 ` [GIT PULL 0/4] perf tools fixes Ingo Molnar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.