Skip to content

Commit

Permalink
Remove semicolon at the end of define BPF_STACK_TRACE()
Browse files Browse the repository at this point in the history
The semicolon is usually added when the macro is used. Update both the
macro definition and all uses.

Signed-off-by: Song Liu <[email protected]>
  • Loading branch information
liu-song-6 committed Feb 2, 2018
1 parent 3f39bc1 commit 67ae605
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples/cpp/TCPSendStack.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion examples/lua/memleak.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/lua/offcputime.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion examples/tracing/mallocstacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#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,
Expand Down
2 changes: 1 addition & 1 deletion examples/tracing/stacksnoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
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) {
Expand Down
2 changes: 1 addition & 1 deletion src/cc/export/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down
2 changes: 1 addition & 1 deletion tools/memleak.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def run_command_get_pid(command):
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) {
Expand Down
2 changes: 1 addition & 1 deletion tools/offcputime.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def signal_ignore(signal, frame):
};
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;
Expand Down
2 changes: 1 addition & 1 deletion tools/offwaketime.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def signal_ignore(signal, frame):
};
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;
Expand Down
2 changes: 1 addition & 1 deletion tools/old/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def positive_nonzero_int(val):
};
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.
Expand Down
2 changes: 1 addition & 1 deletion tools/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def positive_nonzero_int(val):
};
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.
Expand Down
2 changes: 1 addition & 1 deletion tools/stacksnoop.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion tools/wakeuptime.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def signal_ignore(signal, frame):
};
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();
Expand Down

0 comments on commit 67ae605

Please sign in to comment.