From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: * X-Spam-Status: No, score=1.6 required=3.0 tests=FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE44DC10F11 for ; Wed, 24 Apr 2019 15:31:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A48A021773 for ; Wed, 24 Apr 2019 15:31:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731205AbfDXPbW (ORCPT ); Wed, 24 Apr 2019 11:31:22 -0400 Received: from mail-it1-f194.google.com ([209.85.166.194]:37313 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730792AbfDXPbW (ORCPT ); Wed, 24 Apr 2019 11:31:22 -0400 Received: by mail-it1-f194.google.com with SMTP id u65so6909601itc.2 for ; Wed, 24 Apr 2019 08:31:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=4jYIXqAv156sqB9xpzJsjeRlS9lW8nAohtQ+TmRz3ws=; b=n7ExHocmRYOO+cz4/HCeJcWC94UUywWeDUQ6BXt9fNV29ZoGitB5j/ee4MI6CnzJ+V qOh+oRQrlE5ta4KDmA5IVRKhB4AD7gff4+IYIbAQgrsbTr7dZooXW/pN3R0J96UF7egG bVQQqi3S/xrRjQlt/qL85zrssPC0xc/pC4FDVJEsxsXvKRVU+VCSscEc9aj7OcsWoGL1 546/1/Tg/ZGmhbRmfFc5yaKqv+Jpd3etF40eICALgkfe0aUj12W0hacM34sxSIZRa6uz 3UOkSncb1769ammRtdDZQVqagZLC17FnaNy4WaXN6l0R0/48jJWizssvSQA47Hx3xcRB TzZg== X-Gm-Message-State: APjAAAVRsmSkSrVi4HYGrVJf8b8jBk1+G2aF4ay8qrAsFGLEOB2cz/h3 xdIZtt6spGuz1rW5S6ajImk6CQ== X-Google-Smtp-Source: APXvYqzz64F0lOg7iIhoJFNqhddAT7aUo1jcMpxrDizoLiVtGSW6wqww3LhI5am9R6gtRnrLg0A8rQ== X-Received: by 2002:a02:9108:: with SMTP id a8mr5594877jag.107.1556119881054; Wed, 24 Apr 2019 08:31:21 -0700 (PDT) Received: from google.com ([2620:15c:183:0:20b8:dee7:5447:d05]) by smtp.gmail.com with ESMTPSA id s124sm9560049itb.42.2019.04.24.08.31.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Apr 2019 08:31:20 -0700 (PDT) Date: Wed, 24 Apr 2019 09:31:15 -0600 From: Raul Rangel To: Ulf Hansson Cc: "linux-mmc@vger.kernel.org" , linux-trace-devel@vger.kernel.org, Daniel Kurtz , zwisler@chromium.org, Steven Rostedt , hongjiefang , Jennifer Dahm , Ingo Molnar , Linux Kernel Mailing List , Shawn Lin , Kyle Roeschley , Avri Altman , Simon Horman , Raul Rangel Subject: Re: [PATCH v2 0/4] Add trace events for SD registers. Message-ID: <20190424153115.GA186956@google.com> References: <20190416183257.247902-1-rrangel@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 23, 2019 at 08:29:15AM +0200, Ulf Hansson wrote: > On Tue, 16 Apr 2019 at 20:33, Raul E Rangel wrote: > > > > I am not able to make a single event class for all these registers. They > > all have different struct sizes and different printf formats. > > > > Thanks for the reviews! > > > > Changes in v2: > > - Made trace_sd_scr print out flags. > > - Add BUILD_BUG_ON to make sure tracing stays in sync with structs. > > - memcpy using sizeof(__entry->raw) > > > > Raul E Rangel (4): > > mmc: core: Add trace event for SD SCR response > > mmc: core: Add trace event for SD SSR response > > mmc: core: Add trace event for SD OCR response > > mmc: core: Add trace event for CSD response > > > > drivers/mmc/core/mmc.c | 4 + > > drivers/mmc/core/sd.c | 10 ++ > > drivers/mmc/core/sd_ops.c | 6 ++ > > include/trace/events/mmc.h | 204 +++++++++++++++++++++++++++++++++++++ > > 4 files changed, 224 insertions(+) > > > > -- > > 2.21.0.392.gf8f6787159e-goog > > > > Why do you need this? We already have these card registers reflected > though sysfs files, isn't that sufficient? > I was not actually aware that the registers were exposed via sysfs. I was debugging a problem where the host controller was returning all zeros when reading from the card. I wasn't aware that it was returning all zeros until I added tracing. It made it quite easy to diagnose the problem by just diffing the two traces. Also if the card fails to mount because the data is invalid, the registers would not be exposed via sysfs. So tracing makes gives us an easy way to debug these types of failures. Thanks, Raul > Kind regards > Uffe