Use Streamline to profile an in-tree kernel driver

Profiling in-tree drivers follows almost the same process as profiling an out-of-tree kernel module. The steps include:

  • Transferring gator to the target device using scp

  • Launching Streamline, selecting TCP view, and entering the target’s IP or hostname

  • Setting up counters and enabling Event-Based Sampling (EBS)

The main difference is that, instead of adding the kernel module’s object file as the capture image in Capture settings, you use the Linux ELF file (vmlinux) generated by Buildroot.

Image Alt Text:Streamline Capture settings dialog showing vmlinux selected as the capture image. The dialog displays fields for selecting the capture image, with vmlinux highlighted, and options for configuring counters and event-based sampling. The interface uses a neutral, technical design typical of profiling tools. The wider environment includes other Streamline configuration tabs and settings. Visible text includes Capture settings, Capture image, and vmlinux. alt-text Streamline Capture settings dialog showing vmlinux selected as the capture image

After you select vmlinux as the capture image in the Capture settings dialog, select Save to apply your changes.

Now, start the capture session. Streamline collects profiling data from the in-tree kernel driver and the rest of the kernel. When the capture completes, analyze the results using the same workflow as before.

You can review function-level metrics, explore call paths, and identify performance hotspots within both your driver and the kernel. Image Alt Text:Streamline function tab displaying profiling data for vmlinux. The main area shows a list of kernel functions with columns for metrics such as sample count and percentage of total samples. The function names are clearly listed, and the selected function is highlighted. The interface uses a neutral, technical design typical of performance profiling tools. Visible text includes Function, Sample Count, and Percentage. The wider environment includes other Streamline tabs and configuration options, reinforcing a focused, analytical workflow. alt-text Streamline function tab displaying profiling data for vmlinux

Because you selected the vmlinux image, Streamline displays both your driver functions and all other kernel functions sampled during profiling. This lets you see how your driver interacts with the rest of the kernel.

You can also explore the complete call path for any sampled function. This helps you understand how execution flows through your driver and the kernel, making it easier to identify performance bottlenecks or unexpected behavior. Image Alt Text:Streamline call paths tab displaying hierarchical call stack data for vmlinux. The main section shows a tree view of kernel function calls, with each function indented to indicate its position in the call hierarchy. Columns display metrics such as sample count and percentage of total samples for each function. The selected function is highlighted, and the interface uses a neutral, technical design typical of performance profiling tools. Visible text includes Call Paths, Sample Count, and Percentage. The wider environment features other Streamline tabs and configuration options, supporting a focused, analytical workflow. alt-text Streamline call paths tab displaying hierarchical call stack data for vmlinux

Back
Next