[video output=day184 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Collating Debug Events" vod_platform=youtube id=YP9oNMb_VIg annotator=Miblo annotator=debiatan annotator=Kelimion]
[0:19]["We have all the code"][quote 228]
[0:25][Recap and plan for today]
[3:05][(Blackboard) Problems related to performance counter visualization]
[3:32][There's one straightforward approach to performance counter visualization that we could implement...]
[4:16][...but it poses some problems]
[5:11][We could sidestep the issue by building two separate views: one hierarchical, the other one a ranking of routines sorted by total decreasing execution time]
[8:40][Implementing DEBUGOverlay by writing the usage code first]
[9:15][Thinking aloud about the task]
[13:46][(Blackboard) We'll support the display of multithreaded routines by segmenting the bar charts into lanes]
[23:45][Figuring out the structures that will allow us to draw the charts]
[27:34][Testing the new code]
[27:50][Filling out the collation structures]
[28:39][We'll use an arena to collate the debug events and records...]
[31:28][...which means we'll be recollating all the data every frame]
[34:54][Testing that we are still running. The memory we'll use for collation should be in place now]
[35:01][Collating the debug information]
[39:53][(Blackboard) Which event arrays are we going to process?]
[40:56][][quote 229]
[41:07][Make CollateDebugRecords() loop over the debug event arrays from oldest to newest]
[43:51][Processing the debug event arrays]
[44:45][Multithreading and the possible lack of strict rdtsc serialization could interfere with the ordering of the events]
[45:16][We'll draw a new set of bars after each frame marker]
[49:25][We'll ignore all events preceding the first frame marker we encounter]
[50:20][Figuring out the relative clock of events inside a frame]
[52:18]["I liked how that completed to nothings"][quote 230]
[55:56][Q&A][:speech]
[56:57][@andsz_][You could have made your loop this way: for(u32 EventArrayIndex = InvalidEventArrayIndex + 1; EventArrayIndex != InvalidEventArrayIndex; EventArrayIndex = (EventArrayIndex + 1) % MAX_DEBUG_FRAME_COUNT) { ... }; Or did you want to save the modulo?]
[58:39][@ChronalDragon][Might not have a ton of on-topic questions. Chat was a bit... distracted]
[58:45][@elxenoaizd][What would be the most important things you'd look at when hiring a programmer? What type of questions would you ask? Does he have to have, like, 20+ years of experience?]
[1:00:54][@garryjohanson][Do you think you do not need to ever worry about modulus or divides anymore?]
[1:02:22][@quartertron][Which Linux debugger is closest to not sucking and what is it missing?]
[1:02:54][@OriginalName667][On a scale of 1 to Visual Studio, why is Emacs a 1 and when will you join the visual studio master race?]
[1:04:10][@diaboIix17][Sorry if this has been asked before, but what keyboard are you using?]
[1:04:59][@LewyLue][How did you get into Game Development?[ref
    site="Handmade Hero Episode Guide"
    page="Intro to C on Windows - Day 5 Q&A"
    url="https://hero.handmadedev.org/jace/videos/intro-to-c/day5qa.html"]]
[1:06:08][@Stephenlast][My girlfriend wanted to let you know that she has the same water bottle as you!]
[1:07:23][@waterlimon][What decision process do you use to choose the color of sweater to wear on a particular day?]
[1:07:48][@aceflameseer][Will you please sign the contract with twitch so we can get good Casey emotes in chat?]
[1:08:01][@elxenoaizd][Have you seen the Poker keyboard series? It's very interesting in that it has all the keys in the center of the keyboard, you never have to leave the center row]
[1:08:13][@Stephenlast][We'll keep you updated!]
[1:08:16][@Cx00][Still using the 3 bin system for clothes?]
[1:08:20][@elxenoaizd][Does it ever happen to you when you sleep on a problem and then when you wake up the solution would just click in your head?]
[1:10:37][@elxenoaizd][Does it have to be at night, or just when you're sleeping?]
[1:11:07][@Cx00][What time do you usually go to sleep?]
[1:11:13][@vtlmks][Could you please expand on what you meant by "in the future there won't be dedicated hardware for graphics"? You mean it'll be more CPU cores and ray tracing instead?]
[1:12:34][@Dragonkinn02][Would you think in the next 5-10 years they'll move us from 64-bit to 128 bit?]
[1:12:53][Wind it on down][:speech]
[/video]
