Commit 67ae605d authored by Song Liu's avatar Song Liu

Remove semicolon at the end of define BPF_STACK_TRACE()

The semicolon is usually added when the macro is used. Update both the
macro definition and all uses.
Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
parent 3f39bc14
......@@ -27,7 +27,7 @@ struct stack_key_t {
int kernel_stack;
};
BPF_STACK_TRACE(stack_traces, 10240)
BPF_STACK_TRACE(stack_traces, 10240);
BPF_HASH(counts, struct stack_key_t, uint64_t);
int on_tcp_send(struct pt_regs *ctx) {
......
......@@ -26,7 +26,7 @@ struct alloc_info_t {
BPF_HASH(sizes, u64);
BPF_HASH(allocs, u64, struct alloc_info_t);
BPF_STACK_TRACE(stack_traces, 10240)
BPF_STACK_TRACE(stack_traces, 10240);
int alloc_enter(struct pt_regs *ctx, size_t size)
{
......
......@@ -27,7 +27,7 @@ struct key_t {
};
BPF_HASH(counts, struct key_t);
BPF_HASH(start, u32);
BPF_STACK_TRACE(stack_traces, 10240)
BPF_STACK_TRACE(stack_traces, 10240);
int oncpu(struct pt_regs *ctx, struct task_struct *prev) {
u32 pid;
......
......@@ -25,7 +25,7 @@ b = BPF(text="""
#include <uapi/linux/ptrace.h>
BPF_HASH(calls, int);
BPF_STACK_TRACE(stack_traces, 1024)
BPF_STACK_TRACE(stack_traces, 1024);
int alloc_enter(struct pt_regs *ctx, size_t size) {
int key = stack_traces.get_stackid(ctx,
......
......@@ -52,7 +52,7 @@ struct data_t {
char comm[TASK_COMM_LEN];
};
BPF_STACK_TRACE(stack_traces, 128)
BPF_STACK_TRACE(stack_traces, 128);
BPF_PERF_OUTPUT(events);
void trace_stack(struct pt_regs *ctx) {
......
......@@ -184,7 +184,7 @@ struct bpf_stacktrace {
};
#define BPF_STACK_TRACE(_name, _max_entries) \
BPF_TABLE("stacktrace", int, struct bpf_stacktrace, _name, _max_entries);
BPF_TABLE("stacktrace", int, struct bpf_stacktrace, _name, _max_entries)
// packet parsing state machine helpers
#define cursor_advance(_cursor, _len) \
......
......@@ -138,7 +138,7 @@ struct combined_alloc_info_t {
BPF_HASH(sizes, u64);
BPF_TABLE("hash", u64, struct alloc_info_t, allocs, 1000000);
BPF_HASH(memptrs, u64, u64);
BPF_STACK_TRACE(stack_traces, 10240)
BPF_STACK_TRACE(stack_traces, 10240);
BPF_TABLE("hash", u64, struct combined_alloc_info_t, combined_allocs, 10240);
static inline void update_statistics_add(u64 stack_id, u64 sz) {
......
......@@ -119,7 +119,7 @@ struct key_t {
};
BPF_HASH(counts, struct key_t);
BPF_HASH(start, u32);
BPF_STACK_TRACE(stack_traces, STACK_STORAGE_SIZE)
BPF_STACK_TRACE(stack_traces, STACK_STORAGE_SIZE);
int oncpu(struct pt_regs *ctx, struct task_struct *prev) {
u32 pid = prev->pid;
......
......@@ -125,7 +125,7 @@ struct wokeby_t {
};
BPF_HASH(wokeby, u32, struct wokeby_t);
BPF_STACK_TRACE(stack_traces, STACK_STORAGE_SIZE)
BPF_STACK_TRACE(stack_traces, STACK_STORAGE_SIZE);
int waker(struct pt_regs *ctx, struct task_struct *p) {
u32 pid = p->pid;
......
......@@ -139,7 +139,7 @@ struct key_t {
};
BPF_HASH(counts, struct key_t);
BPF_HASH(start, u32);
BPF_STACK_TRACE(stack_traces, STACK_STORAGE_SIZE)
BPF_STACK_TRACE(stack_traces, STACK_STORAGE_SIZE);
// This code gets a bit complex. Probably not suitable for casual hacking.
......
......@@ -127,7 +127,7 @@ struct key_t {
};
BPF_HASH(counts, struct key_t);
BPF_HASH(start, u32);
BPF_STACK_TRACE(stack_traces, STACK_STORAGE_SIZE)
BPF_STACK_TRACE(stack_traces, STACK_STORAGE_SIZE);
// This code gets a bit complex. Probably not suitable for casual hacking.
......
......@@ -25,7 +25,7 @@ struct data_t {
char comm[TASK_COMM_LEN];
};
BPF_STACK_TRACE(stack_traces, 128)
BPF_STACK_TRACE(stack_traces, 128);
BPF_PERF_OUTPUT(events);
void trace_stack(struct pt_regs *ctx) {
......
......@@ -97,7 +97,7 @@ struct key_t {
};
BPF_HASH(counts, struct key_t);
BPF_HASH(start, u32);
BPF_STACK_TRACE(stack_traces, STACK_STORAGE_SIZE)
BPF_STACK_TRACE(stack_traces, STACK_STORAGE_SIZE);
int offcpu(struct pt_regs *ctx) {
u32 pid = bpf_get_current_pid_tgid();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment