From: Jiri Olsa <jolsa@redhat.com>
To: Kan Liang <kan.liang@intel.com>
Cc: acme@kernel.org, jolsa@kernel.org, namhyung@kernel.org,
ak@linux.intel.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC V6 5/6] perf,tool: per-event callgraph support
Date: Wed, 29 Jul 2015 13:48:55 +0200 [thread overview]
Message-ID: <20150729114855.GC9606@krava.brq.redhat.com> (raw)
In-Reply-To: <1437999699-19632-6-git-send-email-kan.liang@intel.com>
On Mon, Jul 27, 2015 at 08:21:38AM -0400, Kan Liang wrote:
SNIP
>
> -static void apply_config_terms(struct perf_evsel *evsel)
> +static void apply_config_terms(struct perf_evsel *evsel,
> + struct record_opts *opts)
> {
> struct perf_evsel_config_term *term;
> struct list_head *config_terms = &evsel->config_terms;
> struct perf_event_attr *attr = &evsel->attr;
> + struct callchain_param param;
> + bool callgraph_set = false;
> +
> + /* callgraph default */
> + param.record_mode = callchain_param.record_mode;
> + param.dump_size = 8192;
>
> list_for_each_entry(term, config_terms, list) {
> switch (term->type) {
> @@ -604,10 +612,49 @@ static void apply_config_terms(struct perf_evsel *evsel)
> else
> perf_evsel__reset_sample_bit(evsel, TIME);
> break;
> + case PERF_EVSEL__CONFIG_TERM_CALLGRAPH:
> + if (!strcmp(term->val.callgraph, "fp")) {
> + param.enabled = true;
> + param.record_mode = CALLCHAIN_FP;
> + } else if (!strcmp(term->val.callgraph, "dwarf")) {
> + param.enabled = true;
> + param.record_mode = CALLCHAIN_DWARF;
> + } else if (!strcmp(term->val.callgraph, "lbr")) {
> + param.enabled = true;
> + param.record_mode = CALLCHAIN_LBR;
> + } else if (!strcmp(term->val.callgraph, "no")) {
> + param.enabled = false;
> + } else {
> + pr_warning("%s is no valid callchain type.\n", term->val.callgraph);
> + }
> + callgraph_set = true;
> + break;
> + case PERF_EVSEL__CONFIG_TERM_STACK_USER:
> + param.dump_size = term->val.stack_user;
> + callgraph_set = true;
> + break;
could this get somehow unified with parse_callchain_record_opt?
it'd be nice to have this setup on single place..
jirka
next prev parent reply other threads:[~2015-07-29 11:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-27 12:21 [PATCH RFC V6 0/6] per event callgraph and time support Kan Liang
2015-07-27 12:21 ` [PATCH RFC V6 1/6] perf tools: Add support for event post configuration Kan Liang
2015-07-27 12:21 ` [PATCH RFC V6 2/6] perf tools: Force period term to overload global settings Kan Liang
2015-07-27 12:21 ` [PATCH RFC V6 3/6] perf,tools: introduce callgraph_set for callgraph option Kan Liang
2015-07-27 12:21 ` [PATCH RFC V6 4/6] perf,tool: per-event time support Kan Liang
2015-07-29 11:02 ` Jiri Olsa
2015-07-27 12:21 ` [PATCH RFC V6 5/6] perf,tool: per-event callgraph support Kan Liang
2015-07-29 11:20 ` Jiri Olsa
2015-07-29 11:48 ` Jiri Olsa [this message]
2015-07-29 11:50 ` Jiri Olsa
2015-07-27 12:21 ` [PATCH RFC V6 6/6] perf,tests: Add tests to callgraph and time parse Kan Liang
2015-07-29 11:53 ` Jiri Olsa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150729114855.GC9606@krava.brq.redhat.com \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®