From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753132AbdGJAbW (ORCPT ); Sun, 9 Jul 2017 20:31:22 -0400 Received: from mga14.intel.com ([192.55.52.115]:30443 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752749AbdGJAbV (ORCPT ); Sun, 9 Jul 2017 20:31:21 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,337,1496127600"; d="scan'208";a="125128809" Subject: Re: [PATCH v4 2/2] perf report: Implement visual marker for macro fusion in annotate To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , peterz@infradead.org, Ingo Molnar , alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com References: <1499403995-19857-1-git-send-email-yao.jin@linux.intel.com> <1499403995-19857-3-git-send-email-yao.jin@linux.intel.com> <20170707145111.GS27350@kernel.org> From: "Jin, Yao" Message-ID: <0bae5548-d7eb-aa6d-f248-c550430be4ef@linux.intel.com> Date: Mon, 10 Jul 2017 08:31:18 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170707145111.GS27350@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > I applied this one, no unnecessary parsing of cpuid done at each > jump->target arrow rendering, much better, thanks! > > One thing for a follow up patch: > > We have this when the cursor is at a jump instruction: > > │ ┌──test %ecx,%ecx > -> │ ├──je 714cf > │ │ mov LINES+0xb40,%edx > │ │ test %edx,%edx > │ │↓ je 71580 > │714cf:└─→mov LINES+0x10c8,%eax > > But if we go up a line, to that "test" instruction, we get: > > -> │ test %ecx,%ecx > │ ↓ je 714cf > │ mov LINES+0xb40,%edx > │ test %edx,%edx > │ ↓ je 71580 > │714cf: mov LINES+0x10c8,%eax > > I suggest that this be changed to: > > -> │ ┌─test %ecx,%ecx > │ ↓ je 714cf > │ mov LINES+0xb40,%edx > │ test %edx,%edx > │ ↓ je 71580 > │714cf: mov LINES+0x10c8,%eax > > I.e. even before going to the jump instruction line with the cursor, we > would see the fused instructions. > > To do that perhaps we should improve annotate_browser__draw_current_jump > to improve that part that looks for is_valid_jump() to consider > instructions that could be fused with jumps for the machine where the > perf data came from, etc. > > But the current situation is better already, thanks for your work, > applied! > > - Arnaldo I will investigate how to do the follow-up patch. Thanks Jin Yao