bpftrace error on aliyun linux 2.0
今天测试了一下aliyun Linux 2.0,想看看它自带的ebcc工具到底如何。结果在跑一个bpftrace示例脚本的时候报错。
[root@AliYun ~]# bpftrace -d -e 'tracepoint:syscalls:sys_enter_openat {printf("%-18s %-4d %s\n",comm,pid,str(args->filename));}'
#include <linux/types.h>
struct _tracepoint_syscalls_sys_enter_openat
{
unsigned short common_type;
unsigned char common_flags;
unsigned char common_preempt_count;
int common_pid;
int __syscall_nr;
s64 dfd;
const char * filename;
s64 flags;
umode_t mode;
};
Program
tracepoint:syscalls:sys_enter_openat
call: printf
string: %-18s %-4d %s\n
builtin: comm
builtin: pid
call: str
.
dereference
builtin: args
filename
modprobe: FATAL: Module kheaders not found.
definitions.h:9:3: error: unknown type name 's64'
definitions.h:11:3: error: unknown type name 's64'
definitions.h:12:3: error: unknown type name 'umode_t'
Input (276): #include <linux/types.h>
struct _tracepoint_syscalls_sys_enter_openat
{
unsigned short common_type;
unsigned char common_flags;
unsigned char common_preempt_count;
int common_pid;
int __syscall_nr;
s64 dfd;
const char * filename;
s64 flags;
umode_t mode;
};