提交 220a6258 编写于 作者: L Linus Torvalds

Merge branch 'perf-fixes-for-linus' of...

Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  perf events: Update MAINTAINERS entry file patterns
  perf tools: Remove static debugfs path from parse-events
  perf tools: Fix the NO_64BIT build on pure 64-bit systems
  perf tools: Fix const char type propagation
......@@ -4076,6 +4076,13 @@ M: Peter Zijlstra <a.p.zijlstra@chello.nl>
M: Paul Mackerras <paulus@samba.org>
M: Ingo Molnar <mingo@elte.hu>
S: Supported
F: kernel/perf_event.c
F: include/linux/perf_event.h
F: arch/*/*/kernel/perf_event.c
F: arch/*/include/asm/perf_event.h
F: arch/*/lib/perf_event.c
F: arch/*/kernel/perf_callchain.c
F: tools/perf/
PERSONALITY HANDLING
M: Christoph Hellwig <hch@infradead.org>
......
......@@ -157,11 +157,18 @@ uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
# If we're on a 64-bit kernel, use -m64
ifndef NO_64BIT
ifneq ($(patsubst %64,%,$(uname_M)),$(uname_M))
M64 := -m64
endif
#
# Add -m32 for cross-builds:
#
ifdef NO_64BIT
MBITS := -m32
else
#
# If we're on a 64-bit kernel, use -m64:
#
ifneq ($(patsubst %64,%,$(uname_M)),$(uname_M))
MBITS := -m64
endif
endif
# CFLAGS and LDFLAGS are for the users to override from the command line.
......@@ -194,7 +201,7 @@ EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wold-style-definition
EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wstrict-prototypes
EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wdeclaration-after-statement
CFLAGS = $(M64) -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -fstack-protector-all -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS)
CFLAGS = $(MBITS) -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -fstack-protector-all -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS)
LDFLAGS = -lpthread -lrt -lelf -lm
ALL_CFLAGS = $(CFLAGS)
ALL_LDFLAGS = $(LDFLAGS)
......@@ -416,7 +423,7 @@ ifeq ($(uname_S),Darwin)
endif
ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y)
msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel);
msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el]);
endif
ifdef NO_DEMANGLE
......
......@@ -1287,7 +1287,7 @@ static struct sort_dimension *available_sorts[] = {
static LIST_HEAD(sort_list);
static int sort_dimension__add(char *tok, struct list_head *list)
static int sort_dimension__add(const char *tok, struct list_head *list)
{
int i;
......@@ -1917,7 +1917,7 @@ static void setup_sorting(void)
free(str);
sort_dimension__add((char *)"pid", &cmp_pid);
sort_dimension__add("pid", &cmp_pid);
}
static const char *record_args[] = {
......
......@@ -691,7 +691,10 @@ static void store_event_type(const char *orgname)
FILE *file;
int id;
sprintf(filename, "/sys/kernel/debug/tracing/events/%s/id", orgname);
sprintf(filename, "%s/", debugfs_path);
strncat(filename, orgname, strlen(orgname));
strcat(filename, "/id");
c = strchr(filename, ':');
if (c)
*c = '/';
......
......@@ -618,7 +618,7 @@ static int test_type(enum event_type type, enum event_type expect)
}
static int test_type_token(enum event_type type, char *token,
enum event_type expect, char *expect_tok)
enum event_type expect, const char *expect_tok)
{
if (type != expect) {
die("Error: expected type %d but read %d",
......@@ -650,7 +650,7 @@ static int read_expect_type(enum event_type expect, char **tok)
return __read_expect_type(expect, tok, 1);
}
static int __read_expected(enum event_type expect, char *str, int newline_ok)
static int __read_expected(enum event_type expect, const char *str, int newline_ok)
{
enum event_type type;
char *token;
......@@ -668,12 +668,12 @@ static int __read_expected(enum event_type expect, char *str, int newline_ok)
return 0;
}
static int read_expected(enum event_type expect, char *str)
static int read_expected(enum event_type expect, const char *str)
{
return __read_expected(expect, str, 1);
}
static int read_expected_item(enum event_type expect, char *str)
static int read_expected_item(enum event_type expect, const char *str)
{
return __read_expected(expect, str, 0);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册