linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf intel-pt: Fix async branch flags
@ 2023-09-28  7:29 Adrian Hunter
  2023-09-30  6:40 ` Namhyung Kim
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Hunter @ 2023-09-28  7:29 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, Namhyung Kim, Ian Rogers, linux-kernel,
	linux-perf-users

Ensure PERF_IP_FLAG_ASYNC is set always for asynchronous branches (i.e.
interrupts etc).

Fixes: 90e457f7be08 ("perf tools: Add Intel PT support")
Cc: stable@vger.kernel.org
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
 tools/perf/util/intel-pt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
index dbf0bc71a63b..f38893e0b036 100644
--- a/tools/perf/util/intel-pt.c
+++ b/tools/perf/util/intel-pt.c
@@ -1512,9 +1512,11 @@ static void intel_pt_sample_flags(struct intel_pt_queue *ptq)
 	} else if (ptq->state->flags & INTEL_PT_ASYNC) {
 		if (!ptq->state->to_ip)
 			ptq->flags = PERF_IP_FLAG_BRANCH |
+				     PERF_IP_FLAG_ASYNC |
 				     PERF_IP_FLAG_TRACE_END;
 		else if (ptq->state->from_nr && !ptq->state->to_nr)
 			ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL |
+				     PERF_IP_FLAG_ASYNC |
 				     PERF_IP_FLAG_VMEXIT;
 		else
 			ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL |
-- 
2.34.1


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

* Re: [PATCH] perf intel-pt: Fix async branch flags
  2023-09-28  7:29 [PATCH] perf intel-pt: Fix async branch flags Adrian Hunter
@ 2023-09-30  6:40 ` Namhyung Kim
  2023-10-03  4:11   ` Namhyung Kim
  0 siblings, 1 reply; 3+ messages in thread
From: Namhyung Kim @ 2023-09-30  6:40 UTC (permalink / raw)
  To: Adrian Hunter
  Cc: Arnaldo Carvalho de Melo, Jiri Olsa, Ian Rogers, linux-kernel,
	linux-perf-users

On Thu, Sep 28, 2023 at 12:30 AM Adrian Hunter <adrian.hunter@intel.com> wrote:
>
> Ensure PERF_IP_FLAG_ASYNC is set always for asynchronous branches (i.e.
> interrupts etc).
>
> Fixes: 90e457f7be08 ("perf tools: Add Intel PT support")
> Cc: stable@vger.kernel.org
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>

Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung


> ---
>  tools/perf/util/intel-pt.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
> index dbf0bc71a63b..f38893e0b036 100644
> --- a/tools/perf/util/intel-pt.c
> +++ b/tools/perf/util/intel-pt.c
> @@ -1512,9 +1512,11 @@ static void intel_pt_sample_flags(struct intel_pt_queue *ptq)
>         } else if (ptq->state->flags & INTEL_PT_ASYNC) {
>                 if (!ptq->state->to_ip)
>                         ptq->flags = PERF_IP_FLAG_BRANCH |
> +                                    PERF_IP_FLAG_ASYNC |
>                                      PERF_IP_FLAG_TRACE_END;
>                 else if (ptq->state->from_nr && !ptq->state->to_nr)
>                         ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL |
> +                                    PERF_IP_FLAG_ASYNC |
>                                      PERF_IP_FLAG_VMEXIT;
>                 else
>                         ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL |
> --
> 2.34.1
>
>

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

* Re: [PATCH] perf intel-pt: Fix async branch flags
  2023-09-30  6:40 ` Namhyung Kim
@ 2023-10-03  4:11   ` Namhyung Kim
  0 siblings, 0 replies; 3+ messages in thread
From: Namhyung Kim @ 2023-10-03  4:11 UTC (permalink / raw)
  To: Adrian Hunter
  Cc: Arnaldo Carvalho de Melo, Jiri Olsa, Ian Rogers, linux-kernel,
	linux-perf-users

On Fri, Sep 29, 2023 at 11:40 PM Namhyung Kim <namhyung@kernel.org> wrote:
>
> On Thu, Sep 28, 2023 at 12:30 AM Adrian Hunter <adrian.hunter@intel.com> wrote:
> >
> > Ensure PERF_IP_FLAG_ASYNC is set always for asynchronous branches (i.e.
> > interrupts etc).
> >
> > Fixes: 90e457f7be08 ("perf tools: Add Intel PT support")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
>
> Acked-by: Namhyung Kim <namhyung@kernel.org>

Applied to perf-tools-next, thanks!

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

end of thread, other threads:[~2023-10-03  4:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-28  7:29 [PATCH] perf intel-pt: Fix async branch flags Adrian Hunter
2023-09-30  6:40 ` Namhyung Kim
2023-10-03  4:11   ` Namhyung Kim

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