Received: by 10.223.164.202 with SMTP id h10csp1627452wrb; Sat, 18 Nov 2017 02:59:34 -0800 (PST) X-Google-Smtp-Source: AGs4zMah7S6j0zx1WOyg2NvjS/XiHWSSZG81EbN+nJU3KzqQIwnqZtgg5IOiWJ4/q5nMpLV7mmQO X-Received: by 10.159.214.139 with SMTP id n11mr7752408plp.289.1511002774266; Sat, 18 Nov 2017 02:59:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511002774; cv=none; d=google.com; s=arc-20160816; b=PCeXRlk7IX2Si8CVwmWZW42qG4zlbzBHUL6TAm/YCvC/a0qj4MgWtyVxgV9us9sV4C FdDroeql71R4ONWUWwJ/EP3VC2+F3M+lF6n1nuHJufIxe3iQlPGlQ9srGFchH77CvRYE rXgyFFqRo5Hjgc1J/rzxEF88Jrv2B8z+0KGwd1BRO1MuKVK+mNX36u5/kTg1qUpiVBEp LAXR5BTeRtIGx8qKfQWQuUKD8Cot9aaapCN0oRuTmzUVYvRhlR44/4yRIg96pVdGHvX5 gnOzMF75hfNKFO5/gwb+uo0zC9Kz+IFJ5f4WVNNZcS/axWmA+v5oo+0SMZw7OJLUp7Kw LYdw== 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=OvSngX2We24Bzhf3coq8rI2jcpwhJ16bQmA7AsN6SXE=; b=sDYKuSlbYKrjKwpc9SVi+aqh64ktwoq/5XZyVxY7LKCukk2+AcvV7eiMxjtRejx5XI RCPlZ2yVonjO1pTkCR6kniRUwIlWsXrFoJSPNBj5MlibKq/8hpDdF7ReNmzoqx13AoXS 4d4mD00W4a/U2+B09ibGEy3bJIlk/+/ML3n5ig7rTp1yCI7Ifs8OkPnHtXCE4LpYHYBc NCO7QX2f9TPepcRLqAvJSCTN7S7wxA3NDhXYf3NWc2JHSYBi51/qWpmBOedMx4f8nvm/ iA8r5m6znKzWCp687CqxOYAyZK15jLyc8Dve/3dVQlx6sZMBfcTdrt+QIOgOktYESVj3 iBWw== 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 f5si4346935pgn.126.2017.11.18.02.59.21; Sat, 18 Nov 2017 02:59:34 -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 S966559AbdKQUmI (ORCPT + 93 others); Fri, 17 Nov 2017 15:42:08 -0500 Received: from mga05.intel.com ([192.55.52.43]:2402 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935911AbdKQUel (ORCPT ); Fri, 17 Nov 2017 15:34:41 -0500 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Nov 2017 12:34:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,411,1505804400"; d="scan'208";a="174770919" Received: from mjglynn-mobl.ger.corp.intel.com (HELO localhost) ([10.254.124.112]) by orsmga005.jf.intel.com with ESMTP; 17 Nov 2017 12:34:39 -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, fengguang.wu@intel.com, linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, Tom Zanussi Subject: [PATCH v6 17/37] tracing: Move get_hist_field_flags() Date: Fri, 17 Nov 2017 14:32:56 -0600 Message-Id: <968aa5ae2d26c294d423b3128be439987806321b.1510948725.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 0e4f829..b33c2bc 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -497,6 +497,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) { @@ -1495,28 +1517,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 1584508299331122669@xxx Sun Nov 19 15:21:09 +0000 2017 X-GM-THRID: 1584505816438746501 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread