Received: by 10.223.164.202 with SMTP id h10csp686393wrb; Thu, 9 Nov 2017 12:42:04 -0800 (PST) X-Google-Smtp-Source: ABhQp+TafDCOOT2fnc2HUZIDAx8MKAHt5xT3MisHBUs8ZUIw4MNgzXz7j9Ws/kb8qjgUM2JTDfi5 X-Received: by 10.84.130.77 with SMTP id 71mr1649202plc.232.1510260124183; Thu, 09 Nov 2017 12:42:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510260124; cv=none; d=google.com; s=arc-20160816; b=uVFb+H58oy1Ly+T88JMZvhFLQQIgxoMTmsAlNQe84CCF3F32hT8ckpVP7XFiCHJYyQ O+wbroF3TlfZnRahZgcSSnrH26u7Z/Q74LPCPBm+gECuTCTkj2MR+8/qA59sfmO5XjAM to3hJx/SVLnMov50TsybZGIO27KxOpjE8IBfpoTlIWajS8zIz5iq49St/lObkyYuYFee ybFubtfaHH/tERs13wnf+l4dnnqOKW3C6De0d6BgqO/CoF5q+CDWxwyJ1hupkX/m8KQB KetGiVdNlmx9mFmHct7uNP8N5gqHldcvTKVhS17lsmQnmC4wPKZlfhCGq91EHgNK5VtP xyCQ== 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=roKhuANxcPwHOKTJCRXbTBAmycSHGcjxB7AlYSzkB0c=; b=OugdMtksT/j2bFezR5KCOSPZtyxLIaP3dZb4XYV5HIaJHSvwr9AJRIYpJnScwtqF+x ytMntdy2mrqLcpgxcqC1MRjJ+D2x8acbz9pyPxmRAQ1EV94txnIayhXvNNdBN5WpuH8X XlG0UpL52GzCYRHCT+FmA1+2NtANzaHqxZr2qoDv6porPPF93URRrdCydEtCp1kaESZz f3U68eWjLqqCcxha38YqDnPuO0xUakiUk039Nkii+AsIe0geaF7q9x/keUoaSBAXe2B0 kiXFtv2eTzg6s3GW9IZ7N86aaJ3DoIEjIfQjp0G/QxJDnm84DgwRJkrohu0ybhlnLrHX k+AQ== 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 m3si7395483plt.232.2017.11.09.12.41.45; Thu, 09 Nov 2017 12:42:04 -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; 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 S1755231AbdKIUki (ORCPT + 83 others); Thu, 9 Nov 2017 15:40:38 -0500 Received: from mga05.intel.com ([192.55.52.43]:5001 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754802AbdKIUfI (ORCPT ); Thu, 9 Nov 2017 15:35:08 -0500 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP; 09 Nov 2017 12:35:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,370,1505804400"; d="scan'208";a="171788401" Received: from dkusalov-mobl4.amr.corp.intel.com (HELO localhost) ([10.254.117.34]) by orsmga005.jf.intel.com with ESMTP; 09 Nov 2017 12:35:07 -0800 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, linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, Tom Zanussi Subject: [PATCH v5 17/37] tracing: Move get_hist_field_flags() Date: Thu, 9 Nov 2017 14:33:48 -0600 Message-Id: <2148919f16218fa4fe8da1d01504ea4cdd3dea3d.1510252666.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 Move get_hist_field_flags() to make it more easily accessible for new code (and keep the move separate from new functionality). Signed-off-by: Tom Zanussi --- kernel/trace/trace_events_hist.c | 44 ++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c index 24a2b69..7fe407a 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -455,6 +455,28 @@ static void hist_trigger_elt_comm_init(struct tracing_map_elt *elt) .elt_init = hist_trigger_elt_comm_init, }; +static const char *get_hist_field_flags(struct hist_field *hist_field) +{ + const char *flags_str = NULL; + + if (hist_field->flags & HIST_FIELD_FL_HEX) + flags_str = "hex"; + else if (hist_field->flags & HIST_FIELD_FL_SYM) + flags_str = "sym"; + else if (hist_field->flags & HIST_FIELD_FL_SYM_OFFSET) + flags_str = "sym-offset"; + else if (hist_field->flags & HIST_FIELD_FL_EXECNAME) + flags_str = "execname"; + else if (hist_field->flags & HIST_FIELD_FL_SYSCALL) + flags_str = "syscall"; + else if (hist_field->flags & HIST_FIELD_FL_LOG2) + flags_str = "log2"; + else if (hist_field->flags & HIST_FIELD_FL_TIMESTAMP_USECS) + flags_str = "usecs"; + + return flags_str; +} + static void destroy_hist_field(struct hist_field *hist_field, unsigned int level) { @@ -1490,28 +1512,6 @@ static int event_hist_open(struct inode *inode, struct file *file) .release = single_release, }; -static const char *get_hist_field_flags(struct hist_field *hist_field) -{ - const char *flags_str = NULL; - - if (hist_field->flags & HIST_FIELD_FL_HEX) - flags_str = "hex"; - else if (hist_field->flags & HIST_FIELD_FL_SYM) - flags_str = "sym"; - else if (hist_field->flags & HIST_FIELD_FL_SYM_OFFSET) - flags_str = "sym-offset"; - else if (hist_field->flags & HIST_FIELD_FL_EXECNAME) - flags_str = "execname"; - else if (hist_field->flags & HIST_FIELD_FL_SYSCALL) - flags_str = "syscall"; - else if (hist_field->flags & HIST_FIELD_FL_LOG2) - flags_str = "log2"; - else if (hist_field->flags & HIST_FIELD_FL_TIMESTAMP_USECS) - flags_str = "usecs"; - - return flags_str; -} - static void hist_field_print(struct seq_file *m, struct hist_field *hist_field) { const char *field_name = hist_field_name(hist_field, 0); -- 1.9.3 From 1584205564435509660@xxx Thu Nov 16 07:09:18 +0000 2017 X-GM-THRID: 1584136538201420668 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread