linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf script: Allow --time with --reltime
@ 2019-10-02 16:46 Andi Kleen
  2019-10-03 10:18 ` Jiri Olsa
  2019-10-15  5:31 ` [tip: perf/core] " tip-bot2 for Andi Kleen
  0 siblings, 2 replies; 4+ messages in thread
From: Andi Kleen @ 2019-10-02 16:46 UTC (permalink / raw)
  To: acme; +Cc: jolsa, linux-kernel, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

The original --reltime patch forbid --time with --reltime.

But it turns out --time doesn't really care about --reltime, because
the relative time is only used at final output, while
the time filtering always works earlier on absolute time.

So just remove the check and allow combining the two options.

Fixes: 90b10f47c0ee ("perf script: Support relative time")
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 tools/perf/builtin-script.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 32b17d51c982..7481003b2761 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -3601,11 +3601,6 @@ int cmd_script(int argc, const char **argv)
 		}
 	}
 
-	if (script.time_str && reltime) {
-		fprintf(stderr, "Don't combine --reltime with --time\n");
-		return -1;
-	}
-
 	if (itrace_synth_opts.callchain &&
 	    itrace_synth_opts.callchain_sz > scripting_max_stack)
 		scripting_max_stack = itrace_synth_opts.callchain_sz;
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf script: Allow --time with --reltime
  2019-10-02 16:46 [PATCH] perf script: Allow --time with --reltime Andi Kleen
@ 2019-10-03 10:18 ` Jiri Olsa
  2019-10-03 14:12   ` Arnaldo Carvalho de Melo
  2019-10-15  5:31 ` [tip: perf/core] " tip-bot2 for Andi Kleen
  1 sibling, 1 reply; 4+ messages in thread
From: Jiri Olsa @ 2019-10-03 10:18 UTC (permalink / raw)
  To: Andi Kleen; +Cc: acme, jolsa, linux-kernel, Andi Kleen

On Wed, Oct 02, 2019 at 09:46:42AM -0700, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
> 
> The original --reltime patch forbid --time with --reltime.
> 
> But it turns out --time doesn't really care about --reltime, because
> the relative time is only used at final output, while
> the time filtering always works earlier on absolute time.
> 
> So just remove the check and allow combining the two options.
> 
> Fixes: 90b10f47c0ee ("perf script: Support relative time")
> Signed-off-by: Andi Kleen <ak@linux.intel.com>

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka

> ---
>  tools/perf/builtin-script.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
> index 32b17d51c982..7481003b2761 100644
> --- a/tools/perf/builtin-script.c
> +++ b/tools/perf/builtin-script.c
> @@ -3601,11 +3601,6 @@ int cmd_script(int argc, const char **argv)
>  		}
>  	}
>  
> -	if (script.time_str && reltime) {
> -		fprintf(stderr, "Don't combine --reltime with --time\n");
> -		return -1;
> -	}
> -
>  	if (itrace_synth_opts.callchain &&
>  	    itrace_synth_opts.callchain_sz > scripting_max_stack)
>  		scripting_max_stack = itrace_synth_opts.callchain_sz;
> -- 
> 2.21.0
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf script: Allow --time with --reltime
  2019-10-03 10:18 ` Jiri Olsa
@ 2019-10-03 14:12   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-10-03 14:12 UTC (permalink / raw)
  To: Jiri Olsa; +Cc: Andi Kleen, jolsa, linux-kernel, Andi Kleen

Em Thu, Oct 03, 2019 at 12:18:27PM +0200, Jiri Olsa escreveu:
> On Wed, Oct 02, 2019 at 09:46:42AM -0700, Andi Kleen wrote:
> > From: Andi Kleen <ak@linux.intel.com>
> > 
> > The original --reltime patch forbid --time with --reltime.
> > 
> > But it turns out --time doesn't really care about --reltime, because
> > the relative time is only used at final output, while
> > the time filtering always works earlier on absolute time.
> > 
> > So just remove the check and allow combining the two options.
> > 
> > Fixes: 90b10f47c0ee ("perf script: Support relative time")
> > Signed-off-by: Andi Kleen <ak@linux.intel.com>
> 
> Acked-by: Jiri Olsa <jolsa@kernel.org>

Thanks, applied.

- Arnaldo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip: perf/core] perf script: Allow --time with --reltime
  2019-10-02 16:46 [PATCH] perf script: Allow --time with --reltime Andi Kleen
  2019-10-03 10:18 ` Jiri Olsa
@ 2019-10-15  5:31 ` tip-bot2 for Andi Kleen
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot2 for Andi Kleen @ 2019-10-15  5:31 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Andi Kleen, Jiri Olsa, Arnaldo Carvalho de Melo, Ingo Molnar,
	Borislav Petkov, linux-kernel

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     3714437d3fcc7956cabcb0077f2a506b61160a56
Gitweb:        https://git.kernel.org/tip/3714437d3fcc7956cabcb0077f2a506b61160a56
Author:        Andi Kleen <ak@linux.intel.com>
AuthorDate:    Wed, 02 Oct 2019 09:46:42 -07:00
Committer:     Arnaldo Carvalho de Melo <acme@redhat.com>
CommitterDate: Mon, 07 Oct 2019 12:22:18 -03:00

perf script: Allow --time with --reltime

The original --reltime patch forbid --time with --reltime.

But it turns out --time doesn't really care about --reltime, because the
relative time is only used at final output, while the time filtering
always works earlier on absolute time.

So just remove the check and allow combining the two options.

Fixes: 90b10f47c0ee ("perf script: Support relative time")
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: http://lore.kernel.org/lkml/20191002164642.1719-1-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-script.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 67be8d3..1c797a9 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -3605,11 +3605,6 @@ int cmd_script(int argc, const char **argv)
 		}
 	}
 
-	if (script.time_str && reltime) {
-		fprintf(stderr, "Don't combine --reltime with --time\n");
-		return -1;
-	}
-
 	if (itrace_synth_opts.callchain &&
 	    itrace_synth_opts.callchain_sz > scripting_max_stack)
 		scripting_max_stack = itrace_synth_opts.callchain_sz;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-15  5:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-02 16:46 [PATCH] perf script: Allow --time with --reltime Andi Kleen
2019-10-03 10:18 ` Jiri Olsa
2019-10-03 14:12   ` Arnaldo Carvalho de Melo
2019-10-15  5:31 ` [tip: perf/core] " tip-bot2 for Andi Kleen

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).