# Profiling root macro

**URL:** <https://root-forum.cern.ch/t/profiling-root-macro/49807>\
**Category:** ROOT\
**Created:** [May 1, 2022, 4:42pm UTC](https://root-forum.cern.ch/t/profiling-root-macro/49807 "2022-05-01T16:42:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrian\_sev](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/adrian_sev/32/13169_2.png) [@adrian\_sev](https://root-forum.cern.ch/u/adrian_sev)\
**Post date:** [May 1, 2022, 4:42pm UTC](https://root-forum.cern.ch/t/profiling-root-macro/49807/1 "2022-05-01T16:42:04Z")

</div>

Hi! What is the recommended procedure for profiling a ROOT macro (which use an aclic-ed library)?  
Can i just do valgrind --tool=callgrind root myMacro.C ?  
Thanks a lot!

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 1, 2022, 4:55pm UTC](https://root-forum.cern.ch/t/profiling-root-macro/49807/2 "2022-05-01T16:55:50Z")

</div>

[Valgrind and ROOT](https://root-forum.cern.ch/t/valgrind-and-root/28506)

---

<div class="post-metadata">

**Author:** ![adrian\_sev](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/adrian_sev/32/13169_2.png) [@adrian\_sev](https://root-forum.cern.ch/u/adrian_sev)\
**Post date:** [May 1, 2022, 5:10pm UTC](https://root-forum.cern.ch/t/profiling-root-macro/49807/3 "2022-05-01T17:10:48Z")

</div>

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![ferhue](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ferhue/32/29462_2.png) [@ferhue](https://root-forum.cern.ch/u/ferhue)\
**Post date:** [May 1, 2022, 5:59pm UTC](https://root-forum.cern.ch/t/profiling-root-macro/49807/4 "2022-05-01T17:59:29Z")

</div>

If you want a nice graphic interface to callgrind, take a look at [Profiling Function Execution | Qt Creator Manual](https://doc.qt.io/qtcreator/creator-cache-profiler.html)  
(and [Coding in ROOT with the horsepower of an F1 - ROOT](https://root.cern/blog/code-horsepower-f1/#performance-analysis)). Or directly kcachegrind.

Some alternatives with flame graphs would be: [Analyzing CPU Usage | Qt Creator Manual](https://doc.qt.io/qtcreator/creator-cpu-usage-analyzer.html) or [GitHub - KDAB/hotspot: The Linux perf GUI for performance analysis.](https://github.com/KDAB/hotspot)

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [May 15, 2022, 5:59pm UTC](https://root-forum.cern.ch/t/profiling-root-macro/49807/5 "2022-05-15T17:59:40Z")

</div>

Closed on May 15, 2022, 5:59pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
