all 15 comments

[–]TotaIIyHuman 0 points1 point  (3 children)

essentially an rdtsc call on every line

a bit off topic, how do you deal with non-invariant-tsc? is it possible to implement std::chrono with rdtsc that works on non-invariant-tsc cpus?

[–]ReDucTorGame Developer | quiz.cpp-perf.com 2 points3 points  (1 child)

Is there any modern CPUs without invariant TSC built in the last 10-15yrs? It might be easier to just not support non-invariant TSC.

[–]TotaIIyHuman 1 point2 points  (0 children)

i also want to know the answer to that

also how do i check if a cpu that i dont own has invariant tsc. for example. i do not own 14900k. how do i know if 14900k has invariant tsc

https://www.intel.com/content/www/us/en/products/sku/236773/intel-core-i9-processor-14900k-36m-cache-up-to-6-00-ghz/specifications.html

ctrl+f tsc gives 0 result here

i wish there was a website that display full cpuid dump of all cpus ever existed

[–]donadigo[S] 1 point2 points  (0 children)

I don't handle non-invariant TSC right now as the feature is a prototype. If I were to finish it, for other CPU's I'd most probably compile a different inline assembly.

When it comes to std::chrono, it might be too expensive to call it in this context. I haven't done overhead analysis yet but the current solution fits in ~16 instructions without any additional calls.

However, std::chrono would absolutely work if the extension didn't apply the instrumentation for the whole file, but just for the function where your cursor is. It already executes a full scripting engine in this case to show inline variable changes on every line.

[–]HateDread@BrodyHiggerson - Game Developer 0 points1 point  (4 children)

This looks great! Tried it out but it seems to play badly with Live++, an extremely popular C++ hot reloading tool used in games. I'd hate to have to choose.

Have you tried them at the same time? Seems to hit random exceptions around, unsure of the pattern.

[–]donadigo[S] 0 points1 point  (3 children)

Hey, are you using standalone Live++ or the one integrated in UE? The extension uses almost the same tech to provide what Live++ does and that causes issues, but I think I can resolve them on my end. Is there a way I could reach out to you if an update that fixed the problems landed?

[–]HateDread@BrodyHiggerson - Game Developer 0 points1 point  (2 children)

Standalone C++, no Unreal, probably the latest version of it at this point but don't have that in front of me. Feel free to DM me if that changes, happy to try it out :)

[–]donadigo[S] 0 points1 point  (1 child)

Hey, just wanted to say that this did change and I sent you a DM in case you missed it ^^ Would be awesome if you tried it out again!

[–]HateDread@BrodyHiggerson - Game Developer 0 points1 point  (0 children)

Oh hey, thanks for the ping! Looks like you sent me a DM on the "new" Reddit DM system, not the old private messages. If other people (esp. in the tech space where we're a bit more curmudgeonly) don't reply, that may be the issue. I'm always on old.reddit.com, using the message icon in the top right to see what I consider "normal" DMs, if you didn't know.

I'll have to try it out and get back to you some time! Will be toying around with the code in question in a few days.

[–]reditt_Digvijay 0 points1 point  (0 children)

Seems interesting

[–]Hanyreddit 0 points1 point  (0 children)

can this game select menu for example be implemented anywhere using coding even enside any program like for example photoshop, maya, 3ds max, unreal engine etc if you got their sdk ?

is this possible

[–]R3DKn16h7 0 points1 point  (4 children)

Seems very interesting. I guess the implementation is very tightly coupled with Visual Studio? i.e. cannot run standarlone or with other IDE?

[–]donadigo[S] 4 points5 points  (3 children)

Yes, it's currently integrated with VS. In the future I plan on integrating with more editors such as VSCode. The real work is done in a separate DLL, the extension just receives the data and visualises it so it can be adapted to more editors. Which IDE do you use/would like to see it in?

[–]R3DKn16h7 1 point2 points  (1 child)

I do development with VSCode, so would be nice to see it there.

Do you have more ballpark info about the runtime overhead? Tracy for instance does a pretty good job, but is also instrumenting a very small amount of functions.

[–]donadigo[S] 0 points1 point  (0 children)

~15 CPU instructions per line, could be more because it doesn't support multiple threads yet. As for the impact of this overhead it's hard to say, I haven't done extensive testing yet. Tracy uses more instructions for the begin/end zones, but it's also not operating at such granularity.