Take name of called function in eBPF
up vote
0
down vote
favorite
I'd like to trace functions of the particular PID and collect some stats (total calls, total times, etc.), and it's not completely clear for me how to create BPF_HASH with pairs of funcname+my_struct.
Is there any way to obtain names of called functions in BPF program?
I suppose I should read IP register using "PT_REGS_IP(ctx)" but I don't completely understand how translate the value to human-readable string.
At the moment BPF program looks in the following way:
#include <uapi/linux/ptrace.h>
#include <linux/sched.h>
struct data_t {
u32 pid;
u64 delta;
u64 start;
} __attribute__((packed));
BPF_HASH(faddr, u64, struct data_t);
BPF_PERF_OUTPUT(events);
int do_entry(struct pt_regs *ctx) {
struct data_t *data;
data->start = bpf_ktime_get_ns();
u64 ip = PT_REGS_IP(ctx);
faddr.update(&ip, data);
return 0;
}
int do_return(struct pt_regs *ctx) {
struct data_t *data;
u64 ip = PT_REGS_IP(ctx);
data = faddr.lookup(&ip);
if (data->start == 0)
return 0; // missed start
data->delta = bpf_ktime_get_ns() - data->start;
data->pid = bpf_get_current_pid_tgid();
events.perf_submit(ctx, &data, sizeof(data));
faddr.delete(&ip);
return 0;
}
But at startup I got:
error: <unknown>:0:0: in function do_entry i32 (%struct.pt_regs*): A call to built-in function 'abort' is not supported.
trace bpf
add a comment |
up vote
0
down vote
favorite
I'd like to trace functions of the particular PID and collect some stats (total calls, total times, etc.), and it's not completely clear for me how to create BPF_HASH with pairs of funcname+my_struct.
Is there any way to obtain names of called functions in BPF program?
I suppose I should read IP register using "PT_REGS_IP(ctx)" but I don't completely understand how translate the value to human-readable string.
At the moment BPF program looks in the following way:
#include <uapi/linux/ptrace.h>
#include <linux/sched.h>
struct data_t {
u32 pid;
u64 delta;
u64 start;
} __attribute__((packed));
BPF_HASH(faddr, u64, struct data_t);
BPF_PERF_OUTPUT(events);
int do_entry(struct pt_regs *ctx) {
struct data_t *data;
data->start = bpf_ktime_get_ns();
u64 ip = PT_REGS_IP(ctx);
faddr.update(&ip, data);
return 0;
}
int do_return(struct pt_regs *ctx) {
struct data_t *data;
u64 ip = PT_REGS_IP(ctx);
data = faddr.lookup(&ip);
if (data->start == 0)
return 0; // missed start
data->delta = bpf_ktime_get_ns() - data->start;
data->pid = bpf_get_current_pid_tgid();
events.perf_submit(ctx, &data, sizeof(data));
faddr.delete(&ip);
return 0;
}
But at startup I got:
error: <unknown>:0:0: in function do_entry i32 (%struct.pt_regs*): A call to built-in function 'abort' is not supported.
trace bpf
Could you please provide the commands you use to compile, then load and attach your program as well?
– Qeole
Nov 19 at 17:26
Sorry for incompleteness. The full code examples can be found in my previous question, there example of traced C program and example of main Go program. C program should be compiled with debug symbols (gcc -g), go program compiled with defaults (go build)
– lesovsky
Nov 20 at 5:20
1
It's best if you can provide a minimal, reproducible example program in each question, even if that means having some duplicate content between questions. The userspace code is necessary to run your BPF program and someone who wants to reproduce may not have read your previous question.
– pchaigno
Nov 20 at 16:11
ok, will do in next questions.
– lesovsky
Nov 21 at 5:25
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'd like to trace functions of the particular PID and collect some stats (total calls, total times, etc.), and it's not completely clear for me how to create BPF_HASH with pairs of funcname+my_struct.
Is there any way to obtain names of called functions in BPF program?
I suppose I should read IP register using "PT_REGS_IP(ctx)" but I don't completely understand how translate the value to human-readable string.
At the moment BPF program looks in the following way:
#include <uapi/linux/ptrace.h>
#include <linux/sched.h>
struct data_t {
u32 pid;
u64 delta;
u64 start;
} __attribute__((packed));
BPF_HASH(faddr, u64, struct data_t);
BPF_PERF_OUTPUT(events);
int do_entry(struct pt_regs *ctx) {
struct data_t *data;
data->start = bpf_ktime_get_ns();
u64 ip = PT_REGS_IP(ctx);
faddr.update(&ip, data);
return 0;
}
int do_return(struct pt_regs *ctx) {
struct data_t *data;
u64 ip = PT_REGS_IP(ctx);
data = faddr.lookup(&ip);
if (data->start == 0)
return 0; // missed start
data->delta = bpf_ktime_get_ns() - data->start;
data->pid = bpf_get_current_pid_tgid();
events.perf_submit(ctx, &data, sizeof(data));
faddr.delete(&ip);
return 0;
}
But at startup I got:
error: <unknown>:0:0: in function do_entry i32 (%struct.pt_regs*): A call to built-in function 'abort' is not supported.
trace bpf
I'd like to trace functions of the particular PID and collect some stats (total calls, total times, etc.), and it's not completely clear for me how to create BPF_HASH with pairs of funcname+my_struct.
Is there any way to obtain names of called functions in BPF program?
I suppose I should read IP register using "PT_REGS_IP(ctx)" but I don't completely understand how translate the value to human-readable string.
At the moment BPF program looks in the following way:
#include <uapi/linux/ptrace.h>
#include <linux/sched.h>
struct data_t {
u32 pid;
u64 delta;
u64 start;
} __attribute__((packed));
BPF_HASH(faddr, u64, struct data_t);
BPF_PERF_OUTPUT(events);
int do_entry(struct pt_regs *ctx) {
struct data_t *data;
data->start = bpf_ktime_get_ns();
u64 ip = PT_REGS_IP(ctx);
faddr.update(&ip, data);
return 0;
}
int do_return(struct pt_regs *ctx) {
struct data_t *data;
u64 ip = PT_REGS_IP(ctx);
data = faddr.lookup(&ip);
if (data->start == 0)
return 0; // missed start
data->delta = bpf_ktime_get_ns() - data->start;
data->pid = bpf_get_current_pid_tgid();
events.perf_submit(ctx, &data, sizeof(data));
faddr.delete(&ip);
return 0;
}
But at startup I got:
error: <unknown>:0:0: in function do_entry i32 (%struct.pt_regs*): A call to built-in function 'abort' is not supported.
trace bpf
trace bpf
asked Nov 19 at 11:43
lesovsky
276
276
Could you please provide the commands you use to compile, then load and attach your program as well?
– Qeole
Nov 19 at 17:26
Sorry for incompleteness. The full code examples can be found in my previous question, there example of traced C program and example of main Go program. C program should be compiled with debug symbols (gcc -g), go program compiled with defaults (go build)
– lesovsky
Nov 20 at 5:20
1
It's best if you can provide a minimal, reproducible example program in each question, even if that means having some duplicate content between questions. The userspace code is necessary to run your BPF program and someone who wants to reproduce may not have read your previous question.
– pchaigno
Nov 20 at 16:11
ok, will do in next questions.
– lesovsky
Nov 21 at 5:25
add a comment |
Could you please provide the commands you use to compile, then load and attach your program as well?
– Qeole
Nov 19 at 17:26
Sorry for incompleteness. The full code examples can be found in my previous question, there example of traced C program and example of main Go program. C program should be compiled with debug symbols (gcc -g), go program compiled with defaults (go build)
– lesovsky
Nov 20 at 5:20
1
It's best if you can provide a minimal, reproducible example program in each question, even if that means having some duplicate content between questions. The userspace code is necessary to run your BPF program and someone who wants to reproduce may not have read your previous question.
– pchaigno
Nov 20 at 16:11
ok, will do in next questions.
– lesovsky
Nov 21 at 5:25
Could you please provide the commands you use to compile, then load and attach your program as well?
– Qeole
Nov 19 at 17:26
Could you please provide the commands you use to compile, then load and attach your program as well?
– Qeole
Nov 19 at 17:26
Sorry for incompleteness. The full code examples can be found in my previous question, there example of traced C program and example of main Go program. C program should be compiled with debug symbols (gcc -g), go program compiled with defaults (go build)
– lesovsky
Nov 20 at 5:20
Sorry for incompleteness. The full code examples can be found in my previous question, there example of traced C program and example of main Go program. C program should be compiled with debug symbols (gcc -g), go program compiled with defaults (go build)
– lesovsky
Nov 20 at 5:20
1
1
It's best if you can provide a minimal, reproducible example program in each question, even if that means having some duplicate content between questions. The userspace code is necessary to run your BPF program and someone who wants to reproduce may not have read your previous question.
– pchaigno
Nov 20 at 16:11
It's best if you can provide a minimal, reproducible example program in each question, even if that means having some duplicate content between questions. The userspace code is necessary to run your BPF program and someone who wants to reproduce may not have read your previous question.
– pchaigno
Nov 20 at 16:11
ok, will do in next questions.
– lesovsky
Nov 21 at 5:25
ok, will do in next questions.
– lesovsky
Nov 21 at 5:25
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
You have an error in your do_entry function. You're trying to dereference a null pointer:
struct data_t *data;
data->start = bpf_ktime_get_ns();
The following should work better:
int do_entry(struct pt_regs *ctx) {
struct data_t data = {}; // initializes data with zeros.
data.start = bpf_ktime_get_ns();
u64 ip = PT_REGS_IP(ctx);
faddr.update(&ip, &data);
return 0;
}
I don't understand why the error message mentions abort though. I'll ask around.
How to translate memory addresses to function names will depend on the userspace library you're using. If you're using bcc, there's a ksym method you can use. I don't know if there's an equivalent in gobpf.
You have at least one other error, in do_return:
data = faddr.lookup(&ip);
if (data->start == 0)
return 0; // missed start
You will need to check data is not null before dereferencing it. Otherwise, the verifier will reject your program.
data = faddr.lookup(&ip);
if (!data || data->start == 0)
return 0; // missed start
I've replaced pointer to variable and fix mistake in do_return(), but got something strange that I haven't seen before:$ go build timings.go $ sudo ./timings bpf: Failed to load program: Permission denied 0: (bf) r6 = r1 1: (79) r1 = *(u64 *)(r6 +128) 2: (7b) *(u64 *)(r10 -16) = r1 3: (18) r1 = 0xffff8fcad7999800 ... a lot of similar messages here ... 96: (b7) r5 = 8 97: (85) call bpf_perf_event_output#25 invalid indirect read from stack off -8+0 size 8 Failed to load do_return: error loading BPF program: permission denied
– lesovsky
Nov 20 at 5:19
error affected byameba_events.perf_submit(ctx, &data, sizeof(data));
– lesovsky
Nov 20 at 5:31
changing it toameba_events.perf_submit(ctx, data, sizeof(data));fixes it.
– lesovsky
Nov 20 at 5:38
anyway, reading through PT_REGS_IP(ctx) in do_entry and do_return, returns different values and I can't use these values as key in BPF_HASH. Maybe is it possible to translate address into a function name inside the BPF program and use string as hash key?
– lesovsky
Nov 20 at 6:06
1
I'm not sure I see the issue with having several functions to trace. As long as you're sure thedo_returnis called right after thedo_entry, you can retrieve the IP value from the map without errors. Maybe we can discuss this with examples in a chat (IRC?) or in another SO question?
– pchaigno
Nov 21 at 9:17
|
show 3 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
You have an error in your do_entry function. You're trying to dereference a null pointer:
struct data_t *data;
data->start = bpf_ktime_get_ns();
The following should work better:
int do_entry(struct pt_regs *ctx) {
struct data_t data = {}; // initializes data with zeros.
data.start = bpf_ktime_get_ns();
u64 ip = PT_REGS_IP(ctx);
faddr.update(&ip, &data);
return 0;
}
I don't understand why the error message mentions abort though. I'll ask around.
How to translate memory addresses to function names will depend on the userspace library you're using. If you're using bcc, there's a ksym method you can use. I don't know if there's an equivalent in gobpf.
You have at least one other error, in do_return:
data = faddr.lookup(&ip);
if (data->start == 0)
return 0; // missed start
You will need to check data is not null before dereferencing it. Otherwise, the verifier will reject your program.
data = faddr.lookup(&ip);
if (!data || data->start == 0)
return 0; // missed start
I've replaced pointer to variable and fix mistake in do_return(), but got something strange that I haven't seen before:$ go build timings.go $ sudo ./timings bpf: Failed to load program: Permission denied 0: (bf) r6 = r1 1: (79) r1 = *(u64 *)(r6 +128) 2: (7b) *(u64 *)(r10 -16) = r1 3: (18) r1 = 0xffff8fcad7999800 ... a lot of similar messages here ... 96: (b7) r5 = 8 97: (85) call bpf_perf_event_output#25 invalid indirect read from stack off -8+0 size 8 Failed to load do_return: error loading BPF program: permission denied
– lesovsky
Nov 20 at 5:19
error affected byameba_events.perf_submit(ctx, &data, sizeof(data));
– lesovsky
Nov 20 at 5:31
changing it toameba_events.perf_submit(ctx, data, sizeof(data));fixes it.
– lesovsky
Nov 20 at 5:38
anyway, reading through PT_REGS_IP(ctx) in do_entry and do_return, returns different values and I can't use these values as key in BPF_HASH. Maybe is it possible to translate address into a function name inside the BPF program and use string as hash key?
– lesovsky
Nov 20 at 6:06
1
I'm not sure I see the issue with having several functions to trace. As long as you're sure thedo_returnis called right after thedo_entry, you can retrieve the IP value from the map without errors. Maybe we can discuss this with examples in a chat (IRC?) or in another SO question?
– pchaigno
Nov 21 at 9:17
|
show 3 more comments
up vote
2
down vote
You have an error in your do_entry function. You're trying to dereference a null pointer:
struct data_t *data;
data->start = bpf_ktime_get_ns();
The following should work better:
int do_entry(struct pt_regs *ctx) {
struct data_t data = {}; // initializes data with zeros.
data.start = bpf_ktime_get_ns();
u64 ip = PT_REGS_IP(ctx);
faddr.update(&ip, &data);
return 0;
}
I don't understand why the error message mentions abort though. I'll ask around.
How to translate memory addresses to function names will depend on the userspace library you're using. If you're using bcc, there's a ksym method you can use. I don't know if there's an equivalent in gobpf.
You have at least one other error, in do_return:
data = faddr.lookup(&ip);
if (data->start == 0)
return 0; // missed start
You will need to check data is not null before dereferencing it. Otherwise, the verifier will reject your program.
data = faddr.lookup(&ip);
if (!data || data->start == 0)
return 0; // missed start
I've replaced pointer to variable and fix mistake in do_return(), but got something strange that I haven't seen before:$ go build timings.go $ sudo ./timings bpf: Failed to load program: Permission denied 0: (bf) r6 = r1 1: (79) r1 = *(u64 *)(r6 +128) 2: (7b) *(u64 *)(r10 -16) = r1 3: (18) r1 = 0xffff8fcad7999800 ... a lot of similar messages here ... 96: (b7) r5 = 8 97: (85) call bpf_perf_event_output#25 invalid indirect read from stack off -8+0 size 8 Failed to load do_return: error loading BPF program: permission denied
– lesovsky
Nov 20 at 5:19
error affected byameba_events.perf_submit(ctx, &data, sizeof(data));
– lesovsky
Nov 20 at 5:31
changing it toameba_events.perf_submit(ctx, data, sizeof(data));fixes it.
– lesovsky
Nov 20 at 5:38
anyway, reading through PT_REGS_IP(ctx) in do_entry and do_return, returns different values and I can't use these values as key in BPF_HASH. Maybe is it possible to translate address into a function name inside the BPF program and use string as hash key?
– lesovsky
Nov 20 at 6:06
1
I'm not sure I see the issue with having several functions to trace. As long as you're sure thedo_returnis called right after thedo_entry, you can retrieve the IP value from the map without errors. Maybe we can discuss this with examples in a chat (IRC?) or in another SO question?
– pchaigno
Nov 21 at 9:17
|
show 3 more comments
up vote
2
down vote
up vote
2
down vote
You have an error in your do_entry function. You're trying to dereference a null pointer:
struct data_t *data;
data->start = bpf_ktime_get_ns();
The following should work better:
int do_entry(struct pt_regs *ctx) {
struct data_t data = {}; // initializes data with zeros.
data.start = bpf_ktime_get_ns();
u64 ip = PT_REGS_IP(ctx);
faddr.update(&ip, &data);
return 0;
}
I don't understand why the error message mentions abort though. I'll ask around.
How to translate memory addresses to function names will depend on the userspace library you're using. If you're using bcc, there's a ksym method you can use. I don't know if there's an equivalent in gobpf.
You have at least one other error, in do_return:
data = faddr.lookup(&ip);
if (data->start == 0)
return 0; // missed start
You will need to check data is not null before dereferencing it. Otherwise, the verifier will reject your program.
data = faddr.lookup(&ip);
if (!data || data->start == 0)
return 0; // missed start
You have an error in your do_entry function. You're trying to dereference a null pointer:
struct data_t *data;
data->start = bpf_ktime_get_ns();
The following should work better:
int do_entry(struct pt_regs *ctx) {
struct data_t data = {}; // initializes data with zeros.
data.start = bpf_ktime_get_ns();
u64 ip = PT_REGS_IP(ctx);
faddr.update(&ip, &data);
return 0;
}
I don't understand why the error message mentions abort though. I'll ask around.
How to translate memory addresses to function names will depend on the userspace library you're using. If you're using bcc, there's a ksym method you can use. I don't know if there's an equivalent in gobpf.
You have at least one other error, in do_return:
data = faddr.lookup(&ip);
if (data->start == 0)
return 0; // missed start
You will need to check data is not null before dereferencing it. Otherwise, the verifier will reject your program.
data = faddr.lookup(&ip);
if (!data || data->start == 0)
return 0; // missed start
answered Nov 19 at 21:45
pchaigno
3,4501926
3,4501926
I've replaced pointer to variable and fix mistake in do_return(), but got something strange that I haven't seen before:$ go build timings.go $ sudo ./timings bpf: Failed to load program: Permission denied 0: (bf) r6 = r1 1: (79) r1 = *(u64 *)(r6 +128) 2: (7b) *(u64 *)(r10 -16) = r1 3: (18) r1 = 0xffff8fcad7999800 ... a lot of similar messages here ... 96: (b7) r5 = 8 97: (85) call bpf_perf_event_output#25 invalid indirect read from stack off -8+0 size 8 Failed to load do_return: error loading BPF program: permission denied
– lesovsky
Nov 20 at 5:19
error affected byameba_events.perf_submit(ctx, &data, sizeof(data));
– lesovsky
Nov 20 at 5:31
changing it toameba_events.perf_submit(ctx, data, sizeof(data));fixes it.
– lesovsky
Nov 20 at 5:38
anyway, reading through PT_REGS_IP(ctx) in do_entry and do_return, returns different values and I can't use these values as key in BPF_HASH. Maybe is it possible to translate address into a function name inside the BPF program and use string as hash key?
– lesovsky
Nov 20 at 6:06
1
I'm not sure I see the issue with having several functions to trace. As long as you're sure thedo_returnis called right after thedo_entry, you can retrieve the IP value from the map without errors. Maybe we can discuss this with examples in a chat (IRC?) or in another SO question?
– pchaigno
Nov 21 at 9:17
|
show 3 more comments
I've replaced pointer to variable and fix mistake in do_return(), but got something strange that I haven't seen before:$ go build timings.go $ sudo ./timings bpf: Failed to load program: Permission denied 0: (bf) r6 = r1 1: (79) r1 = *(u64 *)(r6 +128) 2: (7b) *(u64 *)(r10 -16) = r1 3: (18) r1 = 0xffff8fcad7999800 ... a lot of similar messages here ... 96: (b7) r5 = 8 97: (85) call bpf_perf_event_output#25 invalid indirect read from stack off -8+0 size 8 Failed to load do_return: error loading BPF program: permission denied
– lesovsky
Nov 20 at 5:19
error affected byameba_events.perf_submit(ctx, &data, sizeof(data));
– lesovsky
Nov 20 at 5:31
changing it toameba_events.perf_submit(ctx, data, sizeof(data));fixes it.
– lesovsky
Nov 20 at 5:38
anyway, reading through PT_REGS_IP(ctx) in do_entry and do_return, returns different values and I can't use these values as key in BPF_HASH. Maybe is it possible to translate address into a function name inside the BPF program and use string as hash key?
– lesovsky
Nov 20 at 6:06
1
I'm not sure I see the issue with having several functions to trace. As long as you're sure thedo_returnis called right after thedo_entry, you can retrieve the IP value from the map without errors. Maybe we can discuss this with examples in a chat (IRC?) or in another SO question?
– pchaigno
Nov 21 at 9:17
I've replaced pointer to variable and fix mistake in do_return(), but got something strange that I haven't seen before:
$ go build timings.go $ sudo ./timings bpf: Failed to load program: Permission denied 0: (bf) r6 = r1 1: (79) r1 = *(u64 *)(r6 +128) 2: (7b) *(u64 *)(r10 -16) = r1 3: (18) r1 = 0xffff8fcad7999800 ... a lot of similar messages here ... 96: (b7) r5 = 8 97: (85) call bpf_perf_event_output#25 invalid indirect read from stack off -8+0 size 8 Failed to load do_return: error loading BPF program: permission denied– lesovsky
Nov 20 at 5:19
I've replaced pointer to variable and fix mistake in do_return(), but got something strange that I haven't seen before:
$ go build timings.go $ sudo ./timings bpf: Failed to load program: Permission denied 0: (bf) r6 = r1 1: (79) r1 = *(u64 *)(r6 +128) 2: (7b) *(u64 *)(r10 -16) = r1 3: (18) r1 = 0xffff8fcad7999800 ... a lot of similar messages here ... 96: (b7) r5 = 8 97: (85) call bpf_perf_event_output#25 invalid indirect read from stack off -8+0 size 8 Failed to load do_return: error loading BPF program: permission denied– lesovsky
Nov 20 at 5:19
error affected by
ameba_events.perf_submit(ctx, &data, sizeof(data));– lesovsky
Nov 20 at 5:31
error affected by
ameba_events.perf_submit(ctx, &data, sizeof(data));– lesovsky
Nov 20 at 5:31
changing it to
ameba_events.perf_submit(ctx, data, sizeof(data)); fixes it.– lesovsky
Nov 20 at 5:38
changing it to
ameba_events.perf_submit(ctx, data, sizeof(data)); fixes it.– lesovsky
Nov 20 at 5:38
anyway, reading through PT_REGS_IP(ctx) in do_entry and do_return, returns different values and I can't use these values as key in BPF_HASH. Maybe is it possible to translate address into a function name inside the BPF program and use string as hash key?
– lesovsky
Nov 20 at 6:06
anyway, reading through PT_REGS_IP(ctx) in do_entry and do_return, returns different values and I can't use these values as key in BPF_HASH. Maybe is it possible to translate address into a function name inside the BPF program and use string as hash key?
– lesovsky
Nov 20 at 6:06
1
1
I'm not sure I see the issue with having several functions to trace. As long as you're sure the
do_return is called right after the do_entry, you can retrieve the IP value from the map without errors. Maybe we can discuss this with examples in a chat (IRC?) or in another SO question?– pchaigno
Nov 21 at 9:17
I'm not sure I see the issue with having several functions to trace. As long as you're sure the
do_return is called right after the do_entry, you can retrieve the IP value from the map without errors. Maybe we can discuss this with examples in a chat (IRC?) or in another SO question?– pchaigno
Nov 21 at 9:17
|
show 3 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53373927%2ftake-name-of-called-function-in-ebpf%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Could you please provide the commands you use to compile, then load and attach your program as well?
– Qeole
Nov 19 at 17:26
Sorry for incompleteness. The full code examples can be found in my previous question, there example of traced C program and example of main Go program. C program should be compiled with debug symbols (gcc -g), go program compiled with defaults (go build)
– lesovsky
Nov 20 at 5:20
1
It's best if you can provide a minimal, reproducible example program in each question, even if that means having some duplicate content between questions. The userspace code is necessary to run your BPF program and someone who wants to reproduce may not have read your previous question.
– pchaigno
Nov 20 at 16:11
ok, will do in next questions.
– lesovsky
Nov 21 at 5:25