mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Valentin Schneider <vschneid@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Ajay Kaher <akaher@vmware.com>,
	Eric Vaughn <ervaughn@linux.microsoft.com>,
	Sishuai Gong <sishuai.system@gmail.com>,
	Uros Bizjak <ubizjak@gmail.com>,
	Yue Haibing <yuehaibing@huawei.com>,
	Zhang Zekun <zhangzekun11@huawei.com>,
	Zheng Yejian <zhengyejian1@huawei.com>
Subject: Re: [GIT PULL] tracing: Updates for 6.6
Date: Fri, 01 Sep 2023 11:20:31 +0200	[thread overview]
Message-ID: <xhsmhr0nib674.mognet@vschneid.remote.csb> (raw)
In-Reply-To: <20230831115635.1bdea0d7@rorschach.local.home>

Hi,

On 31/08/23 11:56, Steven Rostedt wrote:
> Linus,
>
> [ Note, there's a minor conflict which should be fixed by:
>         mutex_lock(&trace_types_lock);
> -       if (unlikely(tr->current_trace && iter->trace->name != tr->current_trace->name)) {
> +       if (unlikely(tr->current_trace != iter->trace))
>  +              /* Close iter->trace before switching to the new current tracer */
>  +              if (iter->trace->close)
>  +                      iter->trace->close(iter);
> -               *iter->trace = *tr->current_trace;
> +               iter->trace = tr->current_trace;
>  +              /* Reopen the new current tracer */
>  +              if (iter->trace->open)
>  +                      iter->trace->open(iter);
>  +      }
>         mutex_unlock(&trace_types_lock);
> ]
>
> Tracing updates for 6.6:
>
>  User visible changes:
>
>   - Added a way to easier filter with cpumasks:
>      # echo 'cpumask & CPUS{17-42}' > /sys/kernel/tracing/events/ipi_send_cpumask/filter
>

It looks like the patches included are from v2 of [1], which still had some
(small) issues to fix. I have addressed these in [2], but I haven't sent
this out yet as I'm still working on the context_tracking/vmalloc part of
the series.

I'm happy to send just the tracing bits, if that helps - or just send the
deltas as separate fixes, whatever makes it easier.

Apologies for not bringing this up when the patches were picked up in [3],
I've only just come back from PTO/moving abroad and have started catching
up.

[1]: https://lore.kernel.org/all/20230720163056.2564824-1-vschneid@redhat.com/
[2]: https://gitlab.com/vschneid/linux/-/commits/redhat/isolirq/defer/v3-wip
[3]: https://lore.kernel.org/all/20230824021812.938245293@goodmis.org/

For reference, the git range-diff between the patches in
tracing/trace/for-next and those in my v3 is appended below (pure changelog
diffs removed)

