lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e0434947-4fe9-43f8-87dd-91e6eb491341@arm.com>
Date: Wed, 5 Jun 2024 09:19:24 +0100
From: James Clark <james.clark@....com>
To: Adrian Hunter <adrian.hunter@...el.com>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
 Maxime Coquelin <mcoquelin.stm32@...il.com>,
 Alexandre Torgue <alexandre.torgue@...s.st.com>,
 Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
 Arnaldo Carvalho de Melo <acme@...nel.org>,
 Namhyung Kim <namhyung@...nel.org>, Mark Rutland <mark.rutland@....com>,
 Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
 John Garry <john.g.garry@...cle.com>, Will Deacon <will@...nel.org>,
 linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
 linux-stm32@...md-mailman.stormreply.com, linux-perf-users@...r.kernel.org,
 coresight@...ts.linaro.org, suzuki.poulose@....com,
 gankulkarni@...amperecomputing.com, mike.leach@...aro.org,
 leo.yan@...ux.dev, anshuman.khandual@....com
Subject: Re: [PATCH v2 02/16] perf auxtrace: Allow number of queues to be
 specified



On 05/06/2024 06:26, Adrian Hunter wrote:
> On 4/06/24 17:30, James Clark wrote:
>> Currently it's only possible to initialize with the default number of
>> queues and then use auxtrace_queues__add_event() to grow the array. But
>> that's problematic if you don't have a real event to pass into that
>> function yet.
>>
>> The queues hold a void *priv member to store custom state, and for
>> Coresight we want to create decoders upfront before receiving data, so
>> add a new function that allows pre-allocating queues. One reason to do
>> this is because we might need to store metadata (HW_ID events) that
>> effects other queues, but never actually receive auxtrace data on that
>> queue.
>>
>> Signed-off-by: James Clark <james.clark@....com>
> 
> Acked-by: Adrian Hunter <adrian.hunter@...el.com>
> 
> Again ;-)
> 

Oops yeah I should have picked that up. This one was already applied to
perf-tools-next as well.

Thanks

>> ---
>>  tools/perf/util/auxtrace.c | 9 +++++++--
>>  tools/perf/util/auxtrace.h | 1 +
>>  2 files changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
>> index 3684e6009b63..563b6c4fca31 100644
>> --- a/tools/perf/util/auxtrace.c
>> +++ b/tools/perf/util/auxtrace.c
>> @@ -218,15 +218,20 @@ static struct auxtrace_queue *auxtrace_alloc_queue_array(unsigned int nr_queues)
>>  	return queue_array;
>>  }
>>  
>> -int auxtrace_queues__init(struct auxtrace_queues *queues)
>> +int auxtrace_queues__init_nr(struct auxtrace_queues *queues, int nr_queues)
>>  {
>> -	queues->nr_queues = AUXTRACE_INIT_NR_QUEUES;
>> +	queues->nr_queues = nr_queues;
>>  	queues->queue_array = auxtrace_alloc_queue_array(queues->nr_queues);
>>  	if (!queues->queue_array)
>>  		return -ENOMEM;
>>  	return 0;
>>  }
>>  
>> +int auxtrace_queues__init(struct auxtrace_queues *queues)
>> +{
>> +	return auxtrace_queues__init_nr(queues, AUXTRACE_INIT_NR_QUEUES);
>> +}
>> +
>>  static int auxtrace_queues__grow(struct auxtrace_queues *queues,
>>  				 unsigned int new_nr_queues)
>>  {
>> diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h
>> index 55702215a82d..8a6ec9565835 100644
>> --- a/tools/perf/util/auxtrace.h
>> +++ b/tools/perf/util/auxtrace.h
>> @@ -521,6 +521,7 @@ int auxtrace_mmap__read_snapshot(struct mmap *map,
>>  				 struct perf_tool *tool, process_auxtrace_t fn,
>>  				 size_t snapshot_size);
>>  
>> +int auxtrace_queues__init_nr(struct auxtrace_queues *queues, int nr_queues);
>>  int auxtrace_queues__init(struct auxtrace_queues *queues);
>>  int auxtrace_queues__add_event(struct auxtrace_queues *queues,
>>  			       struct perf_session *session,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