Re: [PATCH] kernel-shark: Do not change the PLUGIN_UNTOUCHED bit flag when filtering

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

 



On Thu, 28 May 2020 14:19:17 +0300
"Yordan Karadzhov (VMware)" <y.karadz@xxxxxxxxx> wrote:

> The "visible" field of the entry has one special bit flag, that helps
> the GUI to display the original tracing data (as recorded) regardless
> of the possible modifications made by the plugins. This bit flag must
> be preserved when applying or removing filters.
> 
> Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@xxxxxxxxx>
> ---
>  kernel-shark/src/libkshark.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel-shark/src/libkshark.c b/kernel-shark/src/libkshark.c
> index 0905359..52aacd3 100644
> --- a/kernel-shark/src/libkshark.c
> +++ b/kernel-shark/src/libkshark.c
> @@ -489,6 +489,11 @@ static inline void unset_event_filter_flag(struct kshark_context *kshark_ctx,
>  	e->visible &= ~event_mask;
>  }
>  
> +static void set_all_visible(uint16_t *v) {
> +	/*  Keep the original value of the PLUGIN_UNTOUCHED bit flag. */
> +	*v |= 0xFF & ~KS_PLUGIN_UNTOUCHED_MASK;

This patch is fine as is, but we really should add a KS_PLUGIN_MASK that
encompasses all bits, and replace the 0xFF with that.

-- Steve


> +}
> +
> 



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

  Powered by Linux