Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349905
b: refs/heads/master
c: f77a951
h: refs/heads/master
i:
  349903: ff0fd5d
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Dec 11, 2012
1 parent 228a007 commit af89f6f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 15 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: 62b807f64948f55776b1cc57298966d915b1a402
refs/heads/master: f77a951826b44b763e4d9fbd2479b6132d2bd7fc
9 changes: 1 addition & 8 deletions trunk/tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,7 @@ static int perf_record__open(struct perf_record *rec)
struct perf_record_opts *opts = &rec->opts;
int rc = 0;

/*
* Set the evsel leader links before we configure attributes,
* since some might depend on this info.
*/
if (opts->group)
perf_evlist__set_leader(evlist);

perf_evlist__config_attrs(evlist, opts);
perf_evlist__config(evlist, opts);

list_for_each_entry(pos, &evlist->entries, node) {
struct perf_event_attr *attr = &pos->attr;
Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/builtin-trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
goto out_delete_evlist;
}

perf_evlist__config_attrs(evlist, &trace->opts);
perf_evlist__config(evlist, &trace->opts);

signal(SIGCHLD, sig_handler);
signal(SIGINT, sig_handler);
Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/tests/perf-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ int test__PERF_RECORD(void)
perf_evsel__set_sample_bit(evsel, CPU);
perf_evsel__set_sample_bit(evsel, TID);
perf_evsel__set_sample_bit(evsel, TIME);
perf_evlist__config_attrs(evlist, &opts);
perf_evlist__config(evlist, &opts);

err = sched__get_first_possible_cpu(evlist->workload.pid, &cpu_mask);
if (err < 0) {
Expand Down
10 changes: 8 additions & 2 deletions trunk/tools/perf/util/evlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,16 @@ struct perf_evlist *perf_evlist__new(struct cpu_map *cpus,
return evlist;
}

void perf_evlist__config_attrs(struct perf_evlist *evlist,
struct perf_record_opts *opts)
void perf_evlist__config(struct perf_evlist *evlist,
struct perf_record_opts *opts)
{
struct perf_evsel *evsel;
/*
* Set the evsel leader links before we configure attributes,
* since some might depend on this info.
*/
if (opts->group)
perf_evlist__set_leader(evlist);

if (evlist->cpus->map[0] < 0)
opts->no_inherit = true;
Expand Down
4 changes: 2 additions & 2 deletions trunk/tools/perf/util/evlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ union perf_event *perf_evlist__mmap_read(struct perf_evlist *self, int idx);

int perf_evlist__open(struct perf_evlist *evlist);

void perf_evlist__config_attrs(struct perf_evlist *evlist,
struct perf_record_opts *opts);
void perf_evlist__config(struct perf_evlist *evlist,
struct perf_record_opts *opts);

int perf_evlist__prepare_workload(struct perf_evlist *evlist,
struct perf_record_opts *opts,
Expand Down

0 comments on commit af89f6f

Please sign in to comment.