Skip to content

Commit bf4fa6f

Browse files
authored
[bootstrap] add some compile infomation (eunomia-bpf#64)
1 parent 4b55846 commit bf4fa6f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/11-bootstrap/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,7 @@ sudo dnf install clang elfutils-libelf elfutils-libelf-devel zlib-devel
602602
编译运行上述代码:
603603

604604
```console
605+
$ git submodule update --init --recursive
605606
$ make
606607
BPF .output/bootstrap.bpf.o
607608
GEN-SKEL .output/bootstrap.skel.h

src/11-bootstrap/README_en.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,9 @@ int handle_exec(struct trace_event_raw_sched_process_exec *ctx)
191191

192192
// ...
193193
}
194-
```Then, we reserve an event structure from the circular buffer map `rb` and fill in the relevant data, such as the process ID, parent process ID, and process name. Afterwards, we send this data to the user-mode program for processing.
194+
```
195+
196+
Then, we reserve an event structure from the circular buffer map `rb` and fill in the relevant data, such as the process ID, parent process ID, and process name. Afterwards, we send this data to the user-mode program for processing.
195197
196198
```c
197199
// reserve sample from BPF ringbuf
@@ -515,8 +517,9 @@ In the main() function, we first parse the command line arguments, and then set
515517
```c
516518
err = argp_parse(&argp, argc, argv, 0, NULL, NULL);
517519
if (err)
518-
return err;```c
520+
return err;
519521
libbpf_set_print(libbpf_print_fn);
522+
```
520523

521524
Next, we open the eBPF skeleton file, pass the minimum duration parameter to the eBPF program, and load and attach the eBPF program:
522525

@@ -597,6 +600,7 @@ sudo dnf install clang elfutils-libelf elfutils-libelf-devel zlib-devel
597600
Compile and run the above code:
598601

599602
```console
603+
$ git submodule update --init --recursive
600604
$ make
601605
BPF .output/bootstrap.bpf.o
602606
GEN-SKEL .output/bootstrap.skel.h

0 commit comments

Comments
 (0)