From patchwork Fri Sep 8 17:18:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 112098 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp594087qgf; Fri, 8 Sep 2017 10:19:25 -0700 (PDT) X-Received: by 10.98.61.156 with SMTP id x28mr3842416pfj.295.1504891165770; Fri, 08 Sep 2017 10:19:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504891165; cv=none; d=google.com; s=arc-20160816; b=KRUGOxZNuQiMdj6+B+cboBQB0FIhDGDpkxve8WzYAMCdDLtJ738YPl9brl7hCnhrb/ iA8ClF1dZ7i5Hh2xGdHKsPkhIPyyHJh0DGTPr5mc7foqWkzACliUsfb/Ka2yeYAb4stc LeL7bCi2V7KurPeSa3fxyaBKir8b/PfmTSPXmT/z5oRh48jDdfXOqBaS2kh6hBJBsQn/ qEBLlphmiUj26dob1nFgCPUjiTj02gLXw7Vc8Lswo+E7NGAYjdS3z2lWpd4wWI9ej0B6 5jlip/eOkagYdQoB4y9+H2NCpxAUWb2QjX06igXymI/+RXcCG82UDmjkWLTLZag7EWE1 F0OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=9LoRUT3YfoM+KzkmrP2i5Wcn2IROejkFjrV1/imgC3g=; b=eTPWp8Zky/NgJNBKKraM3oU4ZdIyKseoCUovQjpaUB824iInYHWvKO2KmVhX6E6smm yF/ZKd5zGx38M+yB0GW3u+RHEPFHNJEJ1x/S7mGUL7x2TUgcshxQ89uQRhN90/Lxux6k x7Fxg3GXQBkoUkaeN3fHZFlIe/KLIB8mZwyv+3yzdDX2nFvwrQZHZn51uxiYHms+4P24 bqHZVFO5yD93enmZAP58bk+LcDphG6dvCRRBEk70c5POMcPx1xYqvQj8vTGnlclg+pNr +kT0EPyqjwuSVZg0YvvzFWRONUbjHJd/wIFQRqpJLnLi9SF8q2Lu+FWJbBDo0sm8Lbpe d0FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JXGLju1L; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l9si1788745pgn.541.2017.09.08.10.19.25; Fri, 08 Sep 2017 10:19:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JXGLju1L; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756702AbdIHRTV (ORCPT + 26 others); Fri, 8 Sep 2017 13:19:21 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:46400 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756685AbdIHRTP (ORCPT ); Fri, 8 Sep 2017 13:19:15 -0400 Received: by mail-wm0-f53.google.com with SMTP id i189so8622275wmf.1 for ; Fri, 08 Sep 2017 10:19:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9LoRUT3YfoM+KzkmrP2i5Wcn2IROejkFjrV1/imgC3g=; b=JXGLju1LvBdWZY6uzw7iv4RDEWFN6dZnbTSX9lFaK4wOF7UdodFJ00ILJjQRgXr3dT FqAMC2f6xd43JV5rWIhuUkZOoyeY7pdjdimvs9xPP4N3VQ33arwV4jJ75oxvsqEuFfzY 9zA6sgyv+5yPaFakjiPUNhD6trR+343pHkhcc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9LoRUT3YfoM+KzkmrP2i5Wcn2IROejkFjrV1/imgC3g=; b=WaL6Z2rvLl9S9JC5vwK+KprHJ4ohEnMU+thW4XHKNHLTrcq0n20BGURqszxl14u7Zc XfI8nGGkGRfb9VRZ2Ylg2kXnnBb6n91uDAuLPVpWxtWH/zDWOxpnUDqmQLVZn5YbODpq QKP++8L62OJA4JMYh0/Ij8Hnmwv1YVzwDIu9bM7kkkOTbx7sc1kVtLi4vz/YoUNa41Bz 9/hk+z1LY1XdRiP/QoGrB7r3qbbVlzOEzbvXU/VM+Pyygl3EfihBMa+1prTxZ69/c6nx p7+HzaZkqBpANiZtYKFf12jgeNpf3B12jFytrnVcwvZUs564T4RLXLPixOVfxW3Dyuvo WHuQ== X-Gm-Message-State: AHPjjUjmeWFQzq6RNbf4vDZJT6yNz/EJSaCJRAlt1wcg1lPT12z7Ov3q zTu9ODKxHQDyilCN X-Google-Smtp-Source: ADKCNb6yV8aXcHg5g6vAH+XGiM5JFwV2TTB4bEFmDRDNHss8Qs7Qe/scLrzd73f9yydZ0WVyAacE6w== X-Received: by 10.80.150.196 with SMTP id z4mr2704580eda.161.1504891154552; Fri, 08 Sep 2017 10:19:14 -0700 (PDT) Received: from mms-0441.qualcomm.mm-sol.com ([212.45.67.2]) by smtp.googlemail.com with ESMTPSA id i6sm865817edk.45.2017.09.08.10.19.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Sep 2017 10:19:13 -0700 (PDT) From: Georgi Djakov To: linux-pm@vger.kernel.org, gregkh@linuxfoundation.org Cc: 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, georgi.djakov@linaro.org, Steven Rostedt , Ingo Molnar Subject: [RFC v3 2/3] interconnect: Add basic event tracing Date: Fri, 8 Sep 2017 20:18:29 +0300 Message-Id: <20170908171830.13813-3-georgi.djakov@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170908171830.13813-1-georgi.djakov@linaro.org> References: <20170908171830.13813-1-georgi.djakov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add basic tracepoints in interconnect_set() so we can trace the performance and the operations which configure the hardware. Signed-off-by: Georgi Djakov Cc: Steven Rostedt Cc: Ingo Molnar --- drivers/interconnect/interconnect.c | 7 ++++++ include/trace/events/interconnect.h | 45 +++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 include/trace/events/interconnect.h diff --git a/drivers/interconnect/interconnect.c b/drivers/interconnect/interconnect.c index 94e2a9f01545..4a016f3bedc3 100644 --- a/drivers/interconnect/interconnect.c +++ b/drivers/interconnect/interconnect.c @@ -33,6 +33,9 @@ struct interconnect_path { struct interconnect_req reqs[0]; }; +#define CREATE_TRACE_POINTS +#include + static struct interconnect_node *node_find(const char *dev_id, int con_id) { struct interconnect_node *node = ERR_PTR(-EPROBE_DEFER); @@ -209,6 +212,8 @@ int interconnect_set(struct interconnect_path *path, size_t i; int ret = 0; + trace_interconnect_set(path); + for (i = 0; i < path->num_nodes; i++, prev = next) { next = path->reqs[i].node; @@ -242,6 +247,8 @@ int interconnect_set(struct interconnect_path *path, } out: + trace_interconnect_set_complete(path); + return ret; } 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) +); + +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