stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Namhyung Kim <namhyung@kernel.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Andi Kleen <andi@firstfloor.org>, Jiri Olsa <jolsa@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [PATCH 4.8 097/125] perf ui/stdio: Always reset output width for hierarchy
Date: Sat, 29 Oct 2016 09:50:15 -0400	[thread overview]
Message-ID: <20161029134951.207880164@linuxfoundation.org> (raw)
In-Reply-To: <20161029134947.232372651@linuxfoundation.org>

4.8-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Namhyung Kim <namhyung@kernel.org>

commit 9a6ad25b5a2026ba1399abc879ec623957867e79 upstream.

When the --hierarchy option is used, each entry has its own hpp_list to
show the result.  But it is not updating the width of each column for
perf-top.  The perf-report command has no problem since it resets it
during header display.

  $ sudo perf top --hierarchy --stdio

   PerfTop:     160 irqs/sec  kernel:38.8%  exact: 100.0%
                                     [4000Hz cycles:pp],  (all, 12 CPUs)
  ----------------------------------------------------------------------

   52.32%     perf
      24.74%     [.] __symbols__insert
      5.62%     [.] rb_next
      5.14%     [.] dso__load_sym

Move the code into hists__fprintf() so that it can be called always.
Also it'd be better to put similar code together.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Fixes: 1b2dbbf41a0f ("perf hists: Use own hpp_list for hierarchy mode")
Link: http://lkml.kernel.org/r/20160913074552.13284-5-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 tools/perf/ui/stdio/hist.c |   14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

--- a/tools/perf/ui/stdio/hist.c
+++ b/tools/perf/ui/stdio/hist.c
@@ -628,14 +628,6 @@ hists__fprintf_hierarchy_headers(struct
 				 struct perf_hpp *hpp,
 				 FILE *fp)
 {
-	struct perf_hpp_list_node *fmt_node;
-	struct perf_hpp_fmt *fmt;
-
-	list_for_each_entry(fmt_node, &hists->hpp_formats, list) {
-		perf_hpp_list__for_each_format(&fmt_node->hpp, fmt)
-			perf_hpp__reset_width(fmt, hists);
-	}
-
 	return print_hierarchy_header(hists, hpp, symbol_conf.field_sep, fp);
 }
 
