Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756911AbdIHSN0 (ORCPT ); Fri, 8 Sep 2017 14:13:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:43728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756650AbdIHSNZ (ORCPT ); Fri, 8 Sep 2017 14:13:25 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A76B221D28 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Fri, 8 Sep 2017 14:13:21 -0400 From: Steven Rostedt To: Georgi Djakov Cc: linux-pm@vger.kernel.org, gregkh@linuxfoundation.org, rjw@rjwysocki.net, robh+dt@kernel.org, khilman@baylibre.com, mturquette@baylibre.com, vincent.guittot@linaro.org, skannan@codeaurora.org, sboyd@codeaurora.org, andy.gross@linaro.org, seansw@qti.qualcomm.com, davidai@quicinc.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, mark.rutland@arm.com, lorenzo.pieralisi@arm.com, Ingo Molnar Subject: Re: [RFC v3 2/3] interconnect: Add basic event tracing Message-ID: <20170908141321.02f51e92@gandalf.local.home> In-Reply-To: <20170908171830.13813-3-georgi.djakov@linaro.org> References: <20170908171830.13813-1-georgi.djakov@linaro.org> <20170908171830.13813-3-georgi.djakov@linaro.org> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1470 Lines: 61 On Fri, 8 Sep 2017 20:18:29 +0300 Georgi Djakov wrote: > diff --git a/include/trace/events/interconnect.h b/include/trace/events/interconnect.h > new file mode 100644 > index 000000000000..c4a72163873c > --- /dev/null > +++ b/include/trace/events/interconnect.h > @@ -0,0 +1,45 @@ > +#undef TRACE_SYSTEM > +#define TRACE_SYSTEM interconnect > + > +#if !defined(_TRACE_INTERCONNECT_H) || defined(TRACE_HEADER_MULTI_READ) > +#define _TRACE_INTERCONNECT_H > + > +#include > + > +struct interconnect_path; > + > +DECLARE_EVENT_CLASS(interconnect_path, > + > + TP_PROTO(struct interconnect_path *path), > + > + TP_ARGS(path), > + > + TP_STRUCT__entry( > + __field(struct interconnect_path *, path) > + ), > + > + TP_fast_assign( > + __entry->path = path; > + ), > + > + TP_printk("INTERCONNECT: %p", __entry->path) You're passing in an interconnect_path and only recording the pointer to it? Wouldn't it be useful to record other aspects? Like the number of nodes, the avg and peak bw of each node? -- Steve > +); > + > +DEFINE_EVENT(interconnect_path, interconnect_set, > + > + TP_PROTO(struct interconnect_path *path), > + > + TP_ARGS(path) > +); > + > +DEFINE_EVENT(interconnect_path, interconnect_set_complete, > + > + TP_PROTO(struct interconnect_path *path), > + > + TP_ARGS(path) > +); > + > +#endif /* _TRACE_INTERCONNECT_H */ > + > +/* This part must be outside protection */ > +#include