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


Groups > linux.kernel > #1625757

Re: [PATCH v4 5/5] perf report: Show branch type in callchain entry

Path csiph.com!news.mixmin.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod
From "Jin, Yao" <yao.jin@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4 5/5] perf report: Show branch type in callchain entry
Date Wed, 19 Apr 2017 02:40:02 +0200
Message-ID <txLP4-4F9-11@gated-at.bofh.it> (permalink)
References <tv4XU-8aE-5@gated-at.bofh.it> <tv4XV-8aE-35@gated-at.bofh.it> <txGw3-1bd-19@gated-at.bofh.it>
X-Extloop1 1
X-Ironport-Av E=Sophos;i="5.37,219,1488873600"; d="scan'208";a="91469437"
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0
MIME-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
Content-Language en-US
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 65
Organization linux.* mail to news gateway
X-Original-Cc acme@kernel.org, jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com, linuxppc-dev@lists.ozlabs.org
X-Original-Date Wed, 19 Apr 2017 08:32:27 +0800
X-Original-Message-ID <79f0c49a-5f63-5ed7-bb37-fe5f0c0af1e1@linux.intel.com>
X-Original-References <1491949266-6835-1-git-send-email-yao.jin@linux.intel.com> <1491949266-6835-6-git-send-email-yao.jin@linux.intel.com> <20170418185323.GB15584@krava>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1625757

Show key headers only | View raw



On 4/19/2017 2:53 AM, Jiri Olsa wrote:
> On Wed, Apr 12, 2017 at 06:21:06AM +0800, Jin Yao wrote:
>
> SNIP
>
>>   static int counts_str_build(char *bf, int bfsize,
>>   			     u64 branch_count, u64 predicted_count,
>>   			     u64 abort_count, u64 cycles_count,
>> -			     u64 iter_count, u64 samples_count)
>> +			     u64 iter_count, u64 samples_count,
>> +			     struct branch_type_stat *brtype_stat)
>>   {
>> -	double predicted_percent = 0.0;
>> -	const char *null_str = "";
>> -	char iter_str[32];
>> -	char cycle_str[32];
>> -	char *istr, *cstr;
>>   	u64 cycles;
>> +	int printed, i = 0;
>>   
>>   	if (branch_count == 0)
>>   		return scnprintf(bf, bfsize, " (calltrace)");
>>   
>> +	printed = branch_type_str(brtype_stat, bf, bfsize);
>> +	if (printed)
>> +		i++;
>> +
>>   	cycles = cycles_count / branch_count;
>> +	if (cycles) {
>> +		if (i++)
>> +			printed += scnprintf(bf + printed, bfsize - printed,
>> +				" cycles:%" PRId64 "", cycles);
>> +		else
>> +			printed += scnprintf(bf + printed, bfsize - printed,
>> +				" (cycles:%" PRId64 "", cycles);
>> +	}
>>   
>>   	if (iter_count && samples_count) {
>> -		if (cycles > 0)
>> -			scnprintf(iter_str, sizeof(iter_str),
>> -				 " iterations:%" PRId64 "",
>> -				 iter_count / samples_count);
>> +		if (i++)
>> +			printed += scnprintf(bf + printed, bfsize - printed,
>> +				" iterations:%" PRId64 "",
>> +				iter_count / samples_count);
>>   		else
>> -			scnprintf(iter_str, sizeof(iter_str),
>> -				 "iterations:%" PRId64 "",
>> -				 iter_count / samples_count);
>> -		istr = iter_str;
> could you please put the change from using iter_str
> to bf into separate patch before the actual branch
> display change?
>
> it's hard to see if anything is broken ;-)
>
> thanks,
> jirka
Got it, I will separate the patches.

Thanks
Jin Yao

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


Thread

[PATCH v4 0/5] perf report: Show branch type Jin Yao <yao.jin@linux.intel.com> - 2017-04-11 16:30 +0200
  [PATCH v4 2/5] perf/x86/intel: Record branch type Jin Yao <yao.jin@linux.intel.com> - 2017-04-11 16:30 +0200
  [PATCH v4 1/5] perf/core: Define the common branch type classification Jin Yao <yao.jin@linux.intel.com> - 2017-04-11 16:30 +0200
  [PATCH v4 5/5] perf report: Show branch type in callchain entry Jin Yao <yao.jin@linux.intel.com> - 2017-04-11 16:30 +0200
    Re: [PATCH v4 5/5] perf report: Show branch type in callchain entry Jiri Olsa <jolsa@redhat.com> - 2017-04-18 21:00 +0200
      Re: [PATCH v4 5/5] perf report: Show branch type in callchain entry "Jin, Yao" <yao.jin@linux.intel.com> - 2017-04-19 02:40 +0200
    Re: [PATCH v4 5/5] perf report: Show branch type in callchain entry Jiri Olsa <jolsa@redhat.com> - 2017-04-18 21:00 +0200
      Re: [PATCH v4 5/5] perf report: Show branch type in callchain entry "Jin, Yao" <yao.jin@linux.intel.com> - 2017-04-19 02:40 +0200
  Re: [PATCH v4 0/5] perf report: Show branch type Jiri Olsa <jolsa@redhat.com> - 2017-04-12 13:00 +0200
    Re: [PATCH v4 0/5] perf report: Show branch type "Jin, Yao" <yao.jin@linux.intel.com> - 2017-04-12 14:30 +0200
      Re: [PATCH v4 0/5] perf report: Show branch type Jiri Olsa <jolsa@redhat.com> - 2017-04-12 16:30 +0200
        Re: [PATCH v4 0/5] perf report: Show branch type Jiri Olsa <jolsa@redhat.com> - 2017-04-12 17:50 +0200
        Re: [PATCH v4 0/5] perf report: Show branch type "Jin, Yao" <yao.jin@linux.intel.com> - 2017-04-12 17:50 +0200
    Re: [PATCH v4 0/5] perf report: Show branch type "Jin, Yao" <yao.jin@linux.intel.com> - 2017-04-13 04:10 +0200
      Re: [PATCH v4 0/5] perf report: Show branch type "Jin, Yao" <yao.jin@linux.intel.com> - 2017-04-13 05:30 +0200
        Re: [PATCH v4 0/5] perf report: Show branch type Jiri Olsa <jolsa@redhat.com> - 2017-04-13 10:30 +0200

csiph-web