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>,
Jiri Olsa <jolsa@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 4.9 59/60] perf diff: Fix segfault on perf diff -o N option
Date: Mon, 13 Feb 2017 05:04:31 -0800 [thread overview]
Message-ID: <20170213130341.426233864@linuxfoundation.org> (raw)
In-Reply-To: <20170213130333.057515084@linuxfoundation.org>
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Namhyung Kim <namhyung@kernel.org>
commit 8381cdd0e32dd748bd34ca3ace476949948bd793 upstream.
The -o/--order option is to select column number to sort a diff result.
It does the job by adding a hpp field at the beginning of the sort list.
But it should not be added to the output field list as it has no
callbacks required by a output field.
During the setup_sorting(), the perf_hpp__setup_output_field() appends
the given sort keys to the output field if it's not there already.
Originally it was checked by fmt->list being non-empty. But commit
3f931f2c4274 ("perf hists: Make hpp setup function generic") changed it
to check the ->equal callback.
Anyways, we don't need to add the pseudo hpp field to the output field
list since it won't be used for output. So just skip fields if they
have no ->color or ->entry callbacks.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Fixes: 3f931f2c4274 ("perf hists: Make hpp setup function generic")
Link: http://lkml.kernel.org/r/20170118051457.30946-1-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/hist.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/tools/perf/ui/hist.c
+++ b/tools/perf/ui/hist.c
@@ -566,6 +566,10 @@ void perf_hpp__setup_output_field(struct
perf_hpp_list__for_each_sort_list(list, fmt) {
struct perf_hpp_fmt *pos;
+ /* skip sort-only fields ("sort_compute" in perf diff) */
+ if (!fmt->entry && !fmt->color)
+ continue;
+
perf_hpp_list__for_each_format(list, pos) {
if (fmt_equal(fmt, pos))
goto next;
next prev parent reply other threads:[~2017-02-13 13:15 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-13 13:03 [PATCH 4.9 00/60] 4.9.10-stable review Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 01/60] cpufreq: intel_pstate: Disable energy efficiency optimization Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 02/60] acpi, nfit: fix acpi_nfit_flush_probe() crash Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 03/60] libnvdimm, namespace: do not delete namespace-id 0 Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 04/60] libnvdimm, pfn: fix memmap reservation size versus 4K alignment Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 05/60] dm rq: cope with DM device destruction while in dm_old_request_fn() Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 07/60] crypto: chcr - Check device is allocated before use Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 08/60] crypto: qat - fix bar discovery for c62x Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 09/60] crypto: qat - zero esram only for DH85x devices Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 10/60] crypto: ccp - Fix DMA operations when IOMMU is enabled Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 11/60] crypto: ccp - Fix double add when creating new DMA command Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 12/60] ARC: [arcompact] brown paper bag bug in unaligned access delay slot fixup Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 13/60] Input: uinput - fix crash when mixing old and new init style Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 14/60] selinux: fix off-by-one in setprocattr Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 15/60] Revert "x86/ioapic: Restore IO-APIC irq_chip retrigger callback" Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 16/60] rtlwifi: rtl8192ce: Fix loading of incorrect firmware Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 17/60] cpumask: use nr_cpumask_bits for parsing functions Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 18/60] mm/slub.c: fix random_seq offset destruction Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 19/60] ibmvscsis: Add SGL limit Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 20/60] hns: avoid stack overflow with CONFIG_KASAN Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 21/60] ARM: 8643/3: arm/ptrace: Preserve previous registers for short regset write Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 22/60] drm/i915: fix use-after-free in page_flip_completed() Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 23/60] drm/i915/bxt: Add MST support when do DPLL calculation Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 24/60] drm/atomic: Fix double free in drm_atomic_state_default_clear Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 25/60] target: Dont BUG_ON during NodeACL dynamic -> explicit conversion Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 26/60] target: Use correct SCSI status during EXTENDED_COPY exception Greg Kroah-Hartman
2017-02-13 13:03 ` [PATCH 4.9 27/60] target: Fix early transport_generic_handle_tmr abort scenario Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 28/60] target: Fix multi-session dynamic se_node_acl double free OOPs Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 29/60] target: Fix COMPARE_AND_WRITE ref leak for non GOOD status Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 31/60] ARM: 8642/1: LPAE: catch pending imprecise abort on unmask Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 33/60] nl80211: Fix mesh HT operation check Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 34/60] mac80211: Fix adding of mesh vendor IEs Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 35/60] net/mlx5e: Modify TIRs hash only when its needed Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 36/60] Drivers: hv: vmbus: Base host signaling strictly on the ring state Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 37/60] Drivers: hv: vmbus: On write cleanup the logic to interrupt the host Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 38/60] Drivers: hv: vmbus: On the read path " Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 39/60] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read() Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 40/60] scsi: zfcp: fix use-after-free by not tracing WKA port open/close on failed send Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 41/60] scsi: aacraid: Fix INTx/MSI-x issue with older controllers Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 42/60] scsi: mpt3sas: disable ASPM for MPI2 controllers Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 43/60] scsi: qla2xxx: Avoid that issuing a LIP triggers a kernel crash Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 44/60] btrfs: fix btrfs_compat_ioctl failures on non-compat ioctls Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 45/60] powerpc/mm/radix: Update ERAT flushes when invalidating TLB Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 46/60] powerpc/powernv: Fix CPU hotplug to handle waking on HVI Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 47/60] xen-netfront: Delete rx_refill_timer in xennet_disconnect_backend() Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 48/60] ALSA: hda - adding a new NV HDMI/DP codec ID in the driver Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 49/60] ALSA: seq: Fix race at creating a queue Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 50/60] ALSA: seq: Dont handle loop timeout at snd_seq_pool_done() Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 51/60] Revert "ALSA: line6: Only determine control port properties if needed" Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 52/60] x86/mm/ptdump: Fix soft lockup in page table walker Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 53/60] x86/CPU/AMD: Bring back Compute Unit ID Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 54/60] x86/CPU/AMD: Fix Zen SMT topology Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 55/60] IB/rxe: Fix resid update Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 56/60] IB/rxe: Fix mem_check_range integer overflow Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 57/60] stacktrace, lockdep: Fix address, newline ugliness Greg Kroah-Hartman
2017-02-13 13:04 ` [PATCH 4.9 58/60] perf diff: Fix -o/--order option behavior (again) Greg Kroah-Hartman
2017-02-13 13:04 ` Greg Kroah-Hartman [this message]
2017-02-13 13:04 ` [PATCH 4.9 60/60] perf/core: Fix crash in perf_event_read() Greg Kroah-Hartman
2017-02-13 17:09 ` [PATCH 4.9 00/60] 4.9.10-stable review Shuah Khan
2017-02-13 17:24 ` Greg Kroah-Hartman
2017-02-13 20:03 ` Guenter Roeck
2017-02-14 22:54 ` 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=20170213130341.426233864@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--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).