Ancestors

Written by Tobin Baker on 2024-08-24 at 01:55

only now appreciating this wisdom

https://www.yosefk.com/blog/profiling-with-ctrl-c.html

=> View attached media

=> More informations about this toot | More toots from tobinbaker@discuss.systems

Written by andreaskem on 2024-08-24 at 07:51

@tobinbaker I just use a tool like eu-stack to dump the call stack of a process I am interested in. I just call it ten times in a row and if a function shows up multiple times, I take a look. That does not even take a minute. I do not even bother with a debugger.

=> More informations about this toot | More toots from andreaskem@hachyderm.io

Written by Tobin Baker on 2024-08-24 at 15:42

@andreaskem this little tool automates that for you nicely: https://github.com/jasonrohrer/wallClockProfiler

=> More informations about this toot | More toots from tobinbaker@discuss.systems

Written by andreaskem on 2024-08-24 at 15:53

@tobinbaker That is kind of cool but that almost looks like a proper profiler ;) I like the personal touch of doing "UpArrow", "Enter" a few times and then eyeballing the result. For something that requires a softer touch, there's still perf, at least on Linux.

=> More informations about this toot | More toots from andreaskem@hachyderm.io

Toot

Written by Tobin Baker on 2024-08-24 at 16:10

@andreaskem Except that I still haven't found a way to tell perf to just sample all stacks whether on- or off-CPU. You can of course tell it to record scheduler events but that doesn't directly tell you how long an off-CPU stack was blocking.

=> More informations about this toot | More toots from tobinbaker@discuss.systems

Descendants

Written by andreaskem on 2024-08-24 at 16:30

@tobinbaker Yeah, I mostly need to figure out where CPU time is spent. You are probably aware of Brendan Gregg? If not, he writes about profiling on Linux. On his site, there is a perf example for off-CPU tracing but it is quite complicated. Nowadays, eBPF seems to be preferred for stuff like that:

https://www.brendangregg.com/blog/2015-02-26/linux-perf-off-cpu-flame-graph.html

https://www.brendangregg.com/offcpuanalysis.html

=> More informations about this toot | More toots from andreaskem@hachyderm.io

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113017869967530910
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
293.799213 milliseconds
Gemini-to-HTML Time
1.737948 milliseconds

This content has been proxied by September (3851b).