Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2050264imj; Sun, 17 Feb 2019 22:07:32 -0800 (PST) X-Google-Smtp-Source: AHgI3IYXSyK/x2x04OHbWBWj7qws/y6dURf5IQ1F4nUS2BZQgUYhD9s4J/OGb1BlzFF12+TXq29Q X-Received: by 2002:a63:516:: with SMTP id 22mr16804576pgf.353.1550470052610; Sun, 17 Feb 2019 22:07:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550470052; cv=none; d=google.com; s=arc-20160816; b=g9lpB1XVMIUvN2O8PpY/e+HoRFRR9OEaXnwgZQOjO5+zCVhed/ggALWzkaKtsfqpso NnvrQIDdnVjLLwBm82QTqZFDveQvRFhbad+YE5cuUANxlig6XEanqZSfaABsVOF5Nqbe PQw+5WMVeID+pNC57ZEDmmOJGz0MfOM8GwQmAGqyBDTGOCHtA1A1/KYxEeneCOYvg3rf QNg/S0OpTFrzyP/18Qwx3bSkSk9ewUHE3iJptU1AfEmAJ2n59TmyY7t6AS8fhynM5sP0 Is3fgNIYo2icBo+iNgUE/I5fs38MLyMa74XJVDB7+yW2/ujqoPrNjZU8p8/lLQwxp3VW nGlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:organization:from:cc:to:subject :dkim-signature:dkim-filter; bh=nnmNNttPtuN6se7xv1VYYxQmNoYsrYbagrHYgLCaDP8=; b=tK52acbQ8hFH+kvaaIFAIIr4BvqyJJOv6n4b9UgrC5DU/eQSFbVrE7W/G7+jRECt03 Pkvy4Qi1RIaIeJ0eTGkHXUnA+C9InE0hPXQfKoSAFOkzZGqrLi3GS5TGuTK2K6ty5/fs 8kXq//ozImdXNwNDNnvxtfUl9imgVMdHndoEYawavugn9bOqKkHYnJ8x2YLkpJq/DCXZ e8K6jzXieYsAhZylhx2fplHwOXguenrVSceT80FrvQMeHZCGUpWEGBVmyt8bRaAgH6gr EP3icFnXuku60GsauXKiQsEWJfgDkrVnvTv105SrVYZyfTW4VlEhT7kLhIUeB4TZiVqk e7lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=kye1UkiM; 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=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l26si12136982pff.160.2019.02.17.22.07.17; Sun, 17 Feb 2019 22:07:32 -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; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=kye1UkiM; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726426AbfBRFlH (ORCPT + 99 others); Mon, 18 Feb 2019 00:41:07 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:59393 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725776AbfBRFlH (ORCPT ); Mon, 18 Feb 2019 00:41:07 -0500 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20190218054103epoutp03f123b782d2c1b0ee5115eebb4b086632~EXtpHOoQo2176621766epoutp03O for ; Mon, 18 Feb 2019 05:41:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20190218054103epoutp03f123b782d2c1b0ee5115eebb4b086632~EXtpHOoQo2176621766epoutp03O DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550468463; bh=nnmNNttPtuN6se7xv1VYYxQmNoYsrYbagrHYgLCaDP8=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=kye1UkiMQjKCuSasLabGj68mGI6F3jpYBaarmQik90i+C4XvlR9x8kcdvmexMR+6y UH07W7QbgQaJ1NiLMOPswQmTKuvL3n5ntjt3zSWr7u6ifSv0Wr/tXPBGZnjsyTBrOn o7zbRTqwFZWokALOEghSCgcKhG0tT+gAKe1g0in8= Received: from epsmges1p4.samsung.com (unknown [182.195.40.154]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20190218054100epcas1p25e53070440ea98d558c2c9ffb2bd5f1a~EXtmDy4cf2979529795epcas1p2m; Mon, 18 Feb 2019 05:41:00 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p4.samsung.com (Symantec Messaging Gateway) with SMTP id A0.E6.04288.B654A6C5; Mon, 18 Feb 2019 14:40:59 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190218054059epcas1p18d05c5bf923bc990aab78586080f1a61~EXtlQfqAA0085200852epcas1p15; Mon, 18 Feb 2019 05:40:59 +0000 (GMT) Received: from epsmgms1p2new.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190218054059epsmtrp24fe16f5ec6dd1f2d4202251d9f175259~EXtlPQFWB2618626186epsmtrp26; Mon, 18 Feb 2019 05:40:59 +0000 (GMT) X-AuditID: b6c32a38-bf7ff700000010c0-d4-5c6a456b6879 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 76.B4.03601.B654A6C5; Mon, 18 Feb 2019 14:40:59 +0900 (KST) Received: from [10.113.221.102] (unknown [10.113.221.102]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190218054058epsmtip29c3304a26b14906df774bb1f3a2bac3e~EXtlBcaIq3262932629epsmtip2t; Mon, 18 Feb 2019 05:40:58 +0000 (GMT) Subject: Re: [PATCH v2 1/2] trace: events: add devfreq trace event file To: Lukasz Luba , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Cc: b.zolnierkie@samsung.com, myungjoo.ham@samsung.com, kyungmin.park@samsung.com, m.szyprowski@samsung.com, s.nawrocki@samsung.com, mka@chromium.org, rostedt@goodmis.org, mingo@redhat.com From: Chanwoo Choi Organization: Samsung Electronics Message-ID: Date: Mon, 18 Feb 2019 14:40:58 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <1550235913-5189-2-git-send-email-l.luba@partner.samsung.com> Content-Language: en-US Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLJsWRmVeSWpSXmKPExsWy7bCmnm62a1aMwcmVFhYbZ6xntTjb9Ibd 4laDjMXlXXPYLD73HmG0WHvkLrvFpQMLmCw+b3jMaHG7cQWbxb6OB0wWh9+0szpwe8xuuMji 0bLvFrvHwXd7mDze77vK5tG3ZRWjx+dNcgFsUdk2GamJKalFCql5yfkpmXnptkrewfHO8aZm Boa6hpYW5koKeYm5qbZKLj4Bum6ZOUDnKSmUJeaUAoUCEouLlfTtbIryS0tSFTLyi0tslVIL UnIKLAv0ihNzi0vz0vWS83OtDA0MjEyBChOyM/7NW8RW0CVW0XfgH0sD4wShLkYODgkBE4ld U2O7GLk4hAR2MEo8mHuUFcL5xCixb85XJgjnG6PE5KcPgBxOsI45Jz+wQST2MkrsbLgM5bxn lDi7ppURpEpYwF3iyZJJrCC2iECaxNv2u2CjmAUOMEo8WrmCHSTBJqAlsf/FDTYQm19AUeLq j8dgzbwCdhJXvs8HW8cioCoxdddnFhBb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rEn3mXmCFscYlbTyDmMAvISzRvnc08gVF4FpL2WUhaZiFpmYWkZQEjyypGydSC4tz0 3GLDAqO81HK94sTc4tK8dL3k/NxNjODo09LawXjiRPwhRgEORiUe3g9lmTFCrIllxZW5hxgl OJiVRHh3OWbFCPGmJFZWpRblxxeV5qQWH2KU5mBREueVzz8WKSSQnliSmp2aWpBaBJNl4uCU amCMeXRoWszH/5acswN5PjnG7We776bn29NoX+YUdWTrUx3FlZPb8g+t829/VlD5VP5aeid3 ms5qs+kffk6I3cDIodC5YUGP3dsrb60D3Hd/Xy85u7aB60tH3Bv9T8JBX/k3V2pa+WRPmJie 9p2J+dhhiemKfWz/eNs+li5wsjwVZNv6UHLCIU8lluKMREMt5qLiRAClANh0ugIAAA== X-CMS-MailID: 20190218054059epcas1p18d05c5bf923bc990aab78586080f1a61 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20190215130555eucas1p219217e3f1d0901f61be78870df0ecf6d References: <1550235913-5189-1-git-send-email-l.luba@partner.samsung.com> <1550235913-5189-2-git-send-email-l.luba@partner.samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Lukasz, On 19. 2. 15. 오후 10:05, Lukasz Luba wrote: > The patch adds a new file for with trace events for devfreq > framework. They are used for performance analysis of the framework. > It also contains updates in MAINTAINERS file adding new entry for > devfreq maintainers. > > Signed-off-by: Lukasz Luba > --- > MAINTAINERS | 1 + > include/trace/events/devfreq.h | 40 ++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 41 insertions(+) > create mode 100644 include/trace/events/devfreq.h > > diff --git a/MAINTAINERS b/MAINTAINERS > index 41ce5f4..9c44076 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -4447,6 +4447,7 @@ S: Maintained > F: drivers/devfreq/ > F: include/linux/devfreq.h > F: Documentation/devicetree/bindings/devfreq/ > +F: include/trace/events/devfreq.h > > DEVICE FREQUENCY EVENT (DEVFREQ-EVENT) > M: Chanwoo Choi > diff --git a/include/trace/events/devfreq.h b/include/trace/events/devfreq.h > new file mode 100644 > index 0000000..ce83dba > --- /dev/null > +++ b/include/trace/events/devfreq.h > @@ -0,0 +1,40 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#undef TRACE_SYSTEM > +#define TRACE_SYSTEM devfreq > + > +#if !defined(_TRACE_DEVFREQ_H) || defined(TRACE_HEADER_MULTI_READ) > +#define _TRACE_DEVFREQ_H > + > +#include > +#include > + > +TRACE_EVENT(devfreq_monitor, > + TP_PROTO(struct devfreq *devfreq), > + > + TP_ARGS(devfreq), > + > + TP_STRUCT__entry( > + __field(unsigned long, freq) > + __field(unsigned long, busy_time) > + __field(unsigned long, total_time) > + __field(unsigned int, polling_ms) > + __string(dev_name, dev_name(&devfreq->dev)) > + ), > + > + 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(&devfreq->dev)); > + ), > + > + TP_printk("dev_name=%s freq=%lu polling_ms=%u load=%lu", > + __get_str(dev_name), __entry->freq, __entry->polling_ms, > + __entry->total_time == 0 ? 100 : I case of __entry->total_time is zero, why do you show '100' instead of '0'(zero)? I think that it might make the some confusion for user. If it show the '100' in case of "__entry->total_time is zero", it cannot distinguish between the real 100% utilization and "total_time is zero". > + (100 * __entry->busy_time) / __entry->total_time) > +); > +#endif /* _TRACE_DEVFREQ_H */ > + > +/* This part must be outside protection */ > +#include > -- Best Regards, Chanwoo Choi Samsung Electronics