Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4354737imj; Tue, 12 Feb 2019 14:31:06 -0800 (PST) X-Google-Smtp-Source: AHgI3IZOIUF+u3Sa+BLOOO2cEBZO5oux1FIcR6TJi2COZHDxd2cHv4Wae/ozwt5KQb2NREzWvkUy X-Received: by 2002:a63:f74c:: with SMTP id f12mr5780381pgk.195.1550010666014; Tue, 12 Feb 2019 14:31:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550010666; cv=none; d=google.com; s=arc-20160816; b=jY8Ds93dgraK3U+w3sA7IQ5e7WXpI6kMyigmvvqouWLIBC/AQA92HE065FzHSBj7Tu NrC+F17hlXm0HOgWrEzPKyUwpNc9ngbMCjz5/6gXUlIICwDJ08Uli/STSdzlKocL3Rdy Zlf7+ZRTe29BdmAgBhz62n+S/0l/CBiGeRProccZkV19znmqDhLoKtRjGAKwb2S1nxUZ tChbG1tFVaB6pj1ZyaVcWmkn01oFv2Aw6dDcDzWK0fR9BZwvm8Eec8YWBVMX8Svj/oe6 XSQ5V0426ku3XVqnR7BsVVeZ4ZX1jG93KmxJ3P2jwLM+mcMbejGi8FNOZd3avRhxRVPy MAbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=SYN7egH52Y2feMOkqm4NJLPSYateJfp0Xa3NLviJfqY=; b=VwlVD1NBpQ8MRs5TgXW4TkIWfYJ7Zq3DyuvJO3Ny87D3umIi2Rkv9H7op8cDNyytTq Oyk3jgwU1yU7ZlvuY+DDflAiFpI0CHxavd8BAwYbT9GX3JquGCBJEhKhcCisWHinR/OH 0oFHoTb7wzGkC5lZPGPeVpI4OnSHSCsrOU/Bzsmq2NleDWGeRqE2aWD7s9h/uzcHR+EX hftRI5qiSXMl5NM/9c6EGsLbMHhGkYdYhg+x0J5uYd0W/lqq2pLCv0ym28kDrPdLFsEt rHI5IreZqvi72O28k35Dz01DIicAXLGRFR8yIfigitMabbbn6BNled2ub7Txh84WoKA7 mqxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="ceC/mab+"; 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 y40si14933372pla.251.2019.02.12.14.30.49; Tue, 12 Feb 2019 14:31:06 -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="ceC/mab+"; 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 S1732779AbfBLWYq (ORCPT + 99 others); Tue, 12 Feb 2019 17:24:46 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:43184 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732643AbfBLWYn (ORCPT ); Tue, 12 Feb 2019 17:24:43 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190212222441euoutp02e8677baf1a82a33bc1b01e6d49266159~CviNyqnIf2689326893euoutp02j for ; Tue, 12 Feb 2019 22:24:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190212222441euoutp02e8677baf1a82a33bc1b01e6d49266159~CviNyqnIf2689326893euoutp02j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550010281; bh=SYN7egH52Y2feMOkqm4NJLPSYateJfp0Xa3NLviJfqY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ceC/mab+j5aE8/49/Lr1devRw5/RDB6EvYSD7KYzxqZ0YD2aPb6LhBLkVA3zrIdl4 NcdBwOlpL8i6tlqd/c7l5MKbknLeTz0rJO3cshIvy+HNge63zkvOCjentD07X0INVX JTRrWFLqPUcHiwPLcju+AMYgVwK1yoV3Kfx9ARZg= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190212222439eucas1p17fa7beda7a1195f4f96fb9215cb7159e~CviMVzYzp3241332413eucas1p1Z; Tue, 12 Feb 2019 22:24:39 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id C1.45.04294.7A7436C5; Tue, 12 Feb 2019 22:24:39 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20190212222438eucas1p27e020c2b36f2e5a2188e4df6fb18488b~CviLUxpJ22094320943eucas1p2S; Tue, 12 Feb 2019 22:24:38 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190212222438eusmtrp2c400061bde808e2ae5621a5a911600e1~CviLGAOD32980329803eusmtrp2Q; Tue, 12 Feb 2019 22:24:38 +0000 (GMT) X-AuditID: cbfec7f4-84fff700000010c6-05-5c6347a7be9b Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 20.3C.04284.6A7436C5; Tue, 12 Feb 2019 22:24:38 +0000 (GMT) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190212222437eusmtip1978d34682a89c707ecead0da0b7c14b1~CviKV2dqg2067220672eusmtip1E; Tue, 12 Feb 2019 22:24:37 +0000 (GMT) From: Lukasz Luba To: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Cc: b.zolnierkie@samsung.com, myungjoo.ham@samsung.com, cw00.choi@samsung.com, kyungmin.park@samsung.com, m.szyprowski@samsung.com, s.nawrocki@samsung.com, tkjos@google.com, joel@joelfernandes.org, chris.diamand@arm.com, mka@chromium.org, rostedt@goodmis.org, mingo@redhat.com, Lukasz Luba Subject: [PATCH v3 7/7] drivers: devfreq: add tracing for scheduling work Date: Tue, 12 Feb 2019 23:23:58 +0100 Message-Id: <1550010238-24002-8-git-send-email-l.luba@partner.samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1550010238-24002-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrIKsWRmVeSWpSXmKPExsWy7djPc7rL3ZNjDM4vEbPYOGM9q8W0T5dZ LK5/ec5qsaxB1eJs0xt2i1sNMhaXd81hs/jce4TRYu2Ru+wWlw4sYLL4vOExo8XtxhVsFvs6 HjBZHH7TzmrxfnKxA7/HmnlrGD1mN1xk8WjZd4vdY8GmUo+Fn76yehx8t4fJ4/2+q2wefVtW MXp83iQXwBnFZZOSmpNZllqkb5fAlfFz0UnmgpncFdfWfWVpYFzK2cXIySEhYCKx6lwXUxcj F4eQwApGiceXbzNCOF8YJWZca4LKfGaU+NrSxAjTcv36N1aIxHJGiV3rvoIlwFr2TKjtYuTg YBPQk9ixqhAkLCJgJfGi/RU7SD2zwDEmiU97pzCDJIQFPCVO/VwCZrMIqErMe3UDzOYV8JLo 2dTEDLFMTuLmuU4wm1PAW+LMtJWsEPFD7BK93bUQtovEx1tLoeqFJV4d38IOYctI/N85nwnC LpY427GKDcKukWg/uQOqxlri8PGLrCA3MwtoSqzfpQ8RdpS4/fEBO0hYQoBP4s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xxeV5qQWH2I0BbppIrOUaHI+MHrzSuINTQ3N LSwNzY3Njc0slMR5zxtURgkJpCeWpGanphakFsH0MXFwSjUwWr1s78jcX1bcvlf4fO7z9rh5 c9O2LJ4auLe7QTWZSVoo7c6J5/umX3DakRd5TlWm/e2c9v9B86RkJPNbI/WrWixmaBfITExv Ds4SKdrCa3DrwqHqW9LLupVFXpY0TvSaYRq9/JtKe7ZcyOKKvoPSmTsu1SQbvt7W9+Dr9bSj 0Xcrd7T2/PBTYinOSDTUYi4qTgQAmWmr/KYCAAA= X-CMS-MailID: 20190212222438eucas1p27e020c2b36f2e5a2188e4df6fb18488b X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190212222438eucas1p27e020c2b36f2e5a2188e4df6fb18488b X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190212222438eucas1p27e020c2b36f2e5a2188e4df6fb18488b References: <1550010238-24002-1-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 This patch add basic tracing of the devfreq workqueue and delayed work. It aims to capture changes of the polling intervals and device state. 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 29e99ce..c1d0d8c 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -29,6 +29,9 @@ #include #include "governor.h" +#define CREATE_TRACE_POINTS +#include + /* The ~30% load threshold used for load calculation (due to fixed point * arithmetic) */ #define LOAD_THRESHOLD_IN_DEVICE_USAGE (300) @@ -418,6 +421,7 @@ static void devfreq_monitor(struct work_struct *work) struct devfreq *devfreq = container_of(work, struct devfreq, work.work); unsigned int polling_ms; + const char *df_name = dev_name(&devfreq->dev); mutex_lock(&devfreq->lock); polling_ms = devfreq_get_polling_delay(devfreq); @@ -429,6 +433,10 @@ static void devfreq_monitor(struct work_struct *work) schedule_delayed_work(&devfreq->work, msecs_to_jiffies(polling_ms)); mutex_unlock(&devfreq->lock); + + trace_devfreq_monitor(df_name, devfreq->previous_freq, polling_ms, + devfreq->last_status.busy_time, + devfreq->last_status.total_time); } /** -- 2.7.4