From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932420AbcEFMZK (ORCPT ); Fri, 6 May 2016 08:25:10 -0400 Received: from mail.kernel.org ([198.145.29.136]:42602 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751695AbcEFMZI (ORCPT ); Fri, 6 May 2016 08:25:08 -0400 Date: Fri, 6 May 2016 09:25:04 -0300 From: Arnaldo Carvalho de Melo To: Adrian Hunter Cc: Chris Phlipot , jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/6] perf script: expose usage of the callchain db export via the python api Message-ID: <20160506122504.GA11069@kernel.org> References: <1461831551-12213-1-git-send-email-cphlipot0@gmail.com> <1461831551-12213-6-git-send-email-cphlipot0@gmail.com> <572C7FCE.5020405@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <572C7FCE.5020405@intel.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, May 06, 2016 at 02:28:14PM +0300, Adrian Hunter escreveu: > On 28/04/16 11:19, Chris Phlipot wrote: > > This change allows python scripts to be able to utilize the recent > > changes to the db export api allowing the export of call_paths derived > > from sampled callchains. These call paths are also now associated with > > the samples from which they were derived. > > > > -This feature is enabled by setting "perf_db_export_callchains" to true > > > > -When enabled, samples that have callchain information will have the > > callchains exported via call_path_table > > > > -The call_path_id field is added to sample_table to enable association of > > samples with the corresponding callchain stored in the call paths > > table. A call_path_id of 0 will be exported if there is no > > corresponding callchain. > > > > -When "perf_db_export_callchains" and "perf_db_export_calls" are both > > set to True, the call path root data structure will be shared. This > > prevents duplicating of data and call path ids that would result from > > building two separate call path trees in memory. > > > > -The call_return_processor structure definition was relocated to the header > > file to make its contents visible to db-export.c. This enables the > > sharing of call path trees between the two features, as mentioned > > above. > > > > This change is visible to python scripts using the python db export api. > > The change is backwards compatible with scripts written against the > > previous API, assuming that the scripts model the sample_table function > > after the one in export-to-postgresql.py script by allowing for additional > > arguments to be added in the future. ie. using *x as the final argument of > > the sample_table function. > > > > Signed-off-by: Chris Phlipot > > Acked-by: Adrian Hunter Applied.