]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
perf tools: Move srcline definitions to separate header
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 17 Apr 2017 19:30:49 +0000 (16:30 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 19 Apr 2017 16:01:50 +0000 (13:01 -0300)
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
tools/perf/ui/stdio/hist.c
tools/perf/util/hist.c
tools/perf/util/map.c
tools/perf/util/sort.h
tools/perf/util/srcline.c
tools/perf/util/srcline.h [new file with mode: 0644]
tools/perf/util/util.h

index 56f5c038689e8a163d2cfc31e5f565699b99bdc5..ac7f6a3e4a86b4cc77773df93d45661cbc25d149 100644 (file)
@@ -19,6 +19,7 @@
 #include "../ui.h"
 #include "map.h"
 #include "annotate.h"
+#include "srcline.h"
 
 #include "sane_ctype.h"
 
index 297a79c69b715cef9f357a7c2833c2a600cec4b4..66aa4eb369f17761e2c565b6fc056e0ec06a7518 100644 (file)
@@ -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)
index 61bf304206fd50a5775bf0cddb313fb75686db5f..af3bd5d31d99d3297ea2fd70a8ed8610f9aad7ef 100644 (file)
@@ -8,6 +8,7 @@
 #include "evlist.h"
 #include "evsel.h"
 #include "annotate.h"
+#include "srcline.h"
 #include "ui/progress.h"
 #include <math.h>
 
index c1870ac365a3547c7dacbf7d9ee24cf8a089c07f..9059d20c3b8a83458a05d5911bebd3825b9984e3 100644 (file)
@@ -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);
index e35fb186d04854a089935d74cdc793aca7820345..535903297ceeadaaf5241bce7dffc978b01bac27 100644 (file)
@@ -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;
index ef192802edc96dc1056e25e957d18fd52f587ca7..df051a52393c1de8e85f46d43f567755888133e7 100644 (file)
@@ -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 (file)
index 0000000..7b52ba8
--- /dev/null
@@ -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 */
index 4d9069ab569a063b6c008313fd626d0f7a35f708..46cfdccc32bcdc83210c3662da2195bc8f4c3720 100644 (file)
@@ -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 */