Re: [PATCH v2] libtraceeval: Use name for type look up for traceeval_stat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 04, 2023 at 06:05:23PM -0400, Steven Rostedt wrote:
> From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx>
> 
> The functions that retrieve the traceeval_stat currently requires passing
> in the struct traceeval_type. But this is fragile, as it may not be set up
> properly. It was originally done that way as a "fast" way to look up
> stats, but in reality it will likely just cause more issues with wrong
> types passed in. That decision was based more on defining policy which the
> library should not do.
> 
> Instead, just pass in the string name of the value type to find and
> retrieve the traceeval_data value from the traceeval that way.
> 
> Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>

Reviewed-by: Ross Zwisler <zwisler@xxxxxxxxxx>




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux