Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2614147yba; Mon, 15 Apr 2019 15:53:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqzgBD2U+3IMbLfd0WZ9V5rcv97lpCZvOZ2jpSPNGfGLjIhyzocjJaWNW9EecNmeKHDKv+YB X-Received: by 2002:a17:902:1e2:: with SMTP id b89mr79074046plb.278.1555368839870; Mon, 15 Apr 2019 15:53:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555368839; cv=none; d=google.com; s=arc-20160816; b=ApBunHseynR6UdQYlNbJrXTImVwx5yYfRw8kaTecjGNiyHRvMhxOGM+eLLbV21bXA4 tx8uCNCKzFqmfYGhm3NoFIMk1w5hPzEh6HEj5LdzMACaHWul19IP+FE+1sXWAgkt0Vcz XepQThbWE6L4QwNBCb595NYynOWM5oEeNXMzmjgYbapt/G+gH/REZGEVX3CoEAeSTmhU SjWF8D4+sULWUHqNYzanSUqezq/h/mCZpcUm1n7Mt6UczQjIKO25IBbTa/PX2OIPMloS h/v893wdVPjMabw+N16Wpa37Dairfhve67jS6Tc22mizygrVsHEX8jH6l/dA7FHDwSVw Cwiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GkjIrKEQNQ3G7xnk8XYGn5F/+Y0cS2ZRMu00W+VyZSE=; b=S/D6NZ6GrnbCQEAboqGRHR2pkanNifiJ46aleMxfF7ajx8E3jokkG/knJbdSrCL1yt gWA/Z4a7X4ZwgE6t00M4m9t9q5HDXmi1B68dIm+PB4gxdo2hIwWP4/OmIg6B14Cahpp7 SL8Jm4tkLyEBLlgyeG0p1RynntqAf6NdYkmj5vuAXJP1uUe/EGJZfxYH42A3nAsJfNsl fUvx7ZKQ7T5g1ZerYuFX2wOoVj1gXAuAK5N9MW786RI6LOZTi/8ArsinGrfSrM9asCr0 kERmzr/iV7ro2TJMm8K+PBe4eSufb8FmkH+rghMtHNBnDFxs1jK/BTZi/bSGNrOUANTA 5RWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=l13kvR76; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si23070615ply.89.2019.04.15.15.53.41; Mon, 15 Apr 2019 15:53:59 -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=@chromium.org header.s=google header.b=l13kvR76; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728169AbfDOWxF (ORCPT + 99 others); Mon, 15 Apr 2019 18:53:05 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:32971 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726041AbfDOWxD (ORCPT ); Mon, 15 Apr 2019 18:53:03 -0400 Received: by mail-io1-f67.google.com with SMTP id b6so16072597iog.0 for ; Mon, 15 Apr 2019 15:53:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GkjIrKEQNQ3G7xnk8XYGn5F/+Y0cS2ZRMu00W+VyZSE=; b=l13kvR7644rfoKoxzoMRYJT7KFRzjE9KRkKEasZ/Q6oOShdyjJ7qKNMxGtEzcSksRq YQvbn+2nZz0HuqwE93Cp9KX2smsWC7DZ/tLGshgVH6v2bznWULCWlGsHl0pPO5MpkCXK V8JnsYr1RxMliDlXnubPtBfg0w4ix9utPBJOE= 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:mime-version:content-transfer-encoding; bh=GkjIrKEQNQ3G7xnk8XYGn5F/+Y0cS2ZRMu00W+VyZSE=; b=PR15ZZuNEABfMuqp/vJYnsiXbyMI3K99q75d14KkQsCchNQyWVO8shbWy7iq/uCkLi BfxemDb98Pds1ESpYErISrVRyGvJJodouqYDSprvBOAHUeIZm7DyggFEKq2v8lhyT0gL DV4s4i3ReUxTTP22OT+mMHkFv9BbCYKE+kf+W5D+ANEcY+P+qnfuwmS0pbPxKZfM8LoR NRzA799fmZ83jwcijhTQmYnkAIRy5WbjdJUP2pM4v9fOoxxjYwkyFoTlYXUPkgrIJFQD w6yNX9PrSwwsS9R55BRVCTxStSOR6/QRSbt8yYqEhOfdxs8bxHlIoviFYokbAxi+ebPY 0Qsw== X-Gm-Message-State: APjAAAXdWltUFIzCsgav2CTI+2MoX4GfRoIzF71+QzL9/ClVd4wLfAwf llB2GQ9BJdlsO5Uc6IIW6XyLvw== X-Received: by 2002:a6b:b285:: with SMTP id b127mr46548010iof.179.1555368782824; Mon, 15 Apr 2019 15:53:02 -0700 (PDT) Received: from localhost ([2620:15c:183:0:20b8:dee7:5447:d05]) by smtp.gmail.com with ESMTPSA id 77sm8873833itl.17.2019.04.15.15.53.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Apr 2019 15:53:02 -0700 (PDT) From: Raul E Rangel To: linux-mmc@vger.kernel.org, linux-trace-devel@vger.kernel.org Cc: djkurtz@chromium.org, zwisler@chromium.org, Raul E Rangel , Steven Rostedt , hongjiefang , Ingo Molnar , linux-kernel@vger.kernel.org, Kyle Roeschley , Avri Altman , Ulf Hansson Subject: [PATCH v1 2/4] mmc: core: Add trace event for SD SSR response Date: Mon, 15 Apr 2019 16:52:39 -0600 Message-Id: <20190415225241.70088-2-rrangel@chromium.org> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e-goog In-Reply-To: <20190415225241.70088-1-rrangel@chromium.org> References: <20190415225241.70088-1-rrangel@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Example: sd_ssr: mmc0: au: 8192, erase time: 0, erase offset: 0x0, raw: {0x0,0x3000000,0x1019000,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0} Signed-off-by: Raul E Rangel --- drivers/mmc/core/sd.c | 2 ++ include/trace/events/mmc.h | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index 3bed7c4b6d75..cc33a4f96c6a 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -282,6 +282,8 @@ static int mmc_read_ssr(struct mmc_card *card) } } + trace_sd_ssr(card); + /* * starting SD5.1 discard is supported if DISCARD_SUPPORT (b313) is set */ diff --git a/include/trace/events/mmc.h b/include/trace/events/mmc.h index e45258e8a6cb..cad604ee800f 100644 --- a/include/trace/events/mmc.h +++ b/include/trace/events/mmc.h @@ -52,6 +52,37 @@ TRACE_EVENT(sd_scr, ) ); +TRACE_EVENT(sd_ssr, + + TP_PROTO(struct mmc_card *card), + + TP_ARGS(card), + + TP_STRUCT__entry( + __array(u32, raw, 16) + __field(unsigned int, au) + __field(unsigned int, erase_timeout) + __field(unsigned int, erase_offset) + __string(name, mmc_hostname(card->host)) + ), + + TP_fast_assign( + memcpy(__entry->raw, card->raw_ssr, sizeof(card->raw_ssr)); + __entry->au = card->ssr.au; + __entry->erase_timeout = card->ssr.erase_timeout; + __entry->erase_offset = card->ssr.erase_offset; + __assign_str(name, mmc_hostname(card->host)); + ), + + TP_printk("%s: au: %d, erase time: %d, erase offset: %#x, raw: %s", + __get_str(name), + __entry->au, + __entry->erase_timeout, + __entry->erase_offset, + __print_array(__entry->raw, 16, sizeof(u32)) + ) +); + TRACE_EVENT(mmc_request_start, TP_PROTO(struct mmc_host *host, struct mmc_request *mrq), -- 2.21.0.392.gf8f6787159e-goog