---
 2:  39f7c41c908bc !  2:  e58d79bd79da2 tracing/filters: Enable filtering a cpumask field by another cpumask
      ## include/linux/trace_events.h ##
     @@ include/linux/trace_events.h: enum {
    @@ kernel/trace/trace_events_filter.c: static void filter_free_subsystem_filters(st
     +			return FILTER_DYN_STRING;
     +		if (strstr(type, "cpumask_t"))
     +			return FILTER_CPUMASK;
    -+		}
    ++	}

        if (strstr(type, "__rel_loc") && strstr(type, "char"))
                return FILTER_RDYN_STRING;
    @@ kernel/trace/trace_events_filter.c: static int parse_pred(const char *str, void
     +		maskstart = i;
     +
     +		/* Walk the cpulist until closing } */
    -+		for (; str[i] && str[i] != '}'; i++);
    ++		for (; str[i] && str[i] != '}'; i++)
    ++			;
    ++
     +		if (str[i] != '}') {
     +			parse_error(pe, FILT_ERR_MISSING_BRACE_CLOSE, pos + i);
     +			goto err_free;
    @@ kernel/trace/trace_events_filter.c: static int parse_pred(const char *str, void
     +
     +		/* Copy the cpulist between { and } */
     +		tmp = kmalloc((i - maskstart) + 1, GFP_KERNEL);
    -+		strscpy(tmp, str + maskstart, (i - maskstart) + 1);
    ++		if (!tmp)
    ++			goto err_mem;
     +
    ++		strscpy(tmp, str + maskstart, (i - maskstart) + 1);
     +		pred->mask = kzalloc(cpumask_size(), GFP_KERNEL);
    -+		if (!pred->mask)
    ++		if (!pred->mask) {
    ++			kfree(tmp);
     +			goto err_mem;
    ++		}
     +
     +		/* Now parse it */
     +		if (cpulist_parse(tmp, pred->mask)) {
    ++			kfree(tmp);
     +			parse_error(pe, FILT_ERR_INVALID_CPULIST, pos + i);
     +			goto err_free;
     +		}
    ++		kfree(tmp);
     +
     +		/* Move along */
     +		i++;
 5:  fe4fa4ec9b464 !  5:  03eefdab555b2 tracing/filters: Optimise cpumask vs cpumask filtering when user mask is a single CPU
      ## kernel/trace/trace_events_filter.c ##
     @@ kernel/trace/trace_events_filter.c: enum filter_pred_fn {
    @@ kernel/trace/trace_events_filter.c: static int parse_pred(const char *str, void
     +		if (single && field->filter_type == FILTER_CPUMASK) {
     +			pred->val = cpumask_first(pred->mask);
     +			kfree(pred->mask);
    ++			pred->mask = NULL;
     +		}
     +
                if (field->filter_type == FILTER_CPUMASK) {
 6:  ca77dd8ce4658 !  6:  f75aee048ce5a tracing/filters: Optimise scalar vs cpumask filtering when the user mask is a single CPU
    @@ Commit message
      ## kernel/trace/trace_events_filter.c ##
     @@ kernel/trace/trace_events_filter.c: static int parse_pred(const char *str, void *data,
    @@ kernel/trace/trace_events_filter.c: static int parse_pred(const char *str, void
     +		if (single && field->filter_type != FILTER_CPU) {
                        pred->val = cpumask_first(pred->mask);
                        kfree(pred->mask);
    -		}
    +			pred->mask = NULL;
     @@ kernel/trace/trace_events_filter.c: static int parse_pred(const char *str, void *data,
                                FILTER_PRED_FN_CPUMASK;
                } else if (field->filter_type == FILTER_CPU) {
                        pred->fn_num = FILTER_PRED_FN_CPU_CPUMASK;
     +		} else if (single) {
    -+			pred->op = pred->op == OP_BAND ? OP_EQ : pred->op;
    ++			if (pred->op == OP_BAND)
    ++				pred->op = OP_EQ;
    ++
     +			pred->fn_num = select_comparison_fn(pred->op, field->size, false);
     +			if (pred->op == OP_NE)
     +				pred->not = 1;
 7:  1cffbe6c62f10 !  7:  6a78ed47b0b06 tracing/filters: Optimise CPU vs cpumask filtering when the user mask is a single CPU
      ## kernel/trace/trace_events_filter.c ##
     @@ kernel/trace/trace_events_filter.c: static int parse_pred(const char *str, void *data,
    @@ kernel/trace/trace_events_filter.c: static int parse_pred(const char *str, void
     +		if (single) {
                        pred->val = cpumask_first(pred->mask);
                        kfree(pred->mask);
    -		}
    +			pred->mask = NULL;
     @@ kernel/trace/trace_events_filter.c: static int parse_pred(const char *str, void *data,
                                FILTER_PRED_FN_CPUMASK_CPU :
                                FILTER_PRED_FN_CPUMASK;
                } else if (field->filter_type == FILTER_CPU) {
     -			pred->fn_num = FILTER_PRED_FN_CPU_CPUMASK;
     +			if (single) {
    -+				pred->op = pred->op == OP_BAND ? OP_EQ : pred->op;
    ++				if (pred->op == OP_BAND)
    ++					pred->op = OP_EQ;
    ++
     +				pred->fn_num = FILTER_PRED_FN_CPU;
     +			} else {
     +				pred->fn_num = FILTER_PRED_FN_CPU_CPUMASK;
     +			}
                } else if (single) {
    -			pred->op = pred->op == OP_BAND ? OP_EQ : pred->op;
    -			pred->fn_num = select_comparison_fn(pred->op, field->size, false);
    +			if (pred->op == OP_BAND)
    +				pred->op = OP_EQ;


  reply	other threads:[~2023-09-01  9:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31 15:56 Steven Rostedt
2023-09-01  9:20 ` Valentin Schneider [this message]
2023-09-01 11:44   ` Steven Rostedt
2023-09-01 12:19     ` Valentin Schneider
2023-09-01 23:41 ` pr-tracker-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xhsmhr0nib674.mognet@vschneid.remote.csb \
    --to=vschneid@redhat.com \
    --cc=akaher@vmware.com \
    --cc=ervaughn@linux.microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sishuai.system@gmail.com \
    --cc=torvalds@linux-foundation.org \
    --cc=ubizjak@gmail.com \
    --cc=yuehaibing@huawei.com \
    --cc=zhangzekun11@huawei.com \
    --cc=zhengyejian1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®