Merge branch 'perf/urgent' into perf/core

Merge reason: We want to apply a dependent patch.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Ingo Molnar
2010-12-16 11:22:25 +01:00
63 changed files with 906 additions and 221 deletions

View File

@@ -971,11 +971,16 @@ perf_header__find_attr(u64 id, struct perf_header *header)
/*
* 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.
* ids. This can happen when the data file contains one type
* of event and in that case, the header can still store the
* event attribute information. Check for this and avoid
* walking through the entire list of ids which may be large.
*/
if (id == -1ULL)
if (id == -1ULL) {
if (header->attrs > 0)
return &header->attr[0]->attr;
return NULL;
}
for (i = 0; i < header->attrs; i++) {
struct perf_header_attr *attr = header->attr[i];