Merge branch 'perf/urgent' into perf/core
Conflicts: tools/perf/builtin-record.c tools/perf/builtin-top.c tools/perf/util/hist.h
This commit is contained in:
@@ -290,6 +290,7 @@ static int process_events(struct machine *machine, struct perf_evlist *evlist,
|
||||
for (i = 0; i < evlist->nr_mmaps; i++) {
|
||||
while ((event = perf_evlist__mmap_read(evlist, i)) != NULL) {
|
||||
ret = process_event(machine, evlist, event, state);
|
||||
perf_evlist__mmap_consume(evlist, i);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
@@ -36,6 +36,7 @@ static int find_comm(struct perf_evlist *evlist, const char *comm)
|
||||
(pid_t)event->comm.tid == getpid() &&
|
||||
strcmp(event->comm.comm, comm) == 0)
|
||||
found += 1;
|
||||
perf_evlist__mmap_consume(evlist, i);
|
||||
}
|
||||
}
|
||||
return found;
|
||||
|
@@ -122,6 +122,7 @@ int test__basic_mmap(void)
|
||||
goto out_munmap;
|
||||
}
|
||||
nr_events[evsel->idx]++;
|
||||
perf_evlist__mmap_consume(evlist, 0);
|
||||
}
|
||||
|
||||
err = 0;
|
||||
|
@@ -77,8 +77,10 @@ int test__syscall_open_tp_fields(void)
|
||||
|
||||
++nr_events;
|
||||
|
||||
if (type != PERF_RECORD_SAMPLE)
|
||||
if (type != PERF_RECORD_SAMPLE) {
|
||||
perf_evlist__mmap_consume(evlist, i);
|
||||
continue;
|
||||
}
|
||||
|
||||
err = perf_evsel__parse_sample(evsel, event, &sample);
|
||||
if (err) {
|
||||
|
@@ -253,6 +253,8 @@ int test__PERF_RECORD(void)
|
||||
type);
|
||||
++errs;
|
||||
}
|
||||
|
||||
perf_evlist__mmap_consume(evlist, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -122,7 +122,7 @@ int test__perf_time_to_tsc(void)
|
||||
if (event->header.type != PERF_RECORD_COMM ||
|
||||
(pid_t)event->comm.pid != getpid() ||
|
||||
(pid_t)event->comm.tid != getpid())
|
||||
continue;
|
||||
goto next_event;
|
||||
|
||||
if (strcmp(event->comm.comm, comm1) == 0) {
|
||||
CHECK__(perf_evsel__parse_sample(evsel, event,
|
||||
@@ -134,6 +134,8 @@ int test__perf_time_to_tsc(void)
|
||||
&sample));
|
||||
comm2_time = sample.time;
|
||||
}
|
||||
next_event:
|
||||
perf_evlist__mmap_consume(evlist, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -78,7 +78,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
|
||||
struct perf_sample sample;
|
||||
|
||||
if (event->header.type != PERF_RECORD_SAMPLE)
|
||||
continue;
|
||||
goto next_event;
|
||||
|
||||
err = perf_evlist__parse_sample(evlist, event, &sample);
|
||||
if (err < 0) {
|
||||
@@ -88,6 +88,8 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
|
||||
|
||||
total_periods += sample.period;
|
||||
nr_samples++;
|
||||
next_event:
|
||||
perf_evlist__mmap_consume(evlist, 0);
|
||||
}
|
||||
|
||||
if ((u64) nr_samples == total_periods) {
|
||||
|
@@ -87,10 +87,10 @@ int test__task_exit(void)
|
||||
|
||||
retry:
|
||||
while ((event = perf_evlist__mmap_read(evlist, 0)) != NULL) {
|
||||
if (event->header.type != PERF_RECORD_EXIT)
|
||||
continue;
|
||||
if (event->header.type == PERF_RECORD_EXIT)
|
||||
nr_exit++;
|
||||
|
||||
nr_exit++;
|
||||
perf_evlist__mmap_consume(evlist, 0);
|
||||
}
|
||||
|
||||
if (!exited || !nr_exit) {
|
||||
|
Reference in New Issue
Block a user