Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp177136imj; Thu, 14 Feb 2019 18:02:00 -0800 (PST) X-Google-Smtp-Source: AHgI3IbM7FNjLqNX0t9FbteJK4v8lNdsJ2WgKNvtI7A5Uxc7YeN1SwXys3T3781RkGYHKFUkzuE+ X-Received: by 2002:a63:d50f:: with SMTP id c15mr6827659pgg.287.1550196120772; Thu, 14 Feb 2019 18:02:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550196120; cv=none; d=google.com; s=arc-20160816; b=BRuRsOKPelv8wAcEqx4PEMIbr9Im+7So3l25psfFBx8zbRKLZUIHqC9+h7zr52OHqe +Zb3Q98YYveaHqqrDW6zdXv1RvGnbY/CFO9gD7uEHEjC3YN3RHCVrde3JpS6ZoUDL0I3 At7MnFmLfaSqUWQnN/nOLMDfq3MfI1IySKY5rubeyzEnFA04sK9520U8qTGsQRG8SsxZ ZkWhkGWL2q0m1IrYXgF5uT92zLbwmsdjued/lsTsLcCNlBfnvTusI8Z6ecfnVyy7qgr8 EWlaRtqMe0mDycpJSOY4SeWMUPXRp8gOIupdePg/1d/cWPJnxJj/IxcUkpl6qKjegjFd 4QHw== 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:subject:cc:to:from:date; bh=Vq6+QAGJoS3moxgbp/oxPRzbLWi2ofJtlSbqUnUG7Cw=; b=zleo19sObtQH95svcCIqoKozZRBjqBpE2MnWBv+nDxTUF42Hdm5r/f7thFW5iKzqDA x3lBDGNtfwwMIRb3lcs4GT6CweIQjS2ZKeUYpuzecayahEqNCXT+/yE3XP9keFnHnIj9 mXQO0/pfNOP0+9xy0FAx5McoAycU7nQ4EFGBRkejOG1XVzAhAYE/QrGASVxF+Uxb4Kix bRjOm7D9bfQIJKf1oRaO8Nx1bn24gBI6Cd6H9cUKUin3WrkDiUNPc9Qx1Lv0tvaAwvp4 kLCJ04KlaoBLr9z3blrZk5lG+aErzkGUDVpo86xfft4K4A3fi1JWNXxcHtLKmt8mi0YG hMFA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q17si3754229pgv.426.2019.02.14.18.01.44; Thu, 14 Feb 2019 18:02:00 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405640AbfBNTH2 (ORCPT + 99 others); Thu, 14 Feb 2019 14:07:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:46634 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393773AbfBNTH2 (ORCPT ); Thu, 14 Feb 2019 14:07:28 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AEFE921B24; Thu, 14 Feb 2019 19:07:26 +0000 (UTC) Date: Thu, 14 Feb 2019 14:07:25 -0500 From: Steven Rostedt To: Lukasz Luba Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, b.zolnierkie@samsung.com, myungjoo.ham@samsung.com, cw00.choi@samsung.com, kyungmin.park@samsung.com, m.szyprowski@samsung.com, s.nawrocki@samsung.com, mka@chromium.org, mingo@redhat.com Subject: Re: [PATCH 2/2] drivers: devfreq: add tracing for scheduling work Message-ID: <20190214140725.307d493c@gandalf.local.home> In-Reply-To: <1550170676-14173-3-git-send-email-l.luba@partner.samsung.com> References: <1550170676-14173-1-git-send-email-l.luba@partner.samsung.com> <1550170676-14173-3-git-send-email-l.luba@partner.samsung.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 14 Feb 2019 19:57:56 +0100 Lukasz Luba wrote: > This patch add basic tracing of the devfreq workqueue and delayed work. > It aims to capture changes of the polling intervals and device state. > > Reviewed-by: Chanwoo Choi > Signed-off-by: Lukasz Luba > --- > drivers/devfreq/devfreq.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c > index 0ae3de7..c9714fd 100644 > --- a/drivers/devfreq/devfreq.c > +++ b/drivers/devfreq/devfreq.c > @@ -29,6 +29,9 @@ > #include > #include "governor.h" > > +#define CREATE_TRACE_POINTS > +#include > + > static struct class *devfreq_class; > > /* > @@ -394,6 +397,11 @@ static void devfreq_monitor(struct work_struct *work) > queue_delayed_work(devfreq_wq, &devfreq->work, > msecs_to_jiffies(devfreq->profile->polling_ms)); > mutex_unlock(&devfreq->lock); > + > + trace_devfreq_monitor(dev_name(&devfreq->dev), devfreq->previous_freq, > + devfreq->profile->polling_ms, > + devfreq->last_status.busy_time, > + devfreq->last_status.total_time); I would pass just devfreq into the tracepoint (it will be less work by gcc in this code path), and do all this work in the TP__fast_assign() The string can still handle this with: __string(dev_name, dev_name(&devfreq->dev)) And assigned: __assign_str(dev_name, dev_name(&devfreq->dev)) But the rest of fast assign should be: TP_fast_assign( __entry->freq = devfreq->previous_freq; __entry->busy_time = devfreq->last_status.busy_time; __entry->total_time = devfreq->last_status.total_time; __entry->polling_ms = devfreq->profile->polling_ms; __assign_str(dev_name, dev_name(&deqfreq->dev)); } -- Steve > } > > /**