summaryrefslogtreecommitdiff
path: root/tools/perf/ui
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2019-07-04 11:32:27 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-07-09 10:13:26 -0300
commit7f7c536f23e6afaa5d5d4b0e0958b0be8922491f (patch)
tree961ca1cb94ac6ea74be5859ca6c9881b260ea479 /tools/perf/ui
parente5653eb82ddc71ad8ffcbb3c74dd6f0c0230ab4c (diff)
tools lib: Adopt zalloc()/zfree() from tools/perf
Eroding a bit more the tools/perf/util/util.h hodpodge header. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-natazosyn9rwjka25tvcnyi0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui')
-rw-r--r--tools/perf/ui/browser.c2
-rw-r--r--tools/perf/ui/browsers/annotate.c2
-rw-r--r--tools/perf/ui/browsers/hists.c2
-rw-r--r--tools/perf/ui/gtk/util.c3
-rw-r--r--tools/perf/ui/stdio/hist.c2
5 files changed, 5 insertions, 6 deletions
diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c
index 55ff05a46e0b..f80c51d53565 100644
--- a/tools/perf/ui/browser.c
+++ b/tools/perf/ui/browser.c
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
-#include "../util.h"
#include "../string2.h"
#include "../config.h"
#include "../../perf.h"
@@ -17,6 +16,7 @@
#include "keysyms.h"
#include "../color.h"
#include <linux/ctype.h>
+#include <linux/zalloc.h>
static int ui_browser__percent_color(struct ui_browser *browser,
double percent, bool current)
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index b0d089a95dac..e67880bf1efe 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
-#include "../../util/util.h"
#include "../browser.h"
#include "../helpline.h"
#include "../ui.h"
@@ -15,6 +14,7 @@
#include <pthread.h>
#include <linux/kernel.h>
#include <linux/string.h>
+#include <linux/zalloc.h>
#include <sys/ttydefaults.h>
#include <asm/bug.h>
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 33e67aa91347..85581cfb9112 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -9,6 +9,7 @@
#include <linux/string.h>
#include <sys/ttydefaults.h>
#include <linux/time64.h>
+#include <linux/zalloc.h>
#include "../../util/callchain.h"
#include "../../util/evsel.h"
@@ -18,7 +19,6 @@
#include "../../util/symbol.h"
#include "../../util/pstack.h"
#include "../../util/sort.h"
-#include "../../util/util.h"
#include "../../util/top.h"
#include "../../util/thread.h"
#include "../../arch/common.h"
diff --git a/tools/perf/ui/gtk/util.c b/tools/perf/ui/gtk/util.c
index 7250d8101c8f..c28bdb7517ac 100644
--- a/tools/perf/ui/gtk/util.c
+++ b/tools/perf/ui/gtk/util.c
@@ -1,11 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
#include "../util.h"
-#include "../../util/util.h"
#include "../../util/debug.h"
#include "gtk.h"
#include <string.h>
-
+#include <linux/zalloc.h>
struct perf_gtk_context *pgctx;
diff --git a/tools/perf/ui/stdio/hist.c b/tools/perf/ui/stdio/hist.c
index 89393c79d870..ee7ea6deed21 100644
--- a/tools/perf/ui/stdio/hist.c
+++ b/tools/perf/ui/stdio/hist.c
@@ -3,7 +3,6 @@
#include <linux/string.h>
#include "../../util/callchain.h"
-#include "../../util/util.h"
#include "../../util/hist.h"
#include "../../util/map.h"
#include "../../util/map_groups.h"
@@ -14,6 +13,7 @@
#include "../../util/string2.h"
#include "../../util/thread.h"
#include <linux/ctype.h>
+#include <linux/zalloc.h>
static size_t callchain__fprintf_left_margin(FILE *fp, int left_margin)
{