Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191281
b: refs/heads/master
c: 02bf60a
h: refs/heads/master
i:
  191279: 7c52e8e
v: v3
  • Loading branch information
Anton Blanchard authored and Arnaldo Carvalho de Melo committed May 4, 2010
1 parent 0c322c2 commit e6041c6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 11d232ec285b07860670277c8ab3f6076f7bce1e
refs/heads/master: 02bf60aad7d5912dfcdbe0154f1bd67ea7a8301e
1 change: 1 addition & 0 deletions trunk/tools/perf/util/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,7 @@ int event__parse_sample(event_t *event, u64 type, struct sample_data *data)
array++;
}

data->id = -1ULL;
if (type & PERF_SAMPLE_ID) {
data->id = *array;
array++;
Expand Down
8 changes: 8 additions & 0 deletions trunk/tools/perf/util/header.c
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,14 @@ perf_header__find_attr(u64 id, struct perf_header *header)
{
int i;

/*
* We set id to -1 if the data file doesn't contain sample
* ids. Check for this and avoid walking through the entire
* list of ids which may be large.
*/
if (id == -1ULL)
return NULL;

for (i = 0; i < header->attrs; i++) {
struct perf_header_attr *attr = header->attr[i];
int j;
Expand Down

0 comments on commit e6041c6

Please sign in to comment.