projects
/
platform
/
upstream
/
bcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb3d161
)
Get correct PID in TCPSendStack example
author
Teng Qin
<qinteng@fb.com>
Sun, 21 May 2017 05:44:32 +0000
(22:44 -0700)
committer
Teng Qin
<qinteng@fb.com>
Sun, 21 May 2017 05:44:32 +0000
(22:44 -0700)
examples/cpp/TCPSendStack.cc
patch
|
blob
|
history
diff --git
a/examples/cpp/TCPSendStack.cc
b/examples/cpp/TCPSendStack.cc
index
84f0e5f
..
fd0b68d
100644
(file)
--- a/
examples/cpp/TCPSendStack.cc
+++ b/
examples/cpp/TCPSendStack.cc
@@
-32,7
+32,7
@@
BPF_HASH(counts, struct stack_key_t, uint64_t);
int on_tcp_send(struct pt_regs *ctx) {
struct stack_key_t key = {};
- key.pid = bpf_get_current_pid_tgid();
+ key.pid = bpf_get_current_pid_tgid()
>> 32
;
bpf_get_current_comm(&key.name, sizeof(key.name));
key.kernel_stack = stack_traces.get_stackid(ctx, BPF_F_REUSE_STACKID);
key.user_stack = stack_traces.get_stackid(