All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Chris Phlipot <cphlipot0@gmail.com>,
	jolsa@kernel.org, acme@kernel.org, peterz@infradead.org,
	mingo@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/6] perf script: add call path id to exported sample in db export
Date: Fri, 6 May 2016 14:28:05 +0300	[thread overview]
Message-ID: <572C7FC5.3010806@intel.com> (raw)
In-Reply-To: <1461831551-12213-5-git-send-email-cphlipot0@gmail.com>

On 28/04/16 11:19, Chris Phlipot wrote:
> The exported sample now contains a reference to the call_path_id that
> represents its callchain.
> 
> While callchains themselves are nice to have, being able to associate
> them with samples makes them much more useful, and can allow for such
> things as determining how much cumulative time is spent in a particular
> function. This information is normally possible to get from the
> call return processor. However, when doing normal sampling, call/return
> information is not available, thus necessitating the need for associating
> samples directly with call paths.
> 
> This commit include changes to db-export layer to make this information
> available for subsequent patches in this change set, but by itself, does
> not make any changes visible to the user.
> 
> Signed-off-by: Chris Phlipot <cphlipot0@gmail.com>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
>  tools/perf/util/db-export.c | 4 +++-
>  tools/perf/util/db-export.h | 1 +
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/db-export.c b/tools/perf/util/db-export.c
> index cb96591..74f6875 100644
> --- a/tools/perf/util/db-export.c
> +++ b/tools/perf/util/db-export.c
> @@ -412,8 +412,10 @@ int db_export__sample(struct db_export *dbe, union perf_event *event,
>  		struct call_path *cp = call_path_from_sample(dbe, al->machine,
>  							     thread, sample,
>  							     evsel);
> -		if (cp)
> +		if (cp) {
>  			db_export__call_path(dbe, cp);
> +			es.call_path_id = cp->db_id;
> +		}
>  	}
>  
>  	if ((evsel->attr.sample_type & PERF_SAMPLE_ADDR) &&
> diff --git a/tools/perf/util/db-export.h b/tools/perf/util/db-export.h
> index f5daf55..67bc6b8 100644
> --- a/tools/perf/util/db-export.h
> +++ b/tools/perf/util/db-export.h
> @@ -44,6 +44,7 @@ struct export_sample {
>  	u64			addr_dso_db_id;
>  	u64			addr_sym_db_id;
>  	u64			addr_offset; /* addr offset from symbol start */
> +	u64			call_path_id;
>  };
>  
>  struct db_export {
> 

  reply	other threads:[~2016-05-06 11:32 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28  8:19 [PATCH 0/6] perf script: export sampled callchains to database Chris Phlipot
2016-04-28  8:19 ` [PATCH 1/6] perf tools: fix incorrect ordering of callchain entries Chris Phlipot
2016-04-28  8:49   ` Jiri Olsa
2016-05-06 12:17     ` Arnaldo Carvalho de Melo
2016-05-07  4:55   ` [tip:perf/core] perf callchain: Fix incorrect ordering of entries tip-bot for Chris Phlipot
2016-04-28  8:19 ` [PATCH 2/6] perf tools: refractor code to move call path handling out of thread-stack Chris Phlipot
2016-05-06 11:27   ` Adrian Hunter
2016-05-06 12:19     ` Arnaldo Carvalho de Melo
2016-05-07  4:55   ` [tip:perf/core] perf tools: Refactor " tip-bot for Chris Phlipot
2016-04-28  8:19 ` [PATCH 3/6] perf script: enable db export to output sampled callchains Chris Phlipot
2016-05-06 11:27   ` Adrian Hunter
2016-05-06 13:07     ` Arnaldo Carvalho de Melo
2016-05-06 15:38       ` Arnaldo Carvalho de Melo
2016-05-07  4:55   ` [tip:perf/core] perf script: Enable " tip-bot for Chris Phlipot
2016-04-28  8:19 ` [PATCH 4/6] perf script: add call path id to exported sample in db export Chris Phlipot
2016-05-06 11:28   ` Adrian Hunter [this message]
2016-05-06 12:23     ` Arnaldo Carvalho de Melo
2016-05-07  4:56   ` [tip:perf/core] perf script: Add " tip-bot for Chris Phlipot
2016-04-28  8:19 ` [PATCH 5/6] perf script: expose usage of the callchain db export via the python api Chris Phlipot
2016-05-06 11:28   ` Adrian Hunter
2016-05-06 12:25     ` Arnaldo Carvalho de Melo
2016-05-07  4:56   ` [tip:perf/core] perf script: Expose " tip-bot for Chris Phlipot
2016-04-28  8:19 ` [PATCH 6/6] perf script: update export-to-postgresql to support callchain export Chris Phlipot
2016-05-06 11:28   ` Adrian Hunter
2016-05-06 12:29     ` Arnaldo Carvalho de Melo
2016-05-06 12:27   ` Arnaldo Carvalho de Melo
2016-05-07  4:57   ` [tip:perf/core] perf script: Update " tip-bot for Chris Phlipot
2016-05-06 11:28 ` [PATCH 0/6] perf script: export sampled callchains to database Adrian Hunter

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=572C7FC5.3010806@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=acme@kernel.org \
    --cc=cphlipot0@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.