Re: [PATCH 1/1] perf record: We should fork only if a program wasspecified to run

From: Ingo Molnar
Date: Fri Dec 18 2009 - 17:04:19 EST



* Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:

> > Because we want this to work:
> >
> > [root@doppio linux-2.6-tip]# perf record -a -f sleep 2
> > [ perf record: Woken up 1 times to write data ]
> > [ perf record: Captured and wrote 0.243 MB perf.data (~10599 samples) ]
> > [root@doppio linux-2.6-tip]#
> >
> > See, no hands mother! I.e. it is system wide, but just for 2 seconds,
> > its clever, but I like it, and it always worked :-)
>
> Ah, right.. yes, totally forgot about that.

I use the 'perf record -a -f sleep 1' trick all the time to capture a
system-wide snippet of a particular workload.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/