Profiling on Espressif MCUs woes

Bryght-Richard
Posts: 54
Joined: Thu Feb 22, 2024 3:59 pm

Re: Profiling on Espressif MCUs woes

Postby Bryght-Richard » Fri Aug 02, 2024 4:23 pm

I found Espressif's gprof. Changing the default is easy, but combining multiple text sections is more complicated, but should be doable by merging the symbol sets using BFD.

Bryght-Richard
Posts: 54
Joined: Thu Feb 22, 2024 3:59 pm

Re: Profiling on Espressif MCUs woes

Postby Bryght-Richard » Tue Aug 13, 2024 3:24 pm

Cleaned up patches for upstream OpenOCD available here, could use reviewers and testers for ESP32 and ESP32-S2.

realfast
Posts: 1
Joined: Sat Dec 09, 2023 1:06 pm

Re: Profiling on Espressif MCUs woes

Postby realfast » Mon Dec 02, 2024 2:23 am

Can you provide a prebuilt windows binary? I delved into the mingw stuff for openocd and it just started opening other cans of worms. Id be happy to test if there was a prebuilt executable.

Bryght-Richard
Posts: 54
Joined: Thu Feb 22, 2024 3:59 pm

Re: Profiling on Espressif MCUs woes

Postby Bryght-Richard » Fri Dec 06, 2024 4:39 pm

Sorry @realfast, I messed up my ESP-CMD install once installing mingw, so I'm not going to build from source on this machine. I've been using Debian on an old ThinkPad to record my profiles.

Also, there's also some ongoing work in this commit stack to improve OpenOCD's profile writing capabilities to support sparse memory map systems like the ESP32 family. Without that, the files written are too granular to tell what's going on. A temporary workaround is to set max_buckets to 256*1024*1024 in src/target/target.c .

Decryptor
Posts: 2
Joined: Sat Jan 04, 2025 6:33 pm

Re: Profiling on Espressif MCUs woes

Postby Decryptor » Mon Jan 06, 2025 11:21 pm

ESP_Sprite wrote:
Fri Aug 02, 2024 2:38 am
As far as I know, all Xtensa-based ESP32 chips should; the RiscV based ones probably have something similar somewhere. I'll point the tools team to your branch; it could be worth integrating into our official openocd branch.


What's the chance this gets pushed to mainline, especially bundled OCD? I am very interested in the orders of magnitude better performance.

Bryght-Richard
Posts: 54
Joined: Thu Feb 22, 2024 3:59 pm

Re: Profiling on Espressif MCUs woes

Postby Bryght-Richard » Mon Jan 20, 2025 5:10 pm

Decryptor wrote:
Mon Jan 06, 2025 11:21 pm
ESP_Sprite wrote:
Fri Aug 02, 2024 2:38 am
As far as I know, all Xtensa-based ESP32 chips should; the RiscV based ones probably have something similar somewhere. I'll point the tools team to your branch; it could be worth integrating into our official openocd branch.
What's the chance this gets pushed to mainline, especially bundled OCD? I am very interested in the orders of magnitude better performance.
First half(fast PC sampler) is merged to upstream OpenOCD. Second half is uploaded but unreviewed - feel free to review upstream :)

windows_air
Posts: 1
Joined: Sat Jan 25, 2025 2:43 am

Re: Profiling on Espressif MCUs woes

Postby windows_air » Sat Jan 25, 2025 2:48 am

realfast wrote:
Mon Dec 02, 2024 2:23 am
Can you provide a prebuilt windows binary? I delved into the mingw stuff for openocd and it just started opening other cans of worms. Id be happy to test if there was a prebuilt executable.
You can use github action to build openocd online.

Here's a pre-built image if anyone needs it.
https://github.com/windowsair/openocd-e ... 2946189634

Who is online

Users browsing this forum: sazanof and 75 guests