Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1258016

Re: [RFC PATCH net-next 1/4] perf tools: Enable pre-event inherit setting by config terms

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH net-next 1/4] perf tools: Enable pre-event inherit setting by config terms
Date 2015-10-28 14:30 +0100
Message-ID <qoyXD-38X-3@gated-at.bofh.it> (permalink)
References <qowCu-1y1-7@gated-at.bofh.it> <qowCu-1y1-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Oct 28, 2015 at 10:55:02AM +0000, Wang Nan wrote:

SNIP

> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> index f820906..397fb4e 100644
> --- a/tools/perf/util/evsel.c
> +++ b/tools/perf/util/evsel.c
> @@ -653,6 +653,15 @@ static void apply_config_terms(struct perf_evsel *evsel,
>  		case PERF_EVSEL__CONFIG_TERM_STACK_USER:
>  			dump_size = term->val.stack_user;
>  			break;
> +		case PERF_EVSEL__CONFIG_TERM_INHERIT:
> +			/*
> +			 * attr->inherit should has already been set by
> +			 * perf_evsel__config. If user explicitly set
> +			 * inherit using config terms, override global
> +			 * opt->no_inherit setting.
> +			 */
> +			attr->inherit = term->val.inherit ? 1 : 0;
> +			break;
>  		default:
>  			break;
>  		}
> diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
> index 9a95e73..e402f83 100644
> --- a/tools/perf/util/evsel.h
> +++ b/tools/perf/util/evsel.h
> @@ -43,6 +43,7 @@ enum {
>  	PERF_EVSEL__CONFIG_TERM_TIME,
>  	PERF_EVSEL__CONFIG_TERM_CALLGRAPH,
>  	PERF_EVSEL__CONFIG_TERM_STACK_USER,
> +	PERF_EVSEL__CONFIG_TERM_INHERIT,
>  	PERF_EVSEL__CONFIG_TERM_MAX,
>  };
>  
> @@ -55,6 +56,7 @@ struct perf_evsel_config_term {
>  		bool	time;
>  		char	*callgraph;
>  		u64	stack_user;
> +		u64	inherit;

seems like bool would be enough

jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH net-next 1/4] perf tools: Enable pre-event inherit setting by config terms Wang Nan <wangnan0@huawei.com> - 2015-10-28 12:00 +0100
  Re: [RFC PATCH net-next 1/4] perf tools: Enable pre-event inherit  setting by config terms Jiri Olsa <jolsa@redhat.com> - 2015-10-28 14:30 +0100
    Re: [RFC PATCH net-next 1/4] perf tools: Enable pre-event inherit  setting by config terms Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-28 14:50 +0100
    Re: [RFC PATCH net-next 1/4] perf tools: Enable pre-event inherit  setting by config terms Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-28 14:50 +0100
      Re: [RFC PATCH net-next 1/4] perf tools: Enable pre-event inherit  setting by config terms Jiri Olsa <jolsa@redhat.com> - 2015-10-28 15:20 +0100
  [tip:perf/core] perf tools:   Enable pre-event inherit setting by config terms tip-bot for Wang Nan <tipbot@zytor.com> - 2015-10-29 10:50 +0100

csiph-web