Received: by 10.192.165.156 with SMTP id m28csp2084886imm; Thu, 12 Apr 2018 08:21:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx48a92XLmLmK0XWpEyk0HKMR6luz7iwqhLfQ5qVKCq/wiFwYsaQfF+7wyBF3pww2sXmL/XXf X-Received: by 10.101.89.5 with SMTP id f5mr1037135pgu.428.1523546503048; Thu, 12 Apr 2018 08:21:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523546503; cv=none; d=google.com; s=arc-20160816; b=xie+ZL1LDPzhOUZoG0J7iM5KiS4gRcPbXgGUZMlacQ3r3Bml6CX1i+ODPqlSfOEmOE efPzMAsQ4WikuIsyRfkCPYjjj/uiJz2pWNPPnst/LmlOURhQ43PkfmoXoHBmRwbOeXCU JRWb6m1epr8ouUZKo3i7m1U/5MBVdgp5N+inGNZl0Jpbg2M2oe39Wwri+BLdhSVX03Km LjNqxlKnb+hsxoXT1Gk+76oTyLfPdYwRdGJGkYY/m3pgLj/wHDJJgriT5hOJVYr9CYg1 WuHwUlZV9e28o6b9O2gWemy3rAnPRZeZp9qbj9WgtHTL+93RQzmaI7D4VU+WV+NFDLNv IidQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=IKPpZ01TfijbPcCZYbqL1t9kcl6swks0aXJ0iD6s1ak=; b=CSlbhOo0+iRTo+W2zLbNI86ZH+fge0fanwwSggrjvzYZb4Gvj2fWGH8tK/e7hxRxZ+ fvTGj3SvEn1z/sOXuQMoFDInJsJaxQICytPrVJMrLZVIhhjrIPEEwJbnc69q8x7spbOk 8lGnEqA0re785VTq1mK/gHBTJvQ/Q29PCOY8kVrkrtMyV0IaIwXUk+FSqkcNghA+DEzN +tDCoBXt/6z2Cx2eT6z/YEB+3l860CYZsJnwMmoBQqNsCdM/IbHVWKxWg0kjyVkxeSeu s2l7D2xqgjR1H9ApFjtPWdeCUHf/EAmSvPdXO1QU3QgU4RcpVf4VTTpuGt8ud32SGgOQ wNJg== 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 f31-v6si3587738plb.212.2018.04.12.08.21.06; Thu, 12 Apr 2018 08:21:43 -0700 (PDT) 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 S1752917AbeDLPNf (ORCPT + 99 others); Thu, 12 Apr 2018 11:13:35 -0400 Received: from mga07.intel.com ([134.134.136.100]:8698 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753279AbeDLPNc (ORCPT ); Thu, 12 Apr 2018 11:13:32 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Apr 2018 08:13:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,442,1517904000"; d="scan'208";a="219909058" Received: from cbeckton-mobl.amr.corp.intel.com (HELO localhost) ([10.255.230.227]) by fmsmga006.fm.intel.com with ESMTP; 12 Apr 2018 08:13:29 -0700 From: Tom Zanussi To: rostedt@goodmis.org Cc: tglx@linutronix.de, mhiramat@kernel.org, namhyung@kernel.org, vedang.patel@intel.com, bigeasy@linutronix.de, joel.opensrc@gmail.com, joelaf@google.com, mathieu.desnoyers@efficios.com, baohong.liu@intel.com, rajvi.jingar@intel.com, julia@ni.com, fengguang.wu@intel.com, linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, Tom Zanussi Subject: [PATCH 1/6] tracing: Restore proper field flag printing when displaying triggers Date: Thu, 12 Apr 2018 10:13:16 -0500 Message-Id: X-Mailer: git-send-email 1.9.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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] Signed-off-by: Tom Zanussi --- 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 0d7b3ff..66c87be 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -4913,6 +4913,16 @@ static void hist_field_print(struct seq_file *m, struct hist_field *hist_field) 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, -- 1.9.3