]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
perf script: Fix --reltime with --time
authorAndi Kleen <ak@linux.intel.com>
Fri, 11 Oct 2019 18:21:39 +0000 (11:21 -0700)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 06:00:53 +0000 (01:00 -0500)
commit950b688dad71fa39ccb47f146e3a9d173ec86ab1
tree1b05a28b012a5c5d5afe7a7da5f4f043875cfbad
parentfe1ccdd5a8b7de04876385f9068c9222b33331ea
perf script: Fix --reltime with --time

BugLink: https://bugs.launchpad.net/bugs/1862429
[ Upstream commit b3509b6ed7a79ec49f6b64e4f3b780f259a2a468 ]

My earlier patch to just enable --reltime with --time was a little too
optimistic.  The --time parsing would accept absolute time, which is
very confusing to the user.

Support relative time in --time parsing too. This only works with recent
perf record that records the first sample time. Otherwise we error out.

Fixes: 3714437d3fcc ("perf script: Allow --time with --reltime")
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: http://lore.kernel.org/lkml/20191011182140.8353-1-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
tools/perf/builtin-script.c
tools/perf/util/time-utils.c
tools/perf/util/time-utils.h