Re: [PATCH 05/16] perf: Add attribute to filter out user callchains

From: Peter Zijlstra
Date: Thu May 24 2012 - 06:57:51 EST


On Wed, 2012-05-23 at 21:32 +0200, Jiri Olsa wrote:
> Add the new exclude_user_callchain attribute to filter out
> frame pointer based user callchains.
>
> This is something we want to select when we use the dwarf cfi
> callchain mode, because frame pointer based user callchains are
> useless in this mode.
>
> Signed-off-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
> Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
> ---
> include/linux/perf_event.h | 4 +++-
> kernel/events/callchain.c | 4 ++--
> kernel/events/core.c | 3 ++-
> kernel/events/internal.h | 3 ++-
> 4 files changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
> index dcdc97e..df6ba37 100644
> --- a/include/linux/perf_event.h
> +++ b/include/linux/perf_event.h
> @@ -275,7 +275,9 @@ struct perf_event_attr {
> exclude_host : 1, /* don't count in host */
> exclude_guest : 1, /* don't count in guest */
>
> - __reserved_1 : 43;
> + exclude_user_callchain : 1, /* only record kernel callchains */

*sigh* I guess if we're going to do this we might as well do a complete
option set and also allow excluding kernel and possible hv if anybody
actually implemented that.

--
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/