Re: [PATCH] perf_counter tools: remove glib dependency and fix bugs in kerneltop.c

Peter Zijlstra
2009-03-24T07:57:49Z

On Tue, 2009-03-24 at 16:52 +1100, Paul Mackerras wrote:
> The glib dependency in kerneltop.c is only for a little bit of list
> manipulation, and I find it inconvenient. This adds a 'next' field to
> struct source_line, which lets us link them together into a list. The
> code to do the linking ourselves turns out to be no longer or more
> difficult than using glib.

Awesome!! now I can compile on my test machine as well (yum got stuck,
it doesn't want to go fwd nor backwards, and I can't find time to
reinstall the thing).

> This also fixes a few other problems:

> - We had two CPU migration counters in the default set, which seems
> unnecessary; I changed one of them to a context switch counter.

Ooh, my bad, copy/paste trouble I imagine.

> - On a test machine here, parse_symbols() and parse_vmlinux() were
> taking long enough (almost 0.5 seconds) for the mmap buffer to
> overflow before we got to the first mmap_read() call, so this moves
> them before we open all the counters.

Ah, thanks for looking into that!