linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf auxtrace: Fix queue resize
@ 2018-08-14  8:46 Adrian Hunter
  2018-08-14 22:07 ` Arnaldo Carvalho de Melo
  2018-08-18 11:58 ` [tip:perf/urgent] " tip-bot for Adrian Hunter
  0 siblings, 2 replies; 3+ messages in thread
From: Adrian Hunter @ 2018-08-14  8:46 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: Jiri Olsa, linux-kernel

When the number of queues grows beyond 32, the array of queues is resized
but not all members were being copied. Fix by also copying 'tid', 'cpu' and
'set'.

Fixes: e502789302a6e ("perf auxtrace: Add helpers for queuing AUX area tracing data")
Cc: stable@vger.kernel.org
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
 tools/perf/util/auxtrace.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
index ae8c37b219c9..db1511359c5e 100644
--- a/tools/perf/util/auxtrace.c
+++ b/tools/perf/util/auxtrace.c
@@ -203,6 +203,9 @@ static int auxtrace_queues__grow(struct auxtrace_queues *queues,
 	for (i = 0; i < queues->nr_queues; i++) {
 		list_splice_tail(&queues->queue_array[i].head,
 				 &queue_array[i].head);
+		queue_array[i].tid = queues->queue_array[i].tid;
+		queue_array[i].cpu = queues->queue_array[i].cpu;
+		queue_array[i].set = queues->queue_array[i].set;
 		queue_array[i].priv = queues->queue_array[i].priv;
 	}
 
-- 
2.17.1


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

* Re: [PATCH] perf auxtrace: Fix queue resize
  2018-08-14  8:46 [PATCH] perf auxtrace: Fix queue resize Adrian Hunter
@ 2018-08-14 22:07 ` Arnaldo Carvalho de Melo
  2018-08-18 11:58 ` [tip:perf/urgent] " tip-bot for Adrian Hunter
  1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-08-14 22:07 UTC (permalink / raw)
  To: Adrian Hunter; +Cc: Jiri Olsa, linux-kernel

Em Tue, Aug 14, 2018 at 11:46:08AM +0300, Adrian Hunter escreveu:
> When the number of queues grows beyond 32, the array of queues is resized
> but not all members were being copied. Fix by also copying 'tid', 'cpu' and
> 'set'.

Thanks, applied.
 
> Fixes: e502789302a6e ("perf auxtrace: Add helpers for queuing AUX area tracing data")
> Cc: stable@vger.kernel.org
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
>  tools/perf/util/auxtrace.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
> index ae8c37b219c9..db1511359c5e 100644
> --- a/tools/perf/util/auxtrace.c
> +++ b/tools/perf/util/auxtrace.c
> @@ -203,6 +203,9 @@ static int auxtrace_queues__grow(struct auxtrace_queues *queues,
>  	for (i = 0; i < queues->nr_queues; i++) {
>  		list_splice_tail(&queues->queue_array[i].head,
>  				 &queue_array[i].head);
> +		queue_array[i].tid = queues->queue_array[i].tid;
> +		queue_array[i].cpu = queues->queue_array[i].cpu;
> +		queue_array[i].set = queues->queue_array[i].set;
>  		queue_array[i].priv = queues->queue_array[i].priv;
>  	}
>  
> -- 
> 2.17.1

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

* [tip:perf/urgent] perf auxtrace: Fix queue resize
  2018-08-14  8:46 [PATCH] perf auxtrace: Fix queue resize Adrian Hunter
  2018-08-14 22:07 ` Arnaldo Carvalho de Melo
@ 2018-08-18 11:58 ` tip-bot for Adrian Hunter
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Adrian Hunter @ 2018-08-18 11:58 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: mingo, acme, adrian.hunter, tglx, jolsa, hpa, linux-kernel

Commit-ID:  99cbbe56eb8bede625f410ab62ba34673ffa7d21
Gitweb:     https://git.kernel.org/tip/99cbbe56eb8bede625f410ab62ba34673ffa7d21
Author:     Adrian Hunter <adrian.hunter@intel.com>
AuthorDate: Tue, 14 Aug 2018 11:46:08 +0300
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 14 Aug 2018 19:00:53 -0300

perf auxtrace: Fix queue resize

When the number of queues grows beyond 32, the array of queues is
resized but not all members were being copied. Fix by also copying
'tid', 'cpu' and 'set'.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: stable@vger.kernel.org
Fixes: e502789302a6e ("perf auxtrace: Add helpers for queuing AUX area tracing data")
Link: http://lkml.kernel.org/r/20180814084608.6563-1-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/auxtrace.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
index ae8c37b219c9..db1511359c5e 100644
--- a/tools/perf/util/auxtrace.c
+++ b/tools/perf/util/auxtrace.c
@@ -203,6 +203,9 @@ static int auxtrace_queues__grow(struct auxtrace_queues *queues,
 	for (i = 0; i < queues->nr_queues; i++) {
 		list_splice_tail(&queues->queue_array[i].head,
 				 &queue_array[i].head);
+		queue_array[i].tid = queues->queue_array[i].tid;
+		queue_array[i].cpu = queues->queue_array[i].cpu;
+		queue_array[i].set = queues->queue_array[i].set;
 		queue_array[i].priv = queues->queue_array[i].priv;
 	}
 

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

end of thread, other threads:[~2018-08-18 11:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-14  8:46 [PATCH] perf auxtrace: Fix queue resize Adrian Hunter
2018-08-14 22:07 ` Arnaldo Carvalho de Melo
2018-08-18 11:58 ` [tip:perf/urgent] " tip-bot for Adrian Hunter

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