Thread (16 messages) 16 messages, 5 authors, 2017-12-04

Re: [PATCH v3 3/6] perf: implement pmu perf_kprobe

From: Peter Zijlstra <peterz@infradead.org>
Date: 2017-12-04 14:42:00
Also in: lkml

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?
+}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help