From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Boyd Subject: Re: [PATCH] spmi: add command tracepoints for SPMI Date: Thu, 21 May 2015 12:39:18 -0700 Message-ID: <555E3466.4050403@codeaurora.org> References: <1431985887-23379-1-git-send-email-ankgupta@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:42647 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932248AbbEUTjU (ORCPT ); Thu, 21 May 2015 15:39:20 -0400 In-Reply-To: <1431985887-23379-1-git-send-email-ankgupta@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Ankit Gupta , gavidov@codeaurora.org, sdharia@codeaurora.org, mlocke@codeaurora.org, linux-arm-msm@vger.kernel.org, gregkh@linuxfoundation.org, ivan.ivanov@linaro.org Cc: linux-kernel@vger.kernel.org, svarbanov@mm-sol.com, galak@codeaurora.org, agross@codeaurora.org On 05/18/15 14:51, Ankit Gupta wrote: > Add tracepoints to retrieve information about read, write > and non-data commands. For performance measurement support > tracepoints are added at the beginning and at the end of > transfers. Following is a list showing the new tracepoint > events. The "cmd" parameter here represents the opcode, SID, > and full 16-bit address. > > spmi_write_begin: cmd and data buffer. > spmi_write_end : cmd and return value. > spmi_read_begin : cmd. > spmi_read_end : cmd, return value and data buffer. > spmi_cmd : cmd. > > The reason that cmd appears at both the beginning and at > the end event is that SPMI drivers can request commands > concurrently. cmd helps in matching the corresponding > events. > > SPMI tracepoints can be enabled like: > > echo 1 >/sys/kernel/debug/tracing/events/spmi/enable > > and will dump messages that can be viewed in > /sys/kernel/debug/tracing/trace that look like: > > ... spmi_read_begin: opc=56 sid=00 addr=0x0000 > ... spmi_read_end: opc=56 sid=00 addr=0x0000 ret=0 len=02 buf=0x[01-40] > ... spmi_write_begin: opc=48 sid=00 addr=0x0000 len=3 buf=0x[ff-ff-ff] > > Signed-off-by: Ankit Gupta > Signed-off-by: Gilad Avidov > Suggested-by: Sagar Dharia > --- Assuming you fix sign-off-chain: Reviewed-by: Stephen Boyd -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project