From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753285AbbCJOoT (ORCPT ); Tue, 10 Mar 2015 10:44:19 -0400 Received: from smtprelay0076.hostedemail.com ([216.40.44.76]:45189 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752067AbbCJOoE (ORCPT ); Tue, 10 Mar 2015 10:44:04 -0400 X-Session-Marker: 6E657665747340676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:966:973:988:989:1042:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2196:2199:2393:2538:2539:2553:2559:2562:2693:3138:3139:3140:3141:3142:3355:3622:3855:3865:3866:3867:3868:3870:3871:3872:3873:3874:4321:4385:5007:6261:6742:6755:7809:7875:7903:10004:10400:10848:10967:11026:11232:11473:11658:11914:12043:12219:12296:12438:12517:12519:12740:13161:13229:14096:14097:14345:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: sugar85_5cffab07aca15 X-Filterd-Recvd-Size: 4278 Date: Tue, 10 Mar 2015 10:43:57 -0400 From: Steven Rostedt To: Gilad Broner Cc: James.Bottomley@HansenPartnership.com, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, linux-arm-msm@vger.kernel.org, santoshsy@gmail.com, linux-scsi-owner@vger.kernel.org, subhashj@codeaurora.org, ygardi@codeaurora.org, draviv@codeaurora.org, Lee Susman , Sujit Reddy Thumma , Vinayak Holikatti , "James E.J. Bottomley" , Ingo Molnar Subject: Re: [PATCH v5 3/3] scsi: ufs: add trace events and dump prints for debug Message-ID: <20150310104357.0165cab6@gandalf.local.home> In-Reply-To: <1425988035-966-4-git-send-email-gbroner@codeaurora.org> References: <1425988035-966-1-git-send-email-gbroner@codeaurora.org> <1425988035-966-4-git-send-email-gbroner@codeaurora.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 10 Mar 2015 13:47:15 +0200 Gilad Broner wrote: > +++ b/include/trace/events/ufs.h > @@ -0,0 +1,227 @@ > +/* > + * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 and > + * only version 2 as published by the Free Software Foundation. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + */ > + > +#undef TRACE_SYSTEM > +#define TRACE_SYSTEM ufs > + > +#if !defined(_TRACE_UFS_H) || defined(TRACE_HEADER_MULTI_READ) > +#define _TRACE_UFS_H > + > +#include > + > +TRACE_EVENT(ufshcd_clk_gating, > + > + TP_PROTO(const char *dev_name, const char *state), > + > + TP_ARGS(dev_name, state), > + > + TP_STRUCT__entry( > + __string(dev_name, dev_name) > + __string(state, state) > + ), > + > + TP_fast_assign( > + __assign_str(dev_name, dev_name); > + __assign_str(state, state); > + ), > + > + TP_printk("%s: gating state changed to %s", > + __get_str(dev_name), __get_str(state)) > +); This and the auto_bkops_state is pretty much the same. Can't you use the same TP_printk() and just have a DECLARE_EVENT_CLASS? The trace point name is printed with the event to see different events. At least use DEFINE_EVENT_PRINT() that lets you override a EVENT_CLASS TP_printk(). This saves memory. -- Steve > + > +TRACE_EVENT(ufshcd_clk_scaling, > + > + TP_PROTO(const char *dev_name, const char *state, const char *clk, > + u32 prev_state, u32 curr_state), > + > + TP_ARGS(dev_name, state, clk, prev_state, curr_state), > + > + TP_STRUCT__entry( > + __string(dev_name, dev_name) > + __string(state, state) > + __string(clk, clk) > + __field(u32, prev_state) > + __field(u32, curr_state) > + ), > + > + TP_fast_assign( > + __assign_str(dev_name, dev_name); > + __assign_str(state, state); > + __assign_str(clk, clk); > + __entry->prev_state = prev_state; > + __entry->curr_state = curr_state; > + ), > + > + TP_printk("%s: %s %s from %u to %u Hz", > + __get_str(dev_name), __get_str(state), __get_str(clk), > + __entry->prev_state, __entry->curr_state) > +); > + > +TRACE_EVENT(ufshcd_auto_bkops_state, > + > + TP_PROTO(const char *dev_name, const char *state), > + > + TP_ARGS(dev_name, state), > + > + TP_STRUCT__entry( > + __string(dev_name, dev_name) > + __string(state, state) > + ), > + > + TP_fast_assign( > + __assign_str(dev_name, dev_name); > + __assign_str(state, state); > + ), > + > + TP_printk("%s: auto bkops - %s", > + __get_str(dev_name), __get_str(state)) > +); > +