Received: by 10.192.165.148 with SMTP id m20csp148083imm; Thu, 26 Apr 2018 18:06:25 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrFsu8q19bzU5E1vtiA5YpiAGFeVi8DHWlk6lHvUKvp10Tpe0DgOn83vKcl0BGymQFUHMim X-Received: by 2002:a17:902:4303:: with SMTP id i3-v6mr294431pld.394.1524791185267; Thu, 26 Apr 2018 18:06:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524791185; cv=none; d=google.com; s=arc-20160816; b=XlIBGjZSPIOdvFe7lALQoBD7MkSt5g50PwXkqHU0NClvvzD0sTt+/tuny+lnhGiwKt ZMRTfehLHHxT4srSGrj9b5Hl/D2+PWqaNi6DIk+nNplMtT5pX7pjIyZTq53d3YK7CQ8y vxkJ7iI/un1YevWaklDSWBluv5Mfuw7xStv1MwD9x2fIprCpVaiYamvWk8JQCkFflwbg o1i3heTFIYNSBHRh4XDpuD/cUUcqtCUVvenVNAN/TcCRVFreGi+OgwHS2quLxXFMc6Ts cLxdW1fOocTRpOl7mh2dlXZKzbFHAuVh28ct6JHb5Wljfp/G8iWjEs8OuFPChy1LJYdA 8lWA== 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=WUetv9XGre42qOQ+TZZwJNf0iyFfFBuGjNM6YXWDPD81STFgzwvGBvQl2iCzdcVinz igiAK/pcV93abQnpAGgyy6q9t6+BjLDYMrdDvATd5Z54TrBD/CutxW53cA9C4RDzftCo Yt/WnlEQC8pzYdbmnlXALfRQLdlpjmBbgIJxJZ4QuJc9zFL+upZhh4m13wAURG2izzPQ xNKzJz6cwuzXYIXt1zn1T2kIjheohwxM7lNWIEDYv8ecjZ5kxSIKtya4HD0e4wvhI+Ii hrHZ9CIJQZrAZlPBs8/NlcEiD1EkLgr92QXwNmQaXwE9WkChAjiku1rxIRWtMGibZQNU sPrA== 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 l1-v6si115055pld.594.2018.04.26.18.06.11; Thu, 26 Apr 2018 18:06:25 -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 S1757204AbeD0BFG (ORCPT + 99 others); Thu, 26 Apr 2018 21:05:06 -0400 Received: from mga02.intel.com ([134.134.136.20]:10986 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757152AbeD0BFD (ORCPT ); Thu, 26 Apr 2018 21:05:03 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Apr 2018 18:05:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,333,1520924400"; d="scan'208";a="36504235" Received: from rpastern-mobl3.ger.corp.intel.com (HELO localhost) ([10.255.87.27]) by orsmga007.jf.intel.com with ESMTP; 26 Apr 2018 18:05:00 -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/3] tracing: Restore proper field flag printing when displaying triggers Date: Thu, 26 Apr 2018 20:04:47 -0500 Message-Id: <492bab42ff21806600af98a8ea901af10efbee0c.1524790601.git.tom.zanussi@linux.intel.com> 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