Skip to contentSkip to conversation

perf: avoid synthesizing mmap() for all processes in per-thread mode perf record

PATCH In review Stephane Eranian 2 participants 2 messages Jun 16, 2010 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf: avoid synthesizing mmap() for all processes in per-thread mode perf record

A bug was introduced by commit c45c6ea2e5c57960dc67e00294c2b78e9540c007.

Perf record was scanning /proc/PID to create synthetic PERF_RECOR_MMAP entries even though it was running in per-thread mode. There was a bogus check to select what mmaps to synthesize. We only need all processes in system-wide mode.

tools/perf/builtin-record.c +1 -1
index 39c7247..5efc3fc 100644
@@ -714,7 +714,7 @@ static int __cmd_record(int argc, const char **argv)
 	if (perf_guest)
 		perf_session__process_machines(session, event__synthesize_guest_os);
 
-	if (!system_wide && cpu_list)
+	if (!system_wide)
 		event__synthesize_thread(target_tid, process_synthesized_event,
 					 session);
 	else
#1 lore raw

Em Wed, Jun 16, 2010 at 08:59:01PM +0200, Stephane Eranian escreveu:

Quoted 8 lines

A bug was introduced by commit c45c6ea2e5c57960dc67e00294c2b78e9540c007.

Perf record was scanning /proc/PID to create synthetic PERF_RECOR_MMAP entries even though it was running in per-thread mode. There was a bogus check to select what mmaps to synthesize. We only need all processes in system-wide mode.

Thanks, appling to perf/urgent

- Arnaldo