From: Borislav Petkov <bp@amd64.org>
To: <peterz@infradead.org>, <mingo@elte.hu>
Cc: <tony.luck@intel.com>, <acme@infradead.org>,
<rostedt@goodmis.org>, <fweisbec@gmail.com>,
<linux-edac@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Borislav Petkov <borislav.petkov@amd.com>
Subject: [PATCH 09/12] perf: Export util.ch into library
Date: Fri, 21 Jan 2011 16:09:32 +0100 [thread overview]
Message-ID: <1295622575-18607-10-git-send-email-bp@amd64.org> (raw)
In-Reply-To: <1295622575-18607-1-git-send-email-bp@amd64.org>
From: Borislav Petkov <borislav.petkov@amd.com>
This is needed for shared common functionality.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
---
tools/lib/lk/Makefile | 1 +
tools/{perf/util => lib/lk}/util.c | 0
tools/lib/perf/Makefile | 1 +
tools/lib/perf/util.h | 8 ++++++++
tools/perf/Makefile | 1 -
tools/perf/perf.h | 3 ---
tools/perf/util/cpumap.c | 2 +-
tools/perf/util/parse-events.h | 1 +
8 files changed, 12 insertions(+), 5 deletions(-)
rename tools/{perf/util => lib/lk}/util.c (100%)
create mode 100644 tools/lib/perf/util.h
diff --git a/tools/lib/lk/Makefile b/tools/lib/lk/Makefile
index 0d58c28..2e7e02c 100644
--- a/tools/lib/lk/Makefile
+++ b/tools/lib/lk/Makefile
@@ -10,6 +10,7 @@ LIB_H += types.h
LIB_OBJS += debugfs.o
LIB_OBJS += usage.o
+LIB_OBJS += util.o
LIBFILE = $(LIB_OUTPUT)liblk.a
diff --git a/tools/perf/util/util.c b/tools/lib/lk/util.c
similarity index 100%
rename from tools/perf/util/util.c
rename to tools/lib/lk/util.c
diff --git a/tools/lib/perf/Makefile b/tools/lib/perf/Makefile
index 2ae7e8d..68def92 100644
--- a/tools/lib/perf/Makefile
+++ b/tools/lib/perf/Makefile
@@ -5,6 +5,7 @@ LIB_H=
LIB_OBJS=
LIB_H += mmap.h
+LIB_H += util.h
LIB_OBJS += mmap.o
diff --git a/tools/lib/perf/util.h b/tools/lib/perf/util.h
new file mode 100644
index 0000000..4b774b9
--- /dev/null
+++ b/tools/lib/perf/util.h
@@ -0,0 +1,8 @@
+#ifndef __PERF_UTIL_H
+#define __PERF_UTIL_H
+
+#define MAX_COUNTERS 256
+#define MAX_NR_CPUS 256
+
+#endif /* __PERF_UTIL_H */
+
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index bab175d..2edc5d9 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -430,7 +430,6 @@ LIB_OBJS += $(OUTPUT)util/svghelper.o
LIB_OBJS += $(OUTPUT)util/sort.o
LIB_OBJS += $(OUTPUT)util/hist.o
LIB_OBJS += $(OUTPUT)util/probe-event.o
-LIB_OBJS += $(OUTPUT)util/util.o
LIB_OBJS += $(OUTPUT)util/xyarray.o
LIB_OBJS += $(OUTPUT)util/cpumap.o
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index 4bfd513..785a200 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -136,9 +136,6 @@ sys_perf_event_open(struct perf_event_attr *attr,
group_fd, flags);
}
-#define MAX_COUNTERS 256
-#define MAX_NR_CPUS 256
-
struct ip_callchain {
u64 nr;
u64 ips[0];
diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c
index 92a09cb..76f3de5 100644
--- a/tools/perf/util/cpumap.c
+++ b/tools/perf/util/cpumap.c
@@ -1,5 +1,5 @@
#include <lk/util.h>
-#include "../perf.h"
+#include <perf/util.h>
#include "cpumap.h"
#include <assert.h>
#include <stdio.h>
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
index b82cafb..c29c407 100644
--- a/tools/perf/util/parse-events.h
+++ b/tools/perf/util/parse-events.h
@@ -3,6 +3,7 @@
/*
* Parse symbolic events/counts passed in as options:
*/
+#include <perf/util.h>
#include "../../../include/linux/perf_event.h"
--
1.7.4.rc2
next prev parent reply other threads:[~2011-01-21 15:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-21 15:09 [RFC PATCHSET 0/12] RAS daemon v4 Borislav Petkov
2011-01-21 15:09 ` [PATCH 01/12] perf: Start the massive restructuring Borislav Petkov
2011-01-21 15:09 ` [PATCH 02/12] perf: Add persistent event facilities Borislav Petkov
2011-01-21 15:09 ` [PATCH 03/12] x86, mce: Add persistent MCE event Borislav Petkov
2011-01-21 15:09 ` [PATCH 04/12] perf: Add Makefile.lib Borislav Petkov
2011-01-21 15:09 ` [PATCH 05/12] perf: Export trace-event utils Borislav Petkov
2011-01-21 15:09 ` [PATCH 06/12] perf: Remove duplicate enum trace_flag_type Borislav Petkov
2011-01-21 15:09 ` [PATCH 07/12] perf: Export debugfs utilities Borislav Petkov
2011-01-21 15:09 ` [PATCH 08/12] perf: Carve out mmap helpers for general use Borislav Petkov
2011-01-21 17:29 ` Arnaldo Carvalho de Melo
2011-01-24 9:04 ` Borislav Petkov
2011-01-24 12:39 ` Arnaldo Carvalho de Melo
2011-01-26 1:00 ` Borislav Petkov
2011-01-26 13:13 ` Arnaldo Carvalho de Melo
2011-01-21 15:09 ` Borislav Petkov [this message]
2011-01-21 15:09 ` [PATCH 10/12] perf: Export ctype.c Borislav Petkov
2011-01-21 15:09 ` [PATCH 11/12] perf: Export tracepoint_id_to_path Borislav Petkov
2011-01-21 15:09 ` [PATCH] ras: Add RAS daemon Borislav Petkov
2011-01-21 17:54 ` Tony Luck
2011-01-21 18:06 ` Borislav Petkov
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=1295622575-18607-10-git-send-email-bp@amd64.org \
--to=bp@amd64.org \
--cc=acme@infradead.org \
--cc=borislav.petkov@amd.com \
--cc=fweisbec@gmail.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tony.luck@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.