mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Arnaldo Carvalho de Melo <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: dsahern@gmail.com, acme@redhat.com, jolsa@kernel.org,
	namhyung@kernel.org, adrian.hunter@intel.com, mingo@kernel.org,
	wangnan0@huawei.com, hpa@zytor.com, linux-kernel@vger.kernel.org,
	tglx@linutronix.de
Subject: [tip:perf/core] perf tools: Move srcline definitions to separate header
Date: Thu, 20 Apr 2017 04:10:08 -0700	[thread overview]
Message-ID: <tip-ludnlm4djqcdjziekzr4s3u9@git.kernel.org> (raw)

Commit-ID:  632a5cabea21eb079b788d2bb4a9318bd6fff5e1
Gitweb:     http://git.kernel.org/tip/632a5cabea21eb079b788d2bb4a9318bd6fff5e1
Author:     Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Mon, 17 Apr 2017 16:30:49 -0300
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 19 Apr 2017 13:01:50 -0300

perf tools: Move srcline definitions to separate header

Out of util.h into a new file, srcline.h

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-ludnlm4djqcdjziekzr4s3u9@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/ui/browsers/hists.c |  1 +
 tools/perf/ui/stdio/hist.c     |  1 +
 tools/perf/util/hist.c         |  1 +
 tools/perf/util/map.c          |  1 +
 tools/perf/util/sort.h         |  1 +
 tools/perf/util/srcline.c      |  1 +
 tools/perf/util/srcline.h      | 34 ++++++++++++++++++++++++++++++++++
 tools/perf/util/util.h         | 27 ---------------------------
 8 files changed, 40 insertions(+), 27 deletions(-)

diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 56f5c03..ac7f6a3 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -19,6 +19,7 @@
 #include "../ui.h"
 #include "map.h"
 #include "annotate.h"
+#include "srcline.h"
 
 #include "sane_ctype.h"
 
diff --git a/tools/perf/ui/stdio/hist.c b/tools/perf/ui/stdio/hist.c
index 297a79c..66aa4eb 100644
--- a/tools/perf/ui/stdio/hist.c
+++ b/tools/perf/ui/stdio/hist.c
@@ -4,6 +4,7 @@
 #include "../../util/hist.h"
 #include "../../util/sort.h"
 #include "../../util/evsel.h"
+#include "../../util/srcline.h"
 #include "../../util/sane_ctype.h"
 
 static size_t callchain__fprintf_left_margin(FILE *fp, int left_margin)
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 61bf304..af3bd5d 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -8,6 +8,7 @@
 #include "evlist.h"
 #include "evsel.h"
 #include "annotate.h"
+#include "srcline.h"
 #include "ui/progress.h"
 #include <math.h>
 
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index c1870ac..9059d20 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -16,6 +16,7 @@
 #include "debug.h"
 #include "machine.h"
 #include <linux/string.h>
+#include "srcline.h"
 #include "unwind.h"
 
 static void __maps__insert(struct maps *maps, struct map *map);
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index e35fb18..5359032 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -21,6 +21,7 @@
 #include <subcmd/parse-options.h>
 #include "parse-events.h"
 #include "hist.h"
+#include "srcline.h"
 #include "thread.h"
 
 extern regex_t parent_regex;
diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c
index ef19280..df051a5 100644
--- a/tools/perf/util/srcline.c
+++ b/tools/perf/util/srcline.c
@@ -9,6 +9,7 @@
 #include "util/util.h"
 #include "util/debug.h"
 #include "util/callchain.h"
+#include "srcline.h"
 
 #include "symbol.h"
 
diff --git a/tools/perf/util/srcline.h b/tools/perf/util/srcline.h
new file mode 100644
index 0000000..7b52ba8
--- /dev/null
+++ b/tools/perf/util/srcline.h
@@ -0,0 +1,34 @@
+#ifndef PERF_SRCLINE_H
+#define PERF_SRCLINE_H
+
+#include <linux/list.h>
+#include <linux/types.h>
+
+struct dso;
+struct symbol;
+
+extern bool srcline_full_filename;
+char *get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
+		  bool show_sym, bool show_addr);
+char *__get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
+		  bool show_sym, bool show_addr, bool unwind_inlines);
+void free_srcline(char *srcline);
+
+#define SRCLINE_UNKNOWN  ((char *) "??:0")
+
+struct inline_list {
+	char			*filename;
+	char			*funcname;
+	unsigned int		line_nr;
+	struct list_head	list;
+};
+
+struct inline_node {
+	u64			addr;
+	struct list_head	val;
+};
+
+struct inline_node *dso__parse_addr_inlines(struct dso *dso, u64 addr);
+void inline_node__delete(struct inline_node *node);
+
+#endif /* PERF_SRCLINE_H */
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 4d9069a..46cfdcc 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -144,8 +144,6 @@ struct parse_tag {
 
 unsigned long parse_tag_value(const char *str, struct parse_tag *tags);
 
-#define SRCLINE_UNKNOWN  ((char *) "??:0")
-
 static inline int path__join(char *bf, size_t size,
 			     const char *path1, const char *path2)
 {
@@ -161,16 +159,6 @@ static inline int path__join3(char *bf, size_t size,
 			 path2, path2[0] ? "/" : "", path3);
 }
 
-struct dso;
-struct symbol;
-
-extern bool srcline_full_filename;
-char *get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
-		  bool show_sym, bool show_addr);
-char *__get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
-		  bool show_sym, bool show_addr, bool unwind_inlines);
-void free_srcline(char *srcline);
-
 int perf_event_paranoid(void);
 
 void mem_bswap_64(void *src, int byte_size);
@@ -221,19 +209,4 @@ int timestamp__scnprintf_usec(u64 timestamp, char *buf, size_t sz);
 
 int unit_number__scnprintf(char *buf, size_t size, u64 n);
 
-struct inline_list {
-	char			*filename;
-	char			*funcname;
-	unsigned int		line_nr;
-	struct list_head	list;
-};
-
-struct inline_node {
-	u64			addr;
-	struct list_head	val;
-};
-
-struct inline_node *dso__parse_addr_inlines(struct dso *dso, u64 addr);
-void inline_node__delete(struct inline_node *node);
-
 #endif /* GIT_COMPAT_UTIL_H */

                 reply	other threads:[~2017-04-20 11:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-ludnlm4djqcdjziekzr4s3u9@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=dsahern@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®