Re: perf monitoring triggers Was: Re: [tip:perf/core] perf bench:Print both of prefaulted and no prefaulted results by default

From: Peter Zijlstra
Date: Mon Dec 13 2010 - 06:16:00 EST


On Sun, 2010-12-12 at 11:46 -0200, Arnaldo Carvalho de Melo wrote:
> Em Sun, Dec 12, 2010 at 02:15:25AM +0900, Hitoshi Mitake escreveu:
> > BTW, I found that measuring performance of prefaulted memcpy()
> > with perf stat is difficult. Because current perf stat monitors
> > whole execution of program or range of perf stat lifetime.
>
> > If perf stat and monitored program can interact and work
> > synchronously, it will be better.
>
> > For example, if perf stat waits on the unix domain socket
> > before create_perf_stat_counter() and monitored program wakes perf stat
> > up through the socket, more fine grain monitoring will be possible.
>
> > I imagine the execution will be like this:
> > perf stat --wait-on /tmp/perf_wait perf bench mem memcpy --wake-up
> > /tmp/perf_wait
>
> > --wait-on is imaginaly option of perf stat, and the way of waking up
> > perf stat is left to monitored program (in this case, --wake-up is
> > used for specifying the name of the socket).
>
> > I'd like to implement such a option to perf stat, how do you think?
>
> Looks interesting, and also interesting would be to be able to place
> probes that would wake up it too, for unmodified binaries to have
> something similar.
>
> Other kinds of triggers may be to hook on syscalls and when some
> expression matches, like connecting to host 1.2.3.4, start monitoring,
> stop when the socket is closed, i.e. monitor a connection lifetime, etc.
>
> I think it is worth pursuing and encourage you to work on it :-)

Sounds to me like you want something like a library with self-monitoring
stuff.
--
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/