# Does \`-O3\` affect heaptrack analysis?

**URL:** <https://discuss.kde.org/t/does-o3-affect-heaptrack-analysis/29323>\
**Category:** Help\
**Tags:** heaptrack\
**Created:** [February 6, 2025, 6:55am UTC](https://discuss.kde.org/t/does-o3-affect-heaptrack-analysis/29323 "2025-02-06T06:55:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shynur](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/shynur/32/18136_2.png) [@shynur](https://discuss.kde.org/u/shynur)\
**Post date:** [February 6, 2025, 6:55am UTC](https://discuss.kde.org/t/does-o3-affect-heaptrack-analysis/29323/1 "2025-02-06T06:55:47Z")

</div>

I hope to optimize the program as much as possible while ensuring that the analysis in Heaptrack is as thorough and accurate as possible.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![meven](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/meven/32/1748_2.png) [@meven](https://discuss.kde.org/u/meven)\
**Post date:** [February 6, 2025, 10:10am UTC](https://discuss.kde.org/t/does-o3-affect-heaptrack-analysis/29323/2 "2025-02-06T10:10:48Z")

</div>

It will affect it but not significantly, the debug symbols are the most important part to keep, -03 might not include them but you can include them explicitly then.  
Allocations can’t be hidden/removed by the compiler easily.

I think that’s the default compilation option for kde-builder, release with debug symbols.
