Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191357
b: refs/heads/master
c: 2e6cdf9
h: refs/heads/master
i:
  191355: 60f697b
v: v3
  • Loading branch information
Stephane Eranian authored and Arnaldo Carvalho de Melo committed May 13, 2010
1 parent 1776a28 commit e772e6f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8a0ecfb8b47dc765fdf460913231876bbc95385e
refs/heads/master: 2e6cdf996ba43ce0b090ffbf754f83e17362cd69
4 changes: 2 additions & 2 deletions trunk/tools/perf/Documentation/perf-record.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions trunk/tools/perf/Documentation/perf-stat.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions trunk/tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions trunk/tools/perf/builtin-stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit e772e6f

Please sign in to comment.