Re: [PATCH] x86: add the debugfs interface for the sysprof tool

From: Ingo Molnar
Date: Sat Feb 23 2008 - 06:38:15 EST



* Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:

> > Sysprof needs a 200 line kernel module to do it's work, this module
> > puts some simple profiling data into debugfs.
> >
> > ...
>
> Seems a poor idea to me. Sure, oprofile is "hard to set up", but not
> if your distributor already did it for you.

two things.

Firstly, this isnt an oprofile replacement, this is a pretty separate
concept. Sysprof is more of a tracer than a profiler. (and we are
currently working on merging it into ftrace)

Secondly, real developers who tune user-space code disagree with your
characterisation of oprofile being easy to use. _Please_ just ask any
developer around you who hasnt used oprofile before to try sysprof
versus oprofile - without looking at any docs. Give him minimal context
and two starting points: "opcontrol" and "sysprof" - nothing else. Give
him a very simple test.c code:

void test_fn(void)
{
for (;;)
gettimeofday(0, 0);
}

int main(void)
{
test_fn();
}

and ask him to try oprofile and then to try sysprof as a comparison - to
and figure in which app and which function the overhead is.

then measure the time it takes to solve this task via the two tools and
ask the developer's first impression about the two tools.

> On Wed, 20 Feb 2008 10:10:22 +0100 Ingo Molnar <mingo@xxxxxxx> wrote:
> >
> > thanks, looks good to me - applied.
>
> This is pretty distressing, frankly. The threshold for getting code into
> Linux should be much higher than this.
>
> I do not have the time to review everything which goes into all the git
> trees. Better review, please.

that was for x86.git#testing, it's not even in x86.git#mm.

It's 200 lines of pretty well isolated code for something that is
already much more usable to me than 10 years of oprofile. Really, i'd
much rather take 200 lines of poor kernel code written by a userspace
developer for stuff that _already works better_, than to have ~2000
lines of oprofile code and an unusable (to me) user-space tool written
by kernel developers.

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/