linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Song Liu <songliubraving@fb.com>
Cc: rostedt@goodmis.org, mingo@redhat.com, davem@davemloft.net,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	daniel@iogearbox.net, kernel-team@fb.com
Subject: Re: [PATCH v3 3/6] perf: implement pmu perf_kprobe
Date: Mon, 4 Dec 2017 15:41:40 +0100	[thread overview]
Message-ID: <20171204144140.xdpm6vmtdek4fjzb@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20171130235023.1414663-6-songliubraving@fb.com>

On Thu, Nov 30, 2017 at 03:50:20PM -0800, Song Liu wrote:

> +static struct pmu perf_kprobe = {

> +};

> +static inline bool perf_event_is_tracing(struct perf_event *event)
> +{
> +	return event->attr.type == PERF_TYPE_TRACEPOINT ||
> +		strncmp(event->pmu->name, "kprobe", 6) == 0;

Why a strcmp here? Wouldn't something like:

	event->pmu == &perf_kprobe

work much simpler?

> +}

  reply	other threads:[~2017-12-04 14:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-30 23:50 [PATCH v3 0/6] enable creating [k,u]probe with perf_event_open Song Liu
2017-11-30 23:50 ` [PATCH v3] bcc: Try use new API to create " Song Liu
2017-11-30 23:50 ` [PATCH v3] perf_event_open.2: add type kprobe and uprobe Song Liu
2017-11-30 23:50 ` [PATCH v3 1/6] perf: prepare perf_event.h for new types perf_kprobe and perf_uprobe Song Liu
2017-12-03 17:03   ` Alexei Starovoitov
2017-12-04 18:24     ` Song Liu
2017-12-04 18:26       ` Alexei Starovoitov
2017-11-30 23:50 ` [PATCH v3 2/6] perf: copy new perf_event.h to tools/include/uapi Song Liu
2017-11-30 23:50 ` [PATCH v3 3/6] perf: implement pmu perf_kprobe Song Liu
2017-12-04 14:41   ` Peter Zijlstra [this message]
2017-12-04 14:51   ` Peter Zijlstra
2017-12-04 15:15   ` Peter Zijlstra
2017-11-30 23:50 ` [PATCH v3 4/6] perf: implement pmu perf_uprobe Song Liu
2017-11-30 23:50 ` [PATCH v3 5/6] bpf: add option for bpf_load.c to use perf_kprobe Song Liu
2017-11-30 23:50 ` [PATCH v3 6/6] bpf: add new test test_many_kprobe Song Liu
2017-12-01 14:54 ` [PATCH v3 0/6] enable creating [k,u]probe with perf_event_open Daniel Borkmann

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=20171204144140.xdpm6vmtdek4fjzb@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=songliubraving@fb.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;
as well as URLs for NNTP newsgroup(s).