Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263184
b: refs/heads/master
c: 43bece7
h: refs/heads/master
v: v3
  • Loading branch information
Lin Ming authored and Arnaldo Carvalho de Melo committed Aug 18, 2011
1 parent 5bde728 commit 93da349
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 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: d53e8365eaacfdb29253b39d186109f5b4fcc08d
refs/heads/master: 43bece79796c2a39ec98998fd3f1071f04f3d8c3
4 changes: 3 additions & 1 deletion trunk/tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static int freq = 1000;
static int output;
static int pipe_output = 0;
static const char *output_name = NULL;
static int group = 0;
static bool group = false;
static int realtime_prio = 0;
static bool nodelay = false;
static bool raw_samples = false;
Expand Down Expand Up @@ -753,6 +753,8 @@ const struct option record_options[] = {
"child tasks do not inherit counters"),
OPT_UINTEGER('F', "freq", &user_freq, "profile at this frequency"),
OPT_UINTEGER('m', "mmap-pages", &mmap_pages, "number of mmap data pages"),
OPT_BOOLEAN(0, "group", &group,
"put the counters into a counter group"),
OPT_BOOLEAN('g', "call-graph", &call_graph,
"do call-graph (stack chain/backtrace) recording"),
OPT_INCR('v', "verbose", &verbose,
Expand Down
7 changes: 5 additions & 2 deletions trunk/tools/perf/builtin-stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ static int big_num_opt = -1;
static const char *cpu_list;
static const char *csv_sep = NULL;
static bool csv_output = false;
static bool group = false;

static volatile int done = 0;

Expand Down Expand Up @@ -280,14 +281,14 @@ static int create_perf_stat_counter(struct perf_evsel *evsel)
attr->inherit = !no_inherit;

if (system_wide)
return perf_evsel__open_per_cpu(evsel, evsel_list->cpus, false);
return perf_evsel__open_per_cpu(evsel, evsel_list->cpus, group);

if (target_pid == -1 && target_tid == -1) {
attr->disabled = 1;
attr->enable_on_exec = 1;
}

return perf_evsel__open_per_thread(evsel, evsel_list->threads, false);
return perf_evsel__open_per_thread(evsel, evsel_list->threads, group);
}

/*
Expand Down Expand Up @@ -1043,6 +1044,8 @@ static const struct option options[] = {
"stat events on existing thread id"),
OPT_BOOLEAN('a', "all-cpus", &system_wide,
"system-wide collection from all CPUs"),
OPT_BOOLEAN('g', "group", &group,
"put the counters into a counter group"),
OPT_BOOLEAN('c', "scale", &scale,
"scale/normalize counters"),
OPT_INCR('v', "verbose", &verbose,
Expand Down

0 comments on commit 93da349

Please sign in to comment.