[PATCH v7 8/9] coresight: tools: Add configuration table test tools

James Clark james.clark at linaro.org
Tue Dec 3 06:29:12 PST 2024



On 03/12/2024 2:25 pm, James Clark wrote:
> 
> 
> On 27/11/2024 1:42 pm, Mike Leach wrote:
>> Add an example config table generator to test loading configuration
>> tables.
>>
>> Provides a table buffer writer function that can be re-used in other
>> userspace programs.
>>
>> Table write format matches that expected by the corresponding reader
>> in the configfs driver code.
>>
>> Generates tables and outputs in form of binary files.
>>
>> Add a config table file reader and printer. Takes in config table files
>> and prints the contents. Uses table reader source from kernel driver.
>>
>> Signed-off-by: Mike Leach <mike.leach at linaro.org>
>> ---
>>   MAINTAINERS                                   |   1 +
>>   .../coresight/coresight-config-table.h        |   5 +
> 
> Hi Mike,
> 
> Isn't there some convention about maintaining a copy of kernel headers 
> in the tools? Especially as you wouldn't rebuild the tools after 
> updating the kernel headers so breakages might go unnoticed.
> 
> [...]
> 
>> +
>> +/*
>> + * sets of presets leaves strobing window constant while varying 
>> period to allow
>> + * experimentation with mark / space ratios for various workloads
>> + */
>> +static u64 afdo_set_a_presets[AFDO_NR_PRESETS][AFDO_NR_PARAM_SUM] = {
>> +    { 2000, 100 },
>> +    { 2000, 1000 },
>> +    { 2000, 5000 },
>> +    { 2000, 10000 },
>> +    { 4000, 100 },
> 
> The comment above here looks like its for example1, this one does vary 
> the window size.
> 
> Probably only example2 is enough, I assumed they were different but 
> example2 is basically the same as example1 with an extra preset list. We 
> could comment that the second preset list is optional and delete 
> example1. Saves people reading more and wondering what the difference is.
> 
> I tried to make an example that doesn't use an existing feature by 
> reacreating afdo from scratch which I thought would be a good example. 
> It's pasted at the end.

I've attached it here instead

-------------- next part --------------
A non-text attachment was scrubbed...
Name: coresight-cfg-afdo.c
Type: text/x-csrc
Size: 6063 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20241203/f5a36a50/attachment.bin>


More information about the linux-arm-kernel mailing list