[Devel] [PATCH RHEL7 COMMIT] ms/perf top: Always sample time to satisfy needs of use of ordered queuing

Konstantin Khorenko khorenko at virtuozzo.com
Mon Dec 9 13:25:51 MSK 2019


The commit is pushed to "branch-rh7-3.10.0-1062.7.1.vz7.130.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1062.7.1.vz7.130.1
------>
commit 240b322307365a61f782c8d533e05d4ad80d39c2
Author: Jiri Olsa <jolsa at kernel.org>
Date:   Mon Apr 15 14:53:33 2019 +0200

    ms/perf top: Always sample time to satisfy needs of use of ordered queuing
    
    Bastian reported broken 'perf top -p PID' command, it won't display any
    data.
    
    The problem is that for -p option we monitor single thread, so we don't
    enable time in samples, because it's not needed.
    
    However since commit 16c66bc167cc we use ordered queues to stash data
    plus later commits added logic for dropping samples in case there's big
    load and we don't keep up. All this needs timestamp for sample. Enabling
    it unconditionally for perf top.
    
    Reported-by: Bastian Beischer <bastian.beischer at rwth-aachen.de>
    Signed-off-by: Jiri Olsa <jolsa at kernel.org>
    Tested-by: Arnaldo Carvalho de Melo <acme at redhat.com>
    Cc: Alexander Shishkin <alexander.shishkin at linux.intel.com>
    Cc: Namhyung Kim <namhyung at kernel.org>
    Cc: Peter Zijlstra <peterz at infradead.org>
    Cc: bastian beischer <bastian.beischer at rwth-aachen.de>
    Fixes: 16c66bc167cc ("perf top: Add processing thread")
    Link: http://lkml.kernel.org/r/20190415125333.27160-1-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo <acme at redhat.com>
    
    https://jira.sw.ru/browse/HCI-128
    https://bugzilla.redhat.com/show_bug.cgi?id=1757947
    
    (cherry picked from commit 1e6db2ee86e6a4399fc0ae5689e55e0fd1c43caf)
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 tools/perf/builtin-top.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index c7626b9e8d60..edddca4ae9ca 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1400,6 +1400,7 @@ int cmd_top(int argc, const char **argv)
 			 * */
 			.overwrite	= 0,
 			.sample_time	= true,
+			.sample_time_set = true,
 		},
 		.max_stack	     = sysctl_perf_event_max_stack,
 		.annotation_opts     = annotation__default_options,



More information about the Devel mailing list