From patchwork Wed Aug 29 12:17:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Motai.Hirotaka@aj.MitsubishiElectric.co.jp" X-Patchwork-Id: 10580243 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E5A84174A for ; Wed, 29 Aug 2018 12:43:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D647129C49 for ; Wed, 29 Aug 2018 12:43:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CAF482AFBA; Wed, 29 Aug 2018 12:43:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6B64F29C49 for ; Wed, 29 Aug 2018 12:43:27 +0000 (UTC) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 350A8DB1; Wed, 29 Aug 2018 12:36:54 +0000 (UTC) X-Original-To: ltsi-dev@lists.linuxfoundation.org Delivered-To: ltsi-dev@mail.linuxfoundation.org Received: from smtp2.linuxfoundation.org (smtp2.linux-foundation.org [172.17.192.36]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 81D23CF7 for ; Wed, 29 Aug 2018 12:36:48 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mx04.melco.co.jp (mx04.melco.co.jp [192.218.140.144]) by smtp2.linuxfoundation.org (Postfix) with ESMTPS id 407131DDE7 for ; Wed, 29 Aug 2018 12:36:42 +0000 (UTC) Received: from mr04.melco.co.jp (mr04 [133.141.98.166]) by mx04.melco.co.jp (Postfix) with ESMTP id 7E54F3A32AA for ; Wed, 29 Aug 2018 21:18:07 +0900 (JST) Received: from mr04.melco.co.jp (unknown [127.0.0.1]) by mr04.imss (Postfix) with ESMTP id 420l5C3bTnzRk8j for ; Wed, 29 Aug 2018 21:18:07 +0900 (JST) Received: from mf04_second.melco.co.jp (unknown [192.168.20.184]) by mr04.melco.co.jp (Postfix) with ESMTP id 420l5C3HfCzRjwX for ; Wed, 29 Aug 2018 21:18:07 +0900 (JST) Received: from mf04.melco.co.jp (unknown [133.141.98.184]) by mf04_second.melco.co.jp (Postfix) with ESMTP id 420l5C3G9zzRkCw for ; Wed, 29 Aug 2018 21:18:07 +0900 (JST) Received: from JPN01-TY1-obe.outbound.protection.outlook.com (unknown [23.103.139.182]) by mf04.melco.co.jp (Postfix) with ESMTP id 420l5C32hgzRkCn for ; Wed, 29 Aug 2018 21:18:07 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mitsubishielectricgroup.onmicrosoft.com; s=selector1-mitsubishielectricgroup-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LKj2UiTB+LgzkNI90q4aqf3CXpUSPXLYbqUrpYmztcs=; b=nFbQjI6npCzGIAi3Ipu5DbyKMgYbWrX6xraLNYMVb7L3A3XevVhMmOYb/8VJo+UrlUPzP9rbcVqUC1Bb++86NSKxraBPmW/Gl2Xn6TFSt5fPF5QksSSwncs89UWdZ3WqoNHl0sFSessuFM/x96C8Ser+0te6HR24zqPS50zB850= Received: from TY1PR01MB1692.jpnprd01.prod.outlook.com (52.133.160.145) by TY1PR01MB0762.jpnprd01.prod.outlook.com (10.167.158.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.15; Wed, 29 Aug 2018 12:18:06 +0000 Received: from TY1PR01MB1692.jpnprd01.prod.outlook.com ([fe80::d04e:e6f6:c782:22fa]) by TY1PR01MB1692.jpnprd01.prod.outlook.com ([fe80::d04e:e6f6:c782:22fa%2]) with mapi id 15.20.1080.015; Wed, 29 Aug 2018 12:18:06 +0000 From: "Motai.Hirotaka@aj.MitsubishiElectric.co.jp" To: "ltsi-dev@lists.linuxfoundation.org" Thread-Topic: [LTSI-dev] [PATCH 39/54] tracing: Make tracing_set_clock() non-static Thread-Index: AdQ/jLzz7PS29fKgTSSe/THB62QXNg== Date: Wed, 29 Aug 2018 12:17:10 +0000 Deferred-Delivery: Wed, 29 Aug 2018 12:15:00 +0000 Message-ID: Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-melpop: 1 authentication-results: spf=none (sender IP is ) smtp.mailfrom=Motai.Hirotaka@aj.MitsubishiElectric.co.jp; x-originating-ip: [153.231.200.201] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; TY1PR01MB0762; 6:rV1JJONFTCqBlbWVzJnYs5rp5xs9xk1lB/zB3z9RuwGYuuGgOuNuF7LlISeuFuQJy28Sgei3vyG3ipR/iUUztFXHbOCQVe4rvmFkVWSjfxkujDmh3qOTgz3W3pdjeZjbHxyYWgDhnIh9Tq1YCAHCWlVHb4Aoa5knSeZqg3XRD/kPZn7BGmT0Zwd7B7Q/qMnKUHX7moiVVP48IOf3KnE3qK6QdWVhKZXLORERbyk/hl4gFnrPV1ZCECLKvqAHeIKTGbunrYtCgrBJ6US/2ar4UUEY6dvJmrIKQd/Kx1oLkGL18SxF0g626rnXl0n/nST6/PRVFN7NeIOu2jFN9ZUD0pKvTvEfj+9OslZ5idpVr7vbiQAA25p9WyWb0Ni7TSqNle5298vvz3Zl55MePsVWyAudqkInvvd8wWB1GTEI4Y3fOTIHBvHsE5Lg8YSG5xED77pLoTDq7yrerT0BK0n2LA==; 5:0xGqNlc+lT6krYz70ZzUVWrWafa2cKI/ibnKm+7/8Tu0SAgXB11WxirYJLvuNqfylM8hJhO/TBO8PAqHa/2A0BY10LaswD4zEYy0n6FUmjSZHrPFqJAIIlY4Qb/DRDCsbEpW3jj1E0X4UIwiHlAg+IaYiBTxNyxUdt42+OW5bac=; 7:/+2S7864mPWvIYWQKsW+aPo38Una6TJqFQwYhjGVsPJHtqH05hWcHYmtZ2CC4PwOKSdDtnUOujYo0dy2tRFL98/1qU3CTrQMQHvYrezBRRQb2u9YJz+8nh44ET5XHdpiDO1yxne/4L2t4jJWiJMtLtK9dVsNy6OAbXQCttv8pemd2GKUm0v2nlgHFMcY0LeaHL7dY508BLqsTBDIcFKewNCFrE70bKkmqMzP7A5UgBGZnWOEUTwMP/CEjgqDJv+Z x-ms-office365-filtering-correlation-id: 3d2882bd-60f8-4216-4890-08d60da97a19 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:TY1PR01MB0762; x-ms-traffictypediagnostic: TY1PR01MB0762: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(278428928389397)(42068640409301)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(20161123560045)(201708071742011)(7699016); SRVR:TY1PR01MB0762; BCL:0; PCL:0; RULEID:; SRVR:TY1PR01MB0762; x-forefront-prvs: 077929D941 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(396003)(346002)(376002)(136003)(366004)(199004)(189003)(7696005)(186003)(72206003)(6116002)(478600001)(3846002)(1857600001)(256004)(74482002)(5250100002)(5660300001)(14444005)(966005)(2501003)(99286004)(2900100001)(8936002)(53936002)(68736007)(33656002)(9686003)(2906002)(97736004)(6306002)(26005)(476003)(7736002)(305945005)(74316002)(6666003)(316002)(14454004)(486006)(55016002)(81166006)(5640700003)(66066001)(8676002)(86362001)(6436002)(2351001)(6506007)(106356001)(25786009)(6916009)(105586002)(102836004)(575784001)(81156014); DIR:OUT; SFP:1102; SCL:1; SRVR:TY1PR01MB0762; H:TY1PR01MB1692.jpnprd01.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:0; MX:1; received-spf: None (protection.outlook.com: aj.MitsubishiElectric.co.jp does not designate permitted sender hosts) x-microsoft-antispam-message-info: WzjWBPZoGE/zhBrciRElwaO600gqJriuXHHyHDOAGfejtTgzKbkYpJt5k0T6wXYBDZVv8cGpFN6vljVCsWULQkpGqZVhoKoBSdoe63dNKydiOuNvSdSenQKZLbMVxbZuNFhkKfFlRA2OFDkiraB4Vl11GqZYtLiQzLHMs6UDw4HMGYlfO9UQJyboVU+Qo8BdR8r1xuzJgxYJuuh7yW67lfHQyxbxCETltwVkNz9zqx/ZMo4yl+g45C3ApQ/2nuXNs2fDDq7xElvjJM8855WwyP1/OxRPRQSjT/36D/3Z/tzlT/fqWwkOgjtT1axtG06uR0lQW7PNOW4UKbvjrSo4ry34/we7wkldhkP/BPtgZnA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: aj.MitsubishiElectric.co.jp X-MS-Exchange-CrossTenant-Network-Message-Id: 3d2882bd-60f8-4216-4890-08d60da97a19 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Aug 2018 12:17:22.6447 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: c5a75b62-4bff-4c96-a720-6621ce9978e5 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY1PR01MB0762 Subject: [LTSI-dev] [PATCH 39/54] tracing: Make tracing_set_clock() non-static X-BeenThere: ltsi-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "A list to discuss patches, development, and other things related to the LTSI project" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ltsi-dev-bounces@lists.linuxfoundation.org Errors-To: ltsi-dev-bounces@lists.linuxfoundation.org X-Virus-Scanned: ClamAV using ClamSMTP Allow tracing code outside of trace.c to access tracing_set_clock(). Some applications may require a particular clock in order to function properly, such as latency calculations. Also, add an accessor returning the current clock string. Link: http://lkml.kernel.org/r/6d1c53e9ee2163f54e1849f5376573f54f0e6009.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) (cherry picked from commit d71bd34d78bb78b9e6f8a0be3952d5fa470a260a) Signed-off-by: Hirotaka MOTAI --- kernel/trace/trace.c | 2 +- kernel/trace/trace.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index e6394615..25244e4e 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -6217,17 +6217,17 @@ static int tracing_clock_show(struct seq_file *m, void *v) "%s%s%s%s", i ? " " : "", i == tr->clock_id ? "[" : "", trace_clocks[i].name, i == tr->clock_id ? "]" : ""); seq_putc(m, '\n'); return 0; } -static int tracing_set_clock(struct trace_array *tr, const char *clockstr) +int tracing_set_clock(struct trace_array *tr, const char *clockstr) { int i; for (i = 0; i < ARRAY_SIZE(trace_clocks); i++) { if (strcmp(trace_clocks[i].name, clockstr) == 0) break; } if (i == ARRAY_SIZE(trace_clocks)) diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 5975d5f5..0b8af849 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h @@ -284,16 +284,17 @@ enum { extern struct list_head ftrace_trace_arrays; extern struct mutex trace_types_lock; extern int trace_array_get(struct trace_array *tr); extern void trace_array_put(struct trace_array *tr); extern int tracing_set_time_stamp_abs(struct trace_array *tr, bool abs); +extern int tracing_set_clock(struct trace_array *tr, const char *clockstr); extern bool trace_clock_in_ns(struct trace_array *tr); /* * The global tracer (top) should be the first trace array added, * but we check the flag anyway. */ static inline struct trace_array *top_trace_array(void)