Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323908
b: refs/heads/master
c: 4d29089
h: refs/heads/master
v: v3
  • Loading branch information
Namhyung Kim authored and Arnaldo Carvalho de Melo committed Sep 27, 2012
1 parent 2977ff8 commit 016ea49
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9ec60972a38011ad8a5676f4cd5e51ac508c36b6
refs/heads/master: 4d29089c2b70ffeb61656ffd1b9c9c52602ddd44
16 changes: 14 additions & 2 deletions trunk/tools/perf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ ifdef PARSER_DEBUG
endif

CFLAGS = -fno-omit-frame-pointer -ggdb3 -funwind-tables -Wall -Wextra -std=gnu99 $(CFLAGS_WERROR) $(CFLAGS_OPTIMIZE) $(EXTRA_WARNINGS) $(EXTRA_CFLAGS) $(PARSER_DEBUG_CFLAGS)
EXTLIBS = -lpthread -lrt -lelf -lm -laudit
EXTLIBS = -lpthread -lrt -lelf -lm
ALL_CFLAGS = $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
ALL_LDFLAGS = $(LDFLAGS)
STRIP ?= strip
Expand Down Expand Up @@ -442,7 +442,6 @@ BUILTIN_OBJS += $(OUTPUT)builtin-kmem.o
BUILTIN_OBJS += $(OUTPUT)builtin-lock.o
BUILTIN_OBJS += $(OUTPUT)builtin-kvm.o
BUILTIN_OBJS += $(OUTPUT)builtin-test.o
BUILTIN_OBJS += $(OUTPUT)builtin-trace.o
BUILTIN_OBJS += $(OUTPUT)builtin-inject.o

PERFLIBS = $(LIB_FILE) $(LIBTRACEEVENT)
Expand Down Expand Up @@ -560,6 +559,19 @@ else
LIB_OBJS += $(OUTPUT)util/unwind.o
endif

ifdef NO_LIBAUDIT
BASIC_CFLAGS += -DNO_LIBAUDIT_SUPPORT
else
FLAGS_LIBAUDIT = $(ALL_CFLAGS) $(ALL_LDFLAGS) -laudit
ifneq ($(call try-cc,$(SOURCE_LIBAUDIT),$(FLAGS_LIBAUDIT)),y)
msg := $(warning No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev);
BASIC_CFLAGS += -DNO_LIBAUDIT_SUPPORT
else
BUILTIN_OBJS += $(OUTPUT)builtin-trace.o
EXTLIBS += -laudit
endif
endif

ifdef NO_NEWT
BASIC_CFLAGS += -DNO_NEWT_SUPPORT
else
Expand Down
11 changes: 11 additions & 0 deletions trunk/tools/perf/config/feature-tests.mak
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,14 @@ int main(void)
}
endef
endif

ifndef NO_LIBAUDIT
define SOURCE_LIBAUDIT
#include <libaudit.h>

int main(void)
{
return audit_open();
}
endef
endif
2 changes: 2 additions & 0 deletions trunk/tools/perf/perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ static struct cmd_struct commands[] = {
{ "lock", cmd_lock, 0 },
{ "kvm", cmd_kvm, 0 },
{ "test", cmd_test, 0 },
#ifndef NO_LIBAUDIT_SUPPORT
{ "trace", cmd_trace, 0 },
#endif
{ "inject", cmd_inject, 0 },
};

Expand Down

0 comments on commit 016ea49

Please sign in to comment.