Skip to content

Commit

Permalink
tutorial_bcc_python_developer: Finish auto-generated update
Browse files Browse the repository at this point in the history
A sentence was leftover from before we could auto-generate the Python data structure.
  • Loading branch information
chrahunt authored and yonghong-song committed Apr 26, 2019
1 parent 33bffca commit 8463285
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions docs/tutorial_bcc_python_developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,10 @@ Things to learn:
1. ```bpf_get_current_comm()```: Populates the first argument address with the current process name.
1. ```events.perf_submit()```: Submit the event for user space to read via a perf ring buffer.
1. ```def print_event()```: Define a Python function that will handle reading events from the ```events``` stream.
1. ```b["events"].event(data)```: Now get the event as a Python object.
1. ```b["events"].event(data)```: Now get the event as a Python object, auto-generated from the C declaration.
1. ```b["events"].open_perf_buffer(print_event)```: Associate the Python ```print_event``` function with the ```events``` stream.
1. ```while 1: b.perf_buffer_poll()```: Block waiting for events.

This may be improved in future bcc versions. Eg, the Python data struct could be auto-generated from the C code.

### Lesson 8. sync_perf_output.py

Rewrite sync_timing.py, from a prior lesson, to use ```BPF_PERF_OUTPUT```.
Expand Down

0 comments on commit 8463285

Please sign in to comment.