/ 详情

[openEuler-20.03] perf JVM_TI 编译失败

Done
Task member
Opened this issue  
2021-05-21 17:17

输入图片说明

jvmti/jvmti_agent.c:48:21: error: static declaration of ‘gettid’ follows non-static declaration
 static inline pid_t gettid(void)
                     ^~~~~~
In file included from /usr/include/unistd.h:1170,
                 from jvmti/jvmti_agent.c:33:
/usr/include/x86_64-linux-gnu/bits/unistd_ext.h:34:16: note: previous declaration of ‘gettid’ was here
 extern __pid_t gettid (void) __THROW;
                ^~~~~~
Warning: Kernel ABI header at 'tools/include/uapi/linux/if_link.h' differs from latest version at 'include/uapi/linux/if_link.h'
Attachments

Comments (5)

成坚 (CHENG Jian) created任务
成坚 (CHENG Jian) set related repository to openEuler/kernel
展开全部操作日志

Hey gatieme, Welcome to openEuler Community.
All of the projects in openEuler Community are maintained by @openeuler-ci-bot .
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at https://gitee.com/openeuler/community/blob/master/en/sig-infrastructure/command.md to find the details.

openeuler-ci-bot added
 
sig/Kernel
label

perf 中 HOOK 的函数跟你开发环境中编译器提供的函数声明冲突了。
跟内核版本和 编译器 or LIBC 库有关系。

内核可以通过探测此冲突进行屏蔽。

合入如下补丁即可。

tools build: Check if gettid() is available before providing helper

该补丁 kernel-4.19 已由 LTS 合入, 合入 commit 如下所示

ec1bafcc4db0 tools build: Check if gettid() is available before providing helper
399ba9cc8ddc tools build feature: Check if eventfd() is available
776e76a97769 tools build feature: Check if get_current_dir_name() is available
b455ff7638b6 perf tools: Use %define api.pure full instead of %pure-parser

openEuler-1.0-LTS 分支未合入.

成坚 (CHENG Jian) changed description
成坚 (CHENG Jian) changed description

该补丁 kernel-4.19 已由 LTS 合入, 合入 commit 如下所示

ec1bafcc4db0 tools build: Check if gettid() is available before providing helper
399ba9cc8ddc tools build feature: Check if eventfd() is available
776e76a97769 tools build feature: Check if get_current_dir_name() is available
b455ff7638b6 perf tools: Use %define api.pure full instead of %pure-parser

openEuler-1.0-LTS 分支未合入. 可以 cherry-pick 到 openEuler-1.0-LTS 分支

非常感谢李弘宇同学的工作,
补丁已经合入 openEuler-1.0-LTS。

d152f6078285 (HEAD -> openEuler-1.0-LTS, origin/openEuler-1.0-LTS) tools build: Check if gettid() is available before providing helper
f9a5b0fe0b7d tools build feature: Check if eventfd() is available
c69de217cc13 tools build feature: Check if get_current_dir_name() is available
a756ef296be4 perf tools: Use %define api.pure full instead of %pure-parser

Sign in to comment

状态
Assignees
Projects
Milestones
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
Branches
Planed to start   -   Planed to end
-
Top level
Priority
Duration (hours)
确定
参与者(2)
5329419 openeuler ci bot 1578984659