# [Profile the Linux kernel with Arm Streamline](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/streamline-kernel-module/)

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/streamline-kernel-module/)
- [Profile Linux kernel modules with Arm Streamline](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/streamline-kernel-module/1_overview/)
- [Set up your environment](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/streamline-kernel-module/2_build_kernel_image/)
- [Build the out-of-tree kernel module](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/streamline-kernel-module/3_oot_module/)
- [Profile the out-of-tree kernel module](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/streamline-kernel-module/4_sl_profile_oot/)
- [Integrate a custom character device driver into the Linux kernel](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/streamline-kernel-module/5_intree_kernel_driver/)
- [Profile the in-tree kernel driver](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/streamline-kernel-module/6_sl_profile_intree/)
- [Use Streamline with the Statistical Profiling Extension](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/streamline-kernel-module/7_sl_spe/)
- [Summary](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/streamline-kernel-module/8_summary/)
- [Next Steps](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/streamline-kernel-module/_next-steps/)

## About this Learning Path

| Skill level: | Advanced |
|--------------|----------|
| Reading time: | 1 hr |
| Last updated: | 14 Aug 2026 |

| Author: | Yahya Abouelseoud, Arm |
|----------|--------------------------|
| Arm IP: | [Cortex-A](https://support.arm.com/?tab=compute-ip&Product%20Type=Application%20Processors) |
| Tags: | Performance and Architecture, Linux, Arm Streamline, Arm Performance Studio, Linux kernel, Performance analysis |

### Who is this for?
This is an advanced topic for developers and performance engineers interested in profiling Linux kernel performance.

### What will you learn?
Upon completion of this Learning Path, you will be able to:
- Understand why profiling Linux kernel modules is important for performance and stability
- Set up and use Arm Streamline to profile the Linux kernel
- Profile both out-of-tree and in-tree kernel modules on Arm-based systems
- Analyze profiling data to find and address performance bottlenecks
- Use the Statistical Profiling Extension (SPE) for deeper kernel profiling insights

### Prerequisites
Before starting, you will need the following:
- Basic understanding of Linux kernel development and module programming
- Arm-based Linux target device (such as a Raspberry Pi, BeagleBone, or similar board) with Secure Shell (SSH) access
- A host machine that meets [Buildroot system requirements](https://buildroot.org/downloads/manual/manual.html#requirement)

### Summary
You’ll profile Linux kernel code on an Arm-based system with Arm Streamline. First, you’ll build and exercise a cache-unfriendly out-of-tree character-device module, then inspect CPU, cycle, memory, and cache metrics. Next, you’ll profile the driver in-tree with `vmlinux` symbols and, on supported targets, use SPE for deeper kernel analysis.

### Frequently asked questions

<details>
<summary>Which file should I add in Streamline to analyze an in-tree driver?</summary>
Add the kernel’s `vmlinux` file in the capture settings. Doing so enables analysis of function calls, call paths, and specific kernel code sections.
</details>

<details>
<summary>How do I know Streamline is capturing my out-of-tree module?</summary>
During the workload, expect samples attributed to your module’s functions. You should also see changes in metrics such as memory access and cache misses while the device is exercised.
</details>

<details>
<summary>What result should I expect when profiling the cache‑unfriendly module?</summary>
Streamline should show sampling activity during the device operations and elevated cache‑related metrics due to the column‑major traversal. Use these indicators to locate hotspots and costly memory access patterns.
</details>

<details>
<summary>Do I need to install the Buildroot dependencies on an AArch64 host?</summary>
Yes. Run the package installation on an AArch64-based Linux system before building.
</details>

<details>
<summary>When should I enable SPE in this workflow?</summary>
Use SPE when deeper kernel profiling insights are needed beyond regular sampling. The Learning Path introduces SPE on supported targets to extend kernel execution analysis.
</details>