@@ -714,6 +706,7 @@ size_t hists__fprintf(struct hists *hist
 		      bool use_callchain)
 {
 	struct perf_hpp_fmt *fmt;
+	struct perf_hpp_list_node *node;
 	struct rb_node *nd;
 	size_t ret = 0;
 	const char *sep = symbol_conf.field_sep;
@@ -726,6 +719,11 @@ size_t hists__fprintf(struct hists *hist
 
 	hists__for_each_format(hists, fmt)
 		perf_hpp__reset_width(fmt, hists);
+	/* hierarchy entries have their own hpp list */
+	list_for_each_entry(node, &hists->hpp_formats, list) {
+		perf_hpp_list__for_each_format(&node->hpp, fmt)
+			perf_hpp__reset_width(fmt, hists);
+	}
 
 	if (symbol_conf.col_width_list_str)
 		perf_hpp__set_user_width(symbol_conf.col_width_list_str);

  parent reply	other threads:[~2016-10-29 13:50 UTC|newest]

Thread overview: 115+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20161029135133uscas1p244a56d26b4705445442b5e2e8454ba28@uscas1p2.samsung.com>
2016-10-29 13:48 ` [PATCH 4.8 000/125] 4.8.6-stable review Greg Kroah-Hartman
2016-10-29 13:48   ` [PATCH 4.8 001/125] drm/vc4: Fix races when the CS reads from render targets Greg Kroah-Hartman
2016-10-29 13:48   ` [PATCH 4.8 005/125] drm/amdgpu: fix IB alignment for UVD Greg Kroah-Hartman
2016-10-29 13:48   ` [PATCH 4.8 006/125] drm/amdgpu/dce10: disable hpd on local panels Greg Kroah-Hartman
2016-10-29 13:48   ` [PATCH 4.8 007/125] drm/amdgpu/dce8: " Greg Kroah-Hartman
2016-10-29 13:48   ` [PATCH 4.8 008/125] drm/amdgpu/dce11: " Greg Kroah-Hartman
2016-10-29 13:48   ` [PATCH 4.8 009/125] drm/amdgpu/dce11: add missing drm_mode_config_cleanup call Greg Kroah-Hartman
2016-10-29 13:48   ` [PATCH 4.8 011/125] drm/amdgpu: change vblank_times calculation method to reduce computational error Greg Kroah-Hartman
2016-10-29 13:48   ` [PATCH 4.8 012/125] drm/radeon: narrow asic_init for virtualization Greg Kroah-Hartman
2016-10-29 13:48   ` [PATCH 4.8 013/125] drm/radeon/si/dpm: fix phase shedding setup Greg Kroah-Hartman
2016-10-29 13:48   ` [PATCH 4.8 014/125] drm/radeon: change vblank_times calculation method to reduce computational error Greg Kroah-Hartman
2016-10-29 13:48   ` [PATCH 4.8 015/125] drm/vmwgfx: Limit the user-space command buffer size Greg Kroah-Hartman
2016-10-29 13:48   ` [PATCH 4.8 016/125] drm/fsl-dcu: fix endian issue when using clk_register_divider Greg Kroah-Hartman
2016-10-29 13:48   ` [PATCH 4.8 017/125] drm/amd/powerplay: fix mclk not switching back after multi-head was disabled Greg Kroah-Hartman
2016-10-29 13:48   ` [PATCH 4.8 018/125] HID: add quirk for Akai MIDImix Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 022/125] drm/i915/skl: Dont try to update plane watermarks if they havent changed Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 023/125] drm/i915/gen9: only add the planes actually affected by ddb changes Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 024/125] drm/i915/gen9: fix the WaWmMemoryReadLatency implementation Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 025/125] drm/i915/gen9: minimum scanlines for Y tile is not always 4 Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 026/125] drm/i915/gen9: fix plane_blocks_per_line on watermarks calculations Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 027/125] drm/i915/gen9: fix the watermark res_blocks value Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 028/125] drm/i915: SAGV is not SKL-only, so rename a few things Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 029/125] drm/i915: introduce intel_has_sagv() Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 030/125] drm/i915/kbl: KBL also needs to run the SAGV code Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 031/125] Revert "drm/i915: Check live status before reading edid" Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 037/125] drm/i915: Just clear the mmiodebug before a register access Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 038/125] drm/i915: Unalias obj->phys_handle and obj->userptr Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 039/125] posix_acl: Clear SGID bit when setting file permissions Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 040/125] rt2x00usb: Fix error return code Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 041/125] scsi: cxlflash: Remove the device cleanly in the system shutdown path Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 042/125] genirq/generic_chip: Add irq_unmap callback Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 043/125] coresight: Remove erroneous dma_free_coherent in tmc_probe Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 044/125] uio: fix dmem_region_start computation Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 046/125] spi: spi-fsl-dspi: Drop extra spi_master_put in device remove function Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 047/125] i40e: remove a stray unlock Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 048/125] i40e: fix broken i40e_config_rss_aq function Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 049/125] mwifiex: correct aid value during tdls setup Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 050/125] mwifiex: fix failed to reconnect after interface disabled/enabled Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 051/125] ath10k: Add WMI_SERVICE_PERIODIC_CHAN_STAT_SUPPORT wmi service Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 052/125] ath10k: fix sending frame in management path in push txq logic Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 053/125] ath10k: fix reporting channel survey data Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 054/125] ath10k: fix throughput regression in multi client mode Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 055/125] crypto: marvell - Dont overwrite default creq->state during initialization Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 057/125] crypto: marvell - Update transformation context for each dequeued req Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 058/125] crypto: arm/ghash-ce - add missing async import/export Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 059/125] crypto: ccp - Fix return value check in ccp_dmaengine_register() Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 060/125] hwrng: omap - Only fail if pm_runtime_get_sync returns < 0 Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 061/125] ASoC: topology: Fix error return code in soc_tplg_dapm_widget_create() Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 062/125] ASoC: dapm: Fix possible uninitialized variable in snd_soc_dapm_get_volsw() Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 063/125] ASoC: dapm: Fix value setting for _ENUM_DOUBLE MUXs second channel Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 064/125] ASoC: dapm: Fix kcontrol creation for output driver widget Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 065/125] ASoC: sst-bxt-rt298: fix obsoleted initializers for array Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 066/125] ASoC: sst-bxt-da7219_max98357a: " Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 067/125] iio: ad5755: fix off-by-one on devnr limit check Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 068/125] iio: light: us5182d: Add missing error code assignment before test Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 069/125] staging: android ion/hisi: fix dependencies Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 070/125] staging: sm750fb: Correctly set CLOCK_PHASE bit of display controller Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 071/125] staging: r8188eu: Fix scheduling while atomic splat Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 072/125] staging: ks7010: fix wait_for_completion_interruptible_timeout return handling Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 073/125] staging: ks7010: declare private functions static Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 074/125] IB/hfi1: Move iowait_init() to priv allocate Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 075/125] IB/rdmavt: Correct sparse annotation Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 076/125] IB/qib: Remove qpt_mask global Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 077/125] IB/mlx5: Fix steering resource leak Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 078/125] power: bq24257: Fix use of uninitialized pointer bq->charger Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 079/125] dmaengine: ipu: remove bogus NO_IRQ reference Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 080/125] mm/hugetlb: check for reserved hugepages during memory offline Greg Kroah-Hartman
2016-10-29 13:49   ` [PATCH 4.8 081/125] mm/hugetlb: improve locking in dissolve_free_huge_pages() Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 082/125] drm/vmwgfx: Avoid validating views on view destruction Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 083/125] s390/cio: fix accidental interrupt enabling during resume Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 084/125] s390/con3270: fix use of uninitialised data Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 085/125] s390/con3270: fix insufficient space padding Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 086/125] clk: bcm2835: Skip PLLC clocks when deciding on a new clock parent Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 087/125] clk: gcc-msm8996: Fix pcie 2 pipe register offset Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 088/125] clk: qcom: select GDSC for msm8996 gcc and mmcc Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 089/125] clk: qoriq: fix a register offset error Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 090/125] clk: Return errors from clk providers in __of_clk_get_from_provider() Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 091/125] clk: core: Force setting the phase delay when no change Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 092/125] clk: divider: Fix clk_divider_round_rate() to use clk_readl() Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 093/125] perf data: Fix building in 32 bit platform with libbabeltrace Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 094/125] perf hists browser: Fix event group display Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 095/125] perf powerpc: Fix build-test failure Greg Kroah-Hartman
2016-10-29 13:50   ` Greg Kroah-Hartman [this message]
2016-10-29 13:50   ` [PATCH 4.8 098/125] perf symbols: Check symbol_conf.allow_aliases for kallsyms loading too Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 099/125] perf symbols: Fixup symbol sizes before picking best ones Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 100/125] iwlwifi: check for valid ethernet address provided by OEM Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 101/125] iwlwifi: mvm: fix pending frames tracking on tx resp Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 102/125] iwlwifi: mvm: call a different txq_enable function Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 103/125] iwlwifi: mvm: free reserved queue on STA removal Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 104/125] iwlwifi: mvm: support BAR in reorder buffer Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 105/125] iwlwifi: mvm: disable P2P queue on mac context release Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 106/125] iwlwifi: mvm: bail out if CTDP start operation fails Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 107/125] ARM: dts: sun9i: Add missing #interrupt-cells to R_PIO pinctrl device node Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 108/125] pinctrl: qcom: fix masking of pinmux functions Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 109/125] mpt3sas: Dont spam logs if logging level is 0 Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 110/125] powerpc: Always restore FPU/VEC/VSX if hardware transactional memory in use Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 111/125] powerpc: Add check_if_tm_restore_required() to giveup_all() Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 112/125] powerpc/nvram: Fix an incorrect partition merge Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 113/125] powerpc: Fix usage of _PAGE_RO in hugepage Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 114/125] ARM: pxa: pxa_cplds: fix interrupt handling Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 115/125] ARM: pxa: fix GPIO double shifts Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 116/125] ARM: dts: NSP: Correct RAM amount for BCM958625HR board Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 117/125] ARM: dts: fix RealView EB SMSC ethernet version Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 118/125] ARM: dts: omap3: overo: add missing unit name for lcd35 display Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 119/125] PCI: rcar: Fix pci_remap_iospace() failure path Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 120/125] PCI: aardvark: " Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 121/125] PCI: generic: " Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 122/125] PCI: versatile: " Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 123/125] PCI: designware: " Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 124/125] PCI: tegra: " Greg Kroah-Hartman
2016-10-29 13:50   ` [PATCH 4.8 125/125] libnvdimm: clear the internal poison_list when clearing badblocks Greg Kroah-Hartman
2016-10-29 23:07   ` [PATCH 4.8 000/125] 4.8.6-stable review Shuah Khan
2016-10-30 10:29     ` Greg Kroah-Hartman
2016-10-30  0:44   ` Guenter Roeck
2016-10-30 10:28     ` Greg Kroah-Hartman

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=20161029134951.207880164@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=andi@firstfloor.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=stable@vger.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;
as well as URLs for NNTP newsgroup(s).