Bitcoin full node and query server

Jan 7, 2025

View in context in the libbitcoin Slack #general mirror.

pmienk19:36
@evoskuil ie --performance-analysis or some such
37 replies · evoskuil, pmienk, cguida · last Jan 08, 2025
evoskuil19:55
Yeah, pref shorter. The tool is called tracy, maybe --tracer. I'm not sure what works yet, but might be nice to pull and build it and just have it integrated into vscode ux.
pmienk19:56
maybe --with-tracy just to follow our dependency pattern? wouldn't really matter but then in the code the flag would be pretty clear and consistent
👍🏻 1
C
cguida19:57
yeah i could add a build option, that would work
pmienk19:58
in fact, like the optimizations, adding at system would propagate everywhere
evoskuil20:06
It's not a dependency though, it's a tool that's applied at the test or console project (I think). The VS profiling tools don't require any source instrumentation, but I think Tracy does require a symbol defined in the sources.
evoskuil20:07
We should prob validate the tool before integrating.
pmienk20:08
involves conditional includes
pmienk20:09
requires zones to be defined
pmienk20:09
"Add the macro ZoneScoped as the first line of your function definitions to include them in the profile"
pmienk20:09
doesn't give anything for free as far as i can tell
evoskuil20:10
Oooo, that's nuts.
evoskuil20:11
I read on it and I thought that they had said the instrumentation was one include and that's it.
pmienk20:11
woulda been nice if that were the case
evoskuil20:12
Adding a macro to every function is a ridiculous way to discover performance hotspots.
(edited)
evoskuil20:14
In the VS profiler it doesn't require a debug build, we can attach to the running process remotely, and there is no source instrumentation.
evoskuil20:15
Not sure how we'd do this.
pmienk20:15
sounds like its just gdb then - haven't used that in ages
evoskuil20:16
lolz
evoskuil20:19
I don't think that's capable of doing what we need.
evoskuil20:20
There's a good tool integrated with xcode. Otherwise this one is the only other I found outside of VS.
evoskuil20:34
Might need a tool to generate the macro insertions.
evoskuil20:35
It's hard to imagine however that this won't affect performance.
pmienk20:35
sed
evoskuil20:35
The tool to build the tool.
(edited)
C
cguida02:15
So I was just gonna go with this quickstart
Screenshot From 2025-01-07 12-56-00.png
C
cguida02:16
Then refine from there
(edited)
C
cguida02:16
I watched a bit of the video linked on their github and the guy does a whole walkthrough on it
C
cguida02:16
It looked like if you did it this "quick" way it would give you info about everything
C
cguida02:17
which would probably be a firehose
C
cguida02:20
https://libbitcoin.slack.com/archives/C6LH74ACQ/p1736282118292719?thread_ts=1736278617.939899&cid=C6LH74ACQ it definitely affects performance, but i think the idea is we wouldn't build it in unless the --with-tracy option were included it claims to be "low overhead" fwiw, but yeah this is a debugging tool
Eric Voskuil
It's hard to imagine however that this won't affect performance.
evoskuil02:26
As long as the effect on performance is proportional it's fine.
💯 1
evoskuil02:28
Above still shows explicitly instrumenting each individual function.
evoskuil02:28
Seems like that's where the work is going to be.
C
cguida02:32
Presumably I can just throw it in something super high-level like main() or something? Haha
evoskuil02:58
I'm guessing that will give main: 100%
evoskuil02:58
I may be mistaken. Hopefully
C
cguida02:59
haha guess we'll see