forked from rlane/ubpf
-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add instruction counter capability to test.c #83
Comments
sbates130272
added a commit
to sbates130272/ubpf
that referenced
this issue
Jul 19, 2021
Refactor code to add a ubpf_run function so it is easier to add instruction counting for both the VM and JIT cases. The counting itself will be added in the next few patches. Fixes iovisor#83.
sbates130272
added a commit
to sbates130272/ubpf
that referenced
this issue
Jul 21, 2021
Refactor code to add a ubpf_run function so it is easier to add instruction counting for both the VM and JIT cases. The counting itself will be added in the next few patches. Fixes iovisor#83.
sbates130272
added a commit
to sbates130272/ubpf
that referenced
this issue
Jul 22, 2021
Add a new struct that can carry information about the various types of instruction counting we wish to perform. In order to count the instructions executed on the underlying bare-metal machine we leverage the perf_event framework (Linux only). This uses ioctls to initialize and then measure the relevant counters to ascertain how many instrucitons have been executing on the CPU. Note that access to these counters requires elevated privileges so that may limit who can run the program in this mode. Fixes iovisor#83.
sbates130272
added a commit
to sbates130272/ubpf
that referenced
this issue
Jul 22, 2021
Add a new struct that can carry information about the various types of instruction counting we wish to perform. In order to count the instructions executed on the underlying bare-metal machine we leverage the perf_event framework (Linux only). This uses ioctls to initialize and then measure the relevant counters to ascertain how many instrucitons have been executing on the CPU. Note that access to these counters requires elevated privileges so that may limit who can run the program in this mode. Fixes iovisor#83.
sbates130272
added a commit
to sbates130272/ubpf
that referenced
this issue
Jul 28, 2021
Add a new struct that can carry information about the various types of instruction counting we wish to perform. Embed this struct into the struct vm so it can be enabled without changing the prototypes for _exec etc. Add an set function so library users can triggerenable instruction counting and get results. In order to count the instructions executed on the underlying bare-metal machine we leverage the perf_event framework (Linux only). This uses ioctls to initialize and then measure the relevant counters to ascertain how many instrucitons have been executing on the CPU. Note that access to these counters requires elevated privileges so that may limit who can run the program in this mode. Fixes iovisor#83.
sbates130272
added a commit
to sbates130272/ubpf
that referenced
this issue
Jul 29, 2021
Add a new struct that can carry information about the various types of instruction counting we wish to perform. Embed this struct into the struct vm so it can be enabled without changing the prototypes for _exec etc. Add an set function so library users can enable instruction counting and get results. In order to count the instructions executed on the underlying bare-metal machine we leverage the perf_event framework (Linux only). This uses ioctls to initialize and then measure the relevant counters to ascertain how many instructions have been executing on the CPU. Note that access to these counters requires elevated privileges so that may limit who can run the program in this mode. Fixes iovisor#83.
sbates130272
added a commit
to sbates130272/ubpf
that referenced
this issue
Aug 5, 2021
Add a new struct that can carry information about the various types of instruction counting we wish to perform. Embed this struct into the struct vm so it can be enabled without changing the prototypes for _exec etc. Add an set function so library users can enable instruction counting and get results. In order to count the instructions executed on the underlying bare-metal machine we leverage the perf_event framework (Linux only). This uses ioctls to initialize and then measure the relevant counters to ascertain how many instructions have been executing on the CPU. Note that access to these counters requires elevated privileges so that may limit who can run the program in this mode. Fixes iovisor#83.
sbates130272
added a commit
to sbates130272/ubpf
that referenced
this issue
Aug 5, 2021
Add a new struct that can carry information about the various types of instruction counting we wish to perform. Embed this struct into the struct vm so it can be enabled without changing the prototypes for _exec etc. Add an set function so library users can enable instruction counting and get results. In order to count the instructions executed on the underlying bare-metal machine we leverage the perf_event framework (Linux only). This uses ioctls to initialize and then measure the relevant counters to ascertain how many instructions have been executing on the CPU. Note that access to these counters requires elevated privileges so that may limit who can run the program in this mode. Fixes iovisor#83.
sbates130272
added a commit
to sbates130272/ubpf
that referenced
this issue
Aug 5, 2021
Add a new struct that can carry information about the various types of instruction counting we wish to perform. Embed this struct into the struct vm so it can be enabled without changing the prototypes for _exec etc. Add an set function so library users can enable instruction counting and get results. In order to count the instructions executed on the underlying bare-metal machine we leverage the perf_event framework (Linux only). This uses ioctls to initialize and then measure the relevant counters to ascertain how many instructions have been executing on the CPU. Note that access to these counters requires elevated privileges so that may limit who can run the program in this mode. Fixes iovisor#83.
sbates130272
added a commit
to sbates130272/ubpf
that referenced
this issue
Aug 5, 2021
Add a new struct that can carry information about the various types of instruction counting we wish to perform. Embed this struct into the struct vm so it can be enabled without changing the prototypes for _exec etc. Add an set function so library users can enable instruction counting and get results. In order to count the instructions executed on the underlying bare-metal machine we leverage the perf_event framework (Linux only). This uses ioctls to initialize and then measure the relevant counters to ascertain how many instructions have been executing on the CPU. Note that access to these counters requires elevated privileges so that may limit who can run the program in this mode. Fixes iovisor#83.
sbates130272
added a commit
to sbates130272/ubpf
that referenced
this issue
Aug 5, 2021
Add a new struct that can carry information about the various types of instruction counting we wish to perform. Embed this struct into the struct vm so it can be enabled without changing the prototypes for _exec etc. Add an set function so library users can enable instruction counting and get results. In order to count the instructions executed on the underlying bare-metal machine we leverage the perf_event framework (Linux only). This uses ioctls to initialize and then measure the relevant counters to ascertain how many instructions have been executing on the CPU. Note that access to these counters requires elevated privileges so that may limit who can run the program in this mode. Fixes iovisor#83.
sbates130272
added a commit
to sbates130272/ubpf
that referenced
this issue
Sep 8, 2021
Add a new struct that can carry information about the various types of instruction counting we wish to perform. Embed this struct into the struct vm so it can be enabled without changing the prototypes for _exec etc. Add an set function so library users can enable instruction counting and get results. In order to count the instructions executed on the underlying bare-metal machine we leverage the perf_event framework (Linux only). This uses ioctls to initialize and then measure the relevant counters to ascertain how many instructions have been executing on the CPU. Note that access to these counters requires elevated privileges so that may limit who can run the program in this mode. Fixes iovisor#83.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When benchmarking eBPF programs it is useful to have the test program output the number of eBPF instructions executed as well as the total number of instructions needed to run the VM (or the JIT when appropriate).
I'll take a stab at this and do a PR for it if I get something working that I like.
The text was updated successfully, but these errors were encountered: