Even though you can access the perf_events interface directly as in the preceding example, the recommended way to use it is through a user space application, such as perf, which we will see in the Tracing and profiling with perf recipe in this chapter.