Re: [perf] howto switch from pfmon

From: Ingo Molnar
Date: Mon Jun 29 2009 - 15:29:35 EST



* Brice Goglin <Brice.Goglin@xxxxxxxx> wrote:

> > How many threads does your workload typically run, and how do
> > you get their stats displayed?
>
> In the aforementioned OpenMP stuff, we use pfmon to get the
> local/remote numa memory access ratio of each thread. In this
> specific case, we bind one thread per core (even with a O(1)
> scheduler, people tend to avoid launching hundreds of threads on
> current machines). pfmon gives us something similar to the output
> of 'perf stat' in a file whose filename contains process and
> thread IDs. We apply our own custom script to convert these many
> pfmon output files into a single summary saying for each thread,
> its thread ID, its core binding, its individual numa node access
> numbers and percentages, and if they were local or remote (with
> the Barcelona counters we were talking about, you need to check
> where you were running before you know if accesses to node X are
> actually local or remote accesses).

Update: based on your feedback the latest perfcounters tree includes
the following new perf record features:

-s, --stat per thread counts
-n, --no-samples don't sample

--stat instructs the kernel to gather precise per task/thread stats
and emits those counts to the data file. Via --no-samples one can do
non-profiling runs - i.e. only statistics collection.

The 'perf stat' pretty printing side is not fully implemented yet -
right now you can only see these stats if you look for
PERF_EVENT_READ counts in the raw event log:

perf report -D | grep PERF_EVENT_READ

But the biggest piece, the kernel and perf record side is there
already. What kind of output would you prefer? Maybe you'd like to
take a stab at implementing the perf report side?

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/