Re: [PATCH v2 6/9] kernel-shark-qt: Add filtering to the C API of KernelShark

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

 



On Thu, 28 Jun 2018 19:30:09 +0300
"Yordan Karadzhov (VMware)" <y.karadz@xxxxxxxxx> wrote:

> +static void unset_event_filter_flag(struct kshark_context *kshark_ctx,
> +				    struct kshark_entry *e)
> +{
> +	/*
> +	 * All entries, filtered-out by the event filters, will be treated
> +	 * differently, when visualized. Because of this, ignore the value
> +	 * of the GRAPH_VIEW flag provided by the user via
> +	 * kshark_ctx->filter_mask and unset the EVENT_VIEW flag.
> +	 */
> +	int event_mask = kshark_ctx->filter_mask;

Just to get you use to Linux kernel coding style. Always add a space
between the declaration and the code. Even when the declaration has
code.

There's a few places where this requirement is not strictly forced, but
we'll discuss that later.

> +	event_mask &= ~KS_GRAPH_VIEW_FILTER_MASK;
> +	event_mask |= KS_EVENT_VIEW_FILTER_MASK;
> +	e->visible &= ~event_mask;
> +}
> +
> +void kshark_filter_entries(struct kshark_context *kshark_ctx,
> +			   struct kshark_entry **data,
> +			   size_t n_entries)
> +{
> +	int i;

Here too, and any other places that has declarations.

-- Steve

> +	if (!kshark_filter_is_set(kshark_ctx))
> +		return;
> +



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

  Powered by Linux