Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191284
b: refs/heads/master
c: db620b1
h: refs/heads/master
v: v3
  • Loading branch information
Tom Zanussi authored and Arnaldo Carvalho de Melo committed May 5, 2010
1 parent dc2cd1c commit 676aea8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 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: 9890948d857c2120c234b0ca91a80416e8f747fb
refs/heads/master: db620b1c2fb172346dc54eb62bba9b4a117d173b
11 changes: 1 addition & 10 deletions trunk/tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,17 +560,8 @@ static int __cmd_record(int argc, const char **argv)
return err;
}

if (raw_samples && have_tracepoints(attrs, nr_counters)) {
if (have_tracepoints(attrs, nr_counters))
perf_header__set_feat(&session->header, HEADER_TRACE_INFO);
} else {
for (i = 0; i < nr_counters; i++) {
if (attrs[i].sample_type & PERF_SAMPLE_RAW &&
attrs[i].type == PERF_TYPE_TRACEPOINT) {
perf_header__set_feat(&session->header, HEADER_TRACE_INFO);
break;
}
}
}

atexit(atexit_header);

Expand Down
8 changes: 7 additions & 1 deletion trunk/tools/perf/util/trace-event-info.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,13 @@ get_tracepoints_path(struct perf_event_attr *pattrs, int nb_events)

bool have_tracepoints(struct perf_event_attr *pattrs, int nb_events)
{
return get_tracepoints_path(pattrs, nb_events) ? true : false;
int i;

for (i = 0; i < nb_events; i++)
if (pattrs[i].type == PERF_TYPE_TRACEPOINT)
return true;

return false;
}

int read_tracing_data(int fd, struct perf_event_attr *pattrs, int nb_events)
Expand Down

0 comments on commit 676aea8

Please sign in to comment.