提交 ef0775fe 编写于 作者: H Haitao Li

build: Check and set perf --log-fd option

Linux perf tool version 3.2 introduced a new option "--log-fd" defaults
to 0, which leads to error "Failed opening logfd: Illegal argument" when
executing perf tests.

Set logfd to stderr to let perf test work.

Issue #1538
上级 29367884
......@@ -363,6 +363,16 @@ then
err "either clang or gcc is required"
fi
if [ ! -z "$CFG_PERF" ]
then
HAVE_PERF_LOGFD=`$CFG_PERF stat --log-fd 2>&1 | grep 'unknown option'`
if [ -z "$HAVE_PERF_LOGFD" ];
then
CFG_PERF_WITH_LOGFD=1
putvar CFG_PERF_WITH_LOGFD
fi
fi
step_msg "making directories"
for i in \
......
......@@ -58,7 +58,11 @@ ifneq ($(findstring linux,$(CFG_OSTYPE)),)
CFG_LDENV := LD_LIBRARY_PATH
CFG_DEF_SUFFIX := .linux.def
ifdef CFG_PERF
CFG_PERF_TOOL := $(CFG_PERF) stat -r 3
ifneq ($(CFG_PERF_WITH_LOGFD),)
CFG_PERF_TOOL := $(CFG_PERF) stat -r 3 --log-fd 2
else
CFG_PERF_TOOL := $(CFG_PERF) stat -r 3
endif
else
ifdef CFG_VALGRIND
CFG_PERF_TOOL :=\
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册