Conversation
Signed-off-by: MinhPhan8803 <nhatminhvinh8803@gmail.com>
Signed-off-by: MinhPhan8803 <nhatminhvinh8803@gmail.com>
Signed-off-by: MinhPhan8803 <nhatminhvinh8803@gmail.com>
Signed-off-by: MinhPhan8803 <nhatminhvinh8803@gmail.com>
Signed-off-by: MinhPhan8803 <nhatminhvinh8803@gmail.com>
Signed-off-by: MinhPhan8803 <nhatminhvinh8803@gmail.com>
|
this looks awesome! |
Signed-off-by: MinhPhan8803 <nhatminhvinh8803@gmail.com>
Signed-off-by: MinhPhan8803 <nhatminhvinh8803@gmail.com>
Signed-off-by: MinhPhan8803 <nhatminhvinh8803@gmail.com>
Signed-off-by: MinhPhan8803 <nhatminhvinh8803@gmail.com>
e648081 to
182bf51
Compare
rex-macros/src/kprobe.rs
Outdated
| format!("rex/kprobe/{}", self.function.as_ref().unwrap()) | ||
| format!("rex/{}/{}", flavor, self.function.as_ref().unwrap()) | ||
| } else { | ||
| "rex/kprobe".to_string() |
There was a problem hiding this comment.
This does not respect the kprobe flavor
There was a problem hiding this comment.
Probably we could put the flavor inside the KProbe struct
samples/harpoon/Cargo.toml
Outdated
| @@ -0,0 +1,31 @@ | |||
| [package] | |||
| name = "hello" | |||
There was a problem hiding this comment.
Just remember to change the sample name/metadata in all places.
rex-macros/src/kprobe.rs
Outdated
| format!("rex/kprobe/{}", self.function.as_ref().unwrap()) | ||
| format!("rex/{}/{}", flavor, self.function.as_ref().unwrap()) | ||
| } else { | ||
| "rex/kprobe".to_string() |
There was a problem hiding this comment.
Probably we could put the flavor inside the KProbe struct
| process.kill() | ||
| std_out, std_err = process.communicate(timeout=7) | ||
| re_match = re.findall( | ||
| r"bpf_trace_printk: Rust triggered from PID \d+ on CPU .+", std_out, re.M |
There was a problem hiding this comment.
will we have sanity test case for harpoon?
There was a problem hiding this comment.
Yes, but I haven't started working on the backend for the userspace app yet so I haven't really thought about what tests will look like.
…method to grab pointer from tp_ctx, fix KproveFlavor use, fix TaskStruct::get_comm use Signed-off-by: MinhPhan8803 <nhatminhvinh8803@gmail.com>
81d75ef to
30f8795
Compare
… app Signed-off-by: MinhPhan8803 <nhatminhvinh8803@gmail.com>
b451d02 to
6d23109
Compare
Signed-off-by: MinhPhan8803 <nhatminhvinh8803@gmail.com>
16729ef to
b665e07
Compare
|
Btw the commits are a mess right now. I will just reset all changes and redo the commits once this is done. |
b665e07 to
db99e10
Compare
Signed-off-by: MinhPhan8803 <nhatminhvinh8803@gmail.com>
db99e10 to
6590fae
Compare
You could try |
Currently WIP, not available to merge yet.
Add definition for
PerfEventArrayand its helper symbols. For thebpf_perf_event_outputsymbol specifically, currently only thebpf_perf_event_output_tpvariant is supported.Add the
StreamableProgramtrait that program types that can stream events throughPerfEventArrayshould implement. This allows unifying the various streaming symbols into a singleStreamableProgram::output_event()method in a manner similar to the overloaded helperbpf_perf_event_output().Add a
rex_uprobemacro and aKprobeFlavorenum inrex-macros/src/kprobe.rsto allow switching between kprobe variants inKProbe::expand().Misc changes:
TaskStruct::get_comm()now returns a direct reference to the program name as a&CStr.BPF_F_CURRENT_CPUconstant asCURRENT_CPU.