perf auxtrace: Fix queue resize
Adrian Hunter
reviewerPATCH 1/1 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'.
Fixes e502789302a6e ("perf auxtrace: Add helpers for queuing AUX area tracing data")
Signed-off-by Adrian Hunter <[email protected]>
--- tools/perf/util/auxtrace.c | 3 +++ 1 file changed, 3 insertions(+)
tools/perf/util/auxtrace.c +3 -0
@@ -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; }
Signature · 1 line
2.17.1
Em Tue, Aug 14, 2018 at 11:46:08AM +0300, Adrian Hunter escreveu:
Quoted 3 lines
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.
Quoted 23 lines
Fixes e502789302a6e ("perf auxtrace: Add helpers for queuing AUX area tracing data")Signed-off-by Adrian Hunter <[email protected]>--- tools/perf/util/auxtrace.c | 3 +++ 1 file changed, 3 insertions(+)tools/perf/util/auxtrace.c +3
-0@@ -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; }Signature · 1 line
2.17.1
tip-bot for Adrian Hunter
merge botperf auxtrace: Fix queue resize
Commit-ID: 99cbbe56eb8bede625f410ab62ba34673ffa7d21 Gitweb: https://git.kernel.org/tip/99cbbe56eb8bede625f410ab62ba34673ffa7d21 Author: Adrian Hunter <[email protected]> AuthorDate: Tue, 14 Aug 2018 11:46:08 +0300 Committer: Arnaldo Carvalho de Melo <[email protected]> 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 <[email protected]>
Cc Jiri Olsa <[email protected]>
Fixes e502789302a6e ("perf auxtrace: Add helpers for queuing AUX area tracing data")
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/util/auxtrace.c | 3 +++ 1 file changed, 3 insertions(+)
tools/perf/util/auxtrace.c +3 -0
@@ -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; }