Re: [PATCH 0/26] oprofile: Performance counter multiplexing

From: Ingo Molnar
Date: Tue Aug 04 2009 - 16:11:49 EST



* Arjan van de Ven <arjan@xxxxxxxxxxxxx> wrote:

> On Mon, 3 Aug 2009 13:22:20 +0200
> Ingo Molnar <mingo@xxxxxxx> wrote:
> >
> > This new oprofile multiplexing mechanism really overlaps the PMU
> > abstractions that perfcounters already provide, and i disagree
> > with this general direction. The code you wrote is clean though
> > so i've
>
> is there any way that the oprofile interfaces can be written on
> top of the low level perf infrastructure?

Everything 'can' be done - the question is, is that the best
approach? The technically best interface to utilize perfcounters is
not to whack it into the oprofile kernel code, but to minimally
update the oprofile user-space code (the sample collection daemon)
to use the sys_perf_counter_open() system call.

It is by far the most elegant solution and needs no kernel changes
at all:

The oprofile daemon should open percpu sampling counters and create
oprofile-compatible sample files. That way the rest of the oprofile
user-space does not have to be touched at all. The raw event ids
that oprofile knows about can be used in perfcounter parameters
directly.

In such a mode of operation both oprofilefs and the dcookies syscall
can be omitted completely - all of the kernel side oprofile code
becomes mooted and pushed into legacy mode.

Is there any reason or oprofile property that makes this impossible
or undesirable to do?

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/