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: 9944719 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3645860224 for ; Fri, 8 Sep 2017 17:20:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C8E928853 for ; Fri, 8 Sep 2017 17:20:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 111F02885F; Fri, 8 Sep 2017 17:20:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 70E2F28853 for ; Fri, 8 Sep 2017 17:20:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=6DWn4crTs82YNc4ALvWVxkvZAw/DmHXb6DVX9VS3I8c=; b=gjPSy23G2ogdPcmxc+V52O1bq9 7BR0jQAauEoLRJDkZVT9/HR7hJbzCtfZR4PPHYbjU5OYPsCW7vmYhd8525hk0ntMSAaCGZ3EaFR/c 955GFYtMU0206EZ7wEfT+xAIY4R4FtMeh/QZmKa961x1p4EmJ7+KJ2ruznroJMTVAGn2imEwm0erR tIpnH2h/CshmjLluo+pBHUe2HGuIS2zsHZ0b2R/QFENGx5sw1EEbPWkQ4q+nLVWPFcgI+kRiaQxv/ ciJ7F5jJCelkicZBq7pHgrHl7RZzq+Fp++Hnm/KiRp0kU+o6iiVi65Gjsn7DlLlY+5LeH4sIMgW4o ioF8DRfQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dqMx1-00023x-5i; Fri, 08 Sep 2017 17:20:19 +0000 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dqMwL-0000k1-HA for linux-arm-kernel@lists.infradead.org; Fri, 08 Sep 2017 17:19:42 +0000 Received: by mail-wm0-x22e.google.com with SMTP id i189so8622279wmf.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=sdchwlGhYGRZGiLD6fuittC/Acs45yPatkgLAKAyyJWYitnG0lv+0WzFrXM6WP4E0d T1ee16I/+l9RJ6I2S+pIXVn8riagLaVDcy75rxFf3Hso2uA3LJlXD92tP7nMuzwkImUo 1LCaQJkUTxyXkvIM8T+TmW6JkhHOBniUW/yM9pMaIyH7h61Z9QJi0HoPK9DMw8Zoh+BR v5UCrsTN2MXI3Gxt7nBym4hG8twEQSFYmleVWYQyaT+VeniwrwlQ9fPXyftQyoiCXccM ZbKMTlwtX8YRAPeSj5qDZjLiU2bxVH0rlJo+z7a7yPwDxJdw9Mhnec5kens//qu+MEDm wEOw== X-Gm-Message-State: AHPjjUiZBU27jUF5L00I+HTZoNVzfxR0FieLFdYJ4Sk/LJGEMQHBMmEr uv0BgDOMDBmHnerD 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170908_101938_200341_EBCAE580 X-CRM114-Status: GOOD ( 14.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, lorenzo.pieralisi@arm.com, skannan@codeaurora.org, seansw@qti.qualcomm.com, khilman@baylibre.com, mturquette@baylibre.com, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, Steven Rostedt , georgi.djakov@linaro.org, davidai@quicinc.com, robh+dt@kernel.org, linux-arm-msm@vger.kernel.org, andy.gross@linaro.org, vincent.guittot@linaro.org, Ingo Molnar , sboyd@codeaurora.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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