From patchwork Wed Aug 29 12:17:12 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: 10580189 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 4B811175A for ; Wed, 29 Aug 2018 12:40:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A57D2AFF8 for ; Wed, 29 Aug 2018 12:40:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E80A2B002; Wed, 29 Aug 2018 12:40:15 +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 B6AF92AFF8 for ; Wed, 29 Aug 2018 12:40:14 +0000 (UTC) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 7BD1BD3B; Wed, 29 Aug 2018 12:36:44 +0000 (UTC) X-Original-To: ltsi-dev@lists.linuxfoundation.org Delivered-To: ltsi-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 7E5C4D19 for ; Wed, 29 Aug 2018 12:36:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mx06.melco.co.jp (mx06.melco.co.jp [192.218.140.146]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id D836977E for ; Wed, 29 Aug 2018 12:36:37 +0000 (UTC) Received: from mr06.melco.co.jp (mr06 [133.141.98.164]) by mx06.melco.co.jp (Postfix) with ESMTP id 302173A327F for ; Wed, 29 Aug 2018 21:18:10 +0900 (JST) Received: from mr06.melco.co.jp (unknown [127.0.0.1]) by mr06.imss (Postfix) with ESMTP id 420l5G0y1KzRkBT for ; Wed, 29 Aug 2018 21:18:10 +0900 (JST) Received: from mf03_second.melco.co.jp (unknown [192.168.20.183]) by mr06.melco.co.jp (Postfix) with ESMTP id 420l5G0fFJzRk5W for ; Wed, 29 Aug 2018 21:18:10 +0900 (JST) Received: from mf03.melco.co.jp (unknown [133.141.98.183]) by mf03_second.melco.co.jp (Postfix) with ESMTP id 420l5G0WyszRk8v for ; Wed, 29 Aug 2018 21:18:10 +0900 (JST) Received: from JPN01-OS2-obe.outbound.protection.outlook.com (unknown [23.103.139.149]) by mf03.melco.co.jp (Postfix) with ESMTP id 420l5G07hmzRk38 for ; Wed, 29 Aug 2018 21:18:10 +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=5DFbsfQ8LPRe/PlF8uUQDNPLCtoqJ8gwNsu1NTY44zc=; b=mrTCnGL1nPiA/RlOtlvvtcKlvNmDIrkXGlGhT5qbqRC3rrUuYeXvUhV1Abq+coiHc21v2W1T6F8Tr/W3C5Mv29ElEzmdKV/bnNyd+vEpQp4I9oyTkJDgXm7r3m2p0aTMoXzEPjKioXrolrYRaSjWMlAZJuiGFrPSgB5a8Bv3oXo= Received: from TY1PR01MB1692.jpnprd01.prod.outlook.com (52.133.160.145) by TY1PR01MB1456.jpnprd01.prod.outlook.com (10.174.228.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.17; Wed, 29 Aug 2018 12:18:09 +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:09 +0000 From: "Motai.Hirotaka@aj.MitsubishiElectric.co.jp" To: "ltsi-dev@lists.linuxfoundation.org" Thread-Topic: [LTSI-dev] [PATCH 49/54] tracing: Restore proper field flag printing when displaying triggers Thread-Index: AdQ/jSBa8jpXpuZ5QFmXXcg0bpaODw== Date: Wed, 29 Aug 2018 12:17:12 +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; TY1PR01MB1456; 6:2JiN6/7o3X1vidqjPs81PZk9QpwDM3Ff75CH8r205eh0PKahCCl7aKYKeNnlJ9KeYNFGVMKO7o+PsmRldaIXY6LgaMZDgxBnxvwSoHBrHtzW67JBQRjypyYa+/YqO/cTEeuecT2QNbd4FaQC5qEGvenQaQ6oc4Q4jZnmNz67woodEWVe86LeSCZhSmXbgRiZ6HPKMV7SgIJiHHC/2dJZRIqvfDSBHpZ+2/pO4QaWFigZsfhfCMXem72JWn9/ihzYIczd+lIF9BUYo+eu9nUKDJ9ncmAMSLbdCCFVQSjXWHP3A69mT1efz28KIqMr4ZEDD6/k5F9xs6fMrNKASe81e2pbx1BR+rZbQlfF55UWHwSiLMPgDP4D6QEeoHW1u0zEj3BH+nWkv8433ailLcI3fKn20tI7xNW9D/PfHzmdIXfVpTHM2wLJQcFNogyOM9gl9vim+46ji2M3DIfSTGGDLA==; 5:pP3onHf5QwDZzZEZxk4TpLxaZKf17HyngrnjOCOa5UvyErg+LUNsm/piWUo1yzilRdWo9aDdE44TYvyTcWCEaVQoU4i2wTaLNuFdyfyUUEl4mYcQTr/C26g9xNOR8tREc9DQQMtPZVk+PQBlbh0w7vzaZhCn+f5FWYJiThqFIuw=; 7:FhRjR0qtWIe+EQm7u4XK7WhrHUX/8IrM+UoFGAUd/YBmzsfgk4AHCxkzax2xTYXNTGmtHqksGqTDGpWNc24CnR591Wt/4vyQfk1njaMsn0pteP2xoJRDeATxGDArkDIN1pkCrUifIjHuKck4a1VrfdceeYMDG+28Nl6yVvCscVxzI+sfdG8Iys3YLzGhFlY2SDOvWUuPEujn2bZ9snoRW4TqmQhk0dTEf+pFMhkc2vsagp0OMBkobgh7HcGTH1rc x-ms-office365-filtering-correlation-id: d9dba945-bb51-458d-eb61-08d60da97b92 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(5600074)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:TY1PR01MB1456; x-ms-traffictypediagnostic: TY1PR01MB1456: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(42068640409301)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(201708071742011)(7699016); SRVR:TY1PR01MB1456; BCL:0; PCL:0; RULEID:; SRVR:TY1PR01MB1456; x-forefront-prvs: 077929D941 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(366004)(136003)(346002)(376002)(39860400002)(199004)(189003)(26005)(6116002)(3846002)(6506007)(6666003)(5660300001)(6916009)(74316002)(99286004)(486006)(8676002)(476003)(106356001)(1857600001)(2351001)(105586002)(33656002)(68736007)(81166006)(7696005)(2900100001)(9686003)(186003)(81156014)(97736004)(102836004)(66066001)(7736002)(5640700003)(6436002)(55016002)(6306002)(53936002)(2501003)(478600001)(5250100002)(966005)(14454004)(72206003)(25786009)(316002)(575784001)(86362001)(2906002)(8936002)(305945005)(74482002)(256004); DIR:OUT; SFP:1102; SCL:1; SRVR:TY1PR01MB1456; 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: GS4NmctChnsy8VMGSmarDzwkHJgdnXY4+oWOZQtV2zPa1aPwC+4hzONS3drMVjMcdwhkWdbRq8NYM3Q3UrCt2jJUvL3USoGhA3KxY4XOzi3po4Mf0tUt9nUtBGa0La9Pq5t3rLpVKEsQ65D3r35KsZ0TtAYUKP4AcTIVCl7vFvQ7hUlQx7paoRnW3UQLAUwNZoVOe1IxBmFu2OxPWwgvg0MY6bNzadj9uRJL0ZWG4z8PNjnyBqKk+EU73/zF5x1/63OTck+aFMAXi2QfgTrdo9SLtndaLawE4vRqIGtPYoyG1fNREoec5nlz5f5vMiBmukEPV1Iba5Vn+hFtvNBsmO64wwwEiDsg4D/AYZyNyec= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: aj.MitsubishiElectric.co.jp X-MS-Exchange-CrossTenant-Network-Message-Id: d9dba945-bb51-458d-eb61-08d60da97b92 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Aug 2018 12:17:22.6497 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: c5a75b62-4bff-4c96-a720-6621ce9978e5 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY1PR01MB1456 Subject: [LTSI-dev] [PATCH 49/54] tracing: Restore proper field flag printing when displaying triggers 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 The flag-printing code used when displaying hist triggers somehow got dropped during refactoring of the inter-event patchset. This restores it. Below are a couple examples - in the first case, .usecs wasn't being displayed properly for common_timestamps and the second illustrates the same for other flags such as .execname. Before: # echo 'hist:key=common_pid.execname:val=count:sort=count' > /sys/kernel/debug/tracing/events/syscalls/sys_enter_read/trigger # cat /sys/kernel/debug/tracing/events/syscalls/sys_enter_read/trigger hist:keys=common_pid:vals=hitcount,count:sort=count:size=2048 [active] # echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="cyclictest"' >> /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger # cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger hist:keys=pid:vals=hitcount:ts0=common_timestamp:sort=hitcount:size=2048:clock=global if comm=="cyclictest" [active] After: # echo 'hist:key=common_pid.execname:val=count:sort=count' > /sys/kernel/debug/tracing/events/syscalls/sys_enter_read/trigger # cat /sys/kernel/debug/tracing/events/syscalls/sys_enter_read/trigger hist:keys=common_pid.execname:vals=hitcount,count:sort=count:size=2048 [active] # echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="cyclictest"' >> /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger # cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger hist:keys=pid:vals=hitcount:ts0=common_timestamp.usecs:sort=hitcount:size=2048:clock=global if comm=="cyclictest" [active] Link: http://lkml.kernel.org/r/492bab42ff21806600af98a8ea901af10efbee0c.1524790601.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) (cherry picked from commit 608940dabe1bd2ce4c97524004ec86637cf80f2c) Signed-off-by: Hirotaka MOTAI --- kernel/trace/trace_events_hist.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c index 0d7b3ffb..66c87be4 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -4908,16 +4908,26 @@ static void hist_field_print(struct seq_file *m, struct hist_field *hist_field) seq_puts(m, "cpu"); else if (field_name) { if (hist_field->flags & HIST_FIELD_FL_VAR_REF || hist_field->flags & HIST_FIELD_FL_ALIAS) seq_putc(m, '$'); seq_printf(m, "%s", field_name); } else if (hist_field->flags & HIST_FIELD_FL_TIMESTAMP) seq_puts(m, "common_timestamp"); + + if (hist_field->flags) { + if (!(hist_field->flags & HIST_FIELD_FL_VAR_REF) && + !(hist_field->flags & HIST_FIELD_FL_EXPR)) { + const char *flags = get_hist_field_flags(hist_field); + + if (flags) + seq_printf(m, ".%s", flags); + } + } } static int event_hist_trigger_print(struct seq_file *m, struct event_trigger_ops *ops, struct event_trigger_data *data) { struct hist_trigger_data *hist_data = data->private_data; struct hist_field *field;