Automatic Performance Counters
?
?

Keyboard Navigation

Global Keys

[, < / ], > Jump to previous / next episode
W, K, P / S, J, N Jump to previous / next marker
t / T Toggle theatre / SUPERtheatre mode
z Toggle filter mode V Revert filter to original state

Menu toggling

q Quotes r References f Filter c Credits

In-Menu Movement

a
w
s
d
h j k l


Quotes and References Menus

Enter Jump to timecode

Quotes, References and Credits Menus

o Open URL (in new tab)

Filter Menu

x, Space Toggle category and focus next
X, ShiftSpace Toggle category and focus previous
v Invert topics / media as per focus

Credits Menu

Enter Open URL (in new tab)
00:11Plan for today
00:11Plan for today
00:11Plan for today
01:40Recap of work done in the previous episode
01:40Recap of work done in the previous episode
01:40Recap of work done in the previous episode
03:41TIMED_BLOCK should be easier to use
03:41TIMED_BLOCK should be easier to use
03:41TIMED_BLOCK should be easier to use
05:09Timing a block should be an inexpensive operation
05:09Timing a block should be an inexpensive operation
05:09Timing a block should be an inexpensive operation
07:03Don't be afraid of major changes
07:03Don't be afraid of major changes
07:03Don't be afraid of major changes
07:47Getting rid of the debug counter IDs
07:47Getting rid of the debug counter IDs
07:47Getting rid of the debug counter IDs
08:25Preprocessor directives
08:25Preprocessor directives
08:25Preprocessor directives
11:07The __COUNTER__ preprocessor directive
11:07The __COUNTER__ preprocessor directive
11:07The __COUNTER__ preprocessor directive
11:47Consider MSVC's genderα
11:47Consider MSVC's genderα
11:47Consider MSVC's genderα
12:48Preprocessor directives are frequently used in debug code
12:48Preprocessor directives are frequently used in debug code
12:48Preprocessor directives are frequently used in debug code
13:22Getting rid of the argument to TIMED_BLOCK
13:22Getting rid of the argument to TIMED_BLOCK
13:22Getting rid of the argument to TIMED_BLOCK
14:36Avoiding predefined values while still describing the location of the TIMED_BLOCK call
14:36Avoiding predefined values while still describing the location of the TIMED_BLOCK call
14:36Avoiding predefined values while still describing the location of the TIMED_BLOCK call
16:49Mapping filenames and line numbers to IDs
16:49Mapping filenames and line numbers to IDs
16:49Mapping filenames and line numbers to IDs
17:24We could use some sort of mapping strategy, but that's too complex for a debug log system
17:24We could use some sort of mapping strategy, but that's too complex for a debug log system
17:24We could use some sort of mapping strategy, but that's too complex for a debug log system
19:14An alternative method: Avoid looking for filenames and line numbers until we need to print them
19:14An alternative method: Avoid looking for filenames and line numbers until we need to print them
19:14An alternative method: Avoid looking for filenames and line numbers until we need to print them
20:47Depending on the amount of information we log, this method could tax our write bandwidth
20:47Depending on the amount of information we log, this method could tax our write bandwidth
20:47Depending on the amount of information we log, this method could tax our write bandwidth
23:46We'll try first the alternative method
23:46We'll try first the alternative method
23:46We'll try first the alternative method
24:48Have a thoughtβ
24:48Have a thoughtβ
24:48Have a thoughtβ
24:51We could resort to __COUNTER__ because of our single compilation unit build!
24:51We could resort to __COUNTER__ because of our single compilation unit build!
24:51We could resort to __COUNTER__ because of our single compilation unit build!
25:47"Are you thinking what I'm thinking?"γ
25:47"Are you thinking what I'm thinking?"γ
25:47"Are you thinking what I'm thinking?"γ
26:30Quick test of the __COUNTER__ approach
26:30Quick test of the __COUNTER__ approach
26:30Quick test of the __COUNTER__ approach
29:25__COUNTER__ passes the test!
29:25__COUNTER__ passes the test!
29:25__COUNTER__ passes the test!
29:56Dealing with two translation units. We will keep one array of debug records for each of them
29:56Dealing with two translation units. We will keep one array of debug records for each of them
29:56Dealing with two translation units. We will keep one array of debug records for each of them
31:44We could define the DEBUG_PREFIX preprocessor symbol to access the proper array
31:44We could define the DEBUG_PREFIX preprocessor symbol to access the proper array
31:44We could define the DEBUG_PREFIX preprocessor symbol to access the proper array
33:22Forward-declaring the debug record arrays
33:22Forward-declaring the debug record arrays
33:22Forward-declaring the debug record arrays
34:56Accessing debug records
34:56Accessing debug records
34:56Accessing debug records
36:06Using the DebugRecordArray preprocessor symbol instead of DEBUG_PREFIX
36:06Using the DebugRecordArray preprocessor symbol instead of DEBUG_PREFIX
36:06Using the DebugRecordArray preprocessor symbol instead of DEBUG_PREFIX
38:00Defining the fields of the debug record array
38:00Defining the fields of the debug record array
38:00Defining the fields of the debug record array
38:33Implementing the timed_block constructor and destructor
38:33Implementing the timed_block constructor and destructor
38:33Implementing the timed_block constructor and destructor
40:32Using the new TIMED_BLOCK syntax
40:32Using the new TIMED_BLOCK syntax
40:32Using the new TIMED_BLOCK syntax
42:48Adding HitCount as an extra parameter to TIMED_BLOCK
42:48Adding HitCount as an extra parameter to TIMED_BLOCK
42:48Adding HitCount as an extra parameter to TIMED_BLOCK
44:56handmade_debug.h: Fuss with the vagaries of C++ preprocessor nonsenseδ
44:56handmade_debug.h: Fuss with the vagaries of C++ preprocessor nonsenseδ
44:56handmade_debug.h: Fuss with the vagaries of C++ preprocessor nonsenseδ
45:00Expanding __LINE__ in the presence of the paste operator
45:00Expanding __LINE__ in the presence of the paste operator
45:00Expanding __LINE__ in the presence of the paste operator
48:28Modifying OverlayCycleCounters to work with the debug record arrays
48:28Modifying OverlayCycleCounters to work with the debug record arrays
48:28Modifying OverlayCycleCounters to work with the debug record arrays
50:41Testing today's changes
50:41Testing today's changes
50:41Testing today's changes
51:00Identifying our debug counters using the file names stored in the debug arrays
51:00Identifying our debug counters using the file names stored in the debug arrays
51:00Identifying our debug counters using the file names stored in the debug arrays
51:40It works!
51:40It works!
51:40It works!
52:09What we have accomplished today
52:09What we have accomplished today
52:09What we have accomplished today
53:08Q&A
🗩
53:08Q&A
🗩
53:08Q&A
🗩
54:16elxenoaizd There's an alternative way to start / end the counter instead of using constructor / destructor pair, and you don't have to store the data in the struct. Maybe not as convenient but it's worth mentioning. I use it quite often when I have to 'begin X' -- write code -- 'end X'. It's basically a hacked / tweaked version of C#'s 'using' statement. I think you'll find it interesting
🗪
54:16elxenoaizd There's an alternative way to start / end the counter instead of using constructor / destructor pair, and you don't have to store the data in the struct. Maybe not as convenient but it's worth mentioning. I use it quite often when I have to 'begin X' -- write code -- 'end X'. It's basically a hacked / tweaked version of C#'s 'using' statement. I think you'll find it interesting
🗪
54:16elxenoaizd There's an alternative way to start / end the counter instead of using constructor / destructor pair, and you don't have to store the data in the struct. Maybe not as convenient but it's worth mentioning. I use it quite often when I have to 'begin X' -- write code -- 'end X'. It's basically a hacked / tweaked version of C#'s 'using' statement. I think you'll find it interesting
🗪
55:13Write out elxenoaizd's suggestion
55:13Write out elxenoaizd's suggestion
55:13Write out elxenoaizd's suggestion
56:33JamesWidman I feel like I missed something: why does the array name need to be different between builds?
🗪
56:33JamesWidman I feel like I missed something: why does the array name need to be different between builds?
🗪
56:33JamesWidman I feel like I missed something: why does the array name need to be different between builds?
🗪
57:20twitch_makes_me_itch How do you move your typing cursor around so fast? Is that an IDE-specific macro?
🗪
57:20twitch_makes_me_itch How do you move your typing cursor around so fast? Is that an IDE-specific macro?
🗪
57:20twitch_makes_me_itch How do you move your typing cursor around so fast? Is that an IDE-specific macro?
🗪
58:07graeme7 Could you expand on how you would have done the char *Filename / *FunctionName with uints instead?ε
🗪
58:07graeme7 Could you expand on how you would have done the char *Filename / *FunctionName with uints instead?ε
🗪
58:07graeme7 Could you expand on how you would have done the char *Filename / *FunctionName with uints instead?ε
🗪
59:14andsz_ This is awesome. You have a few minutes left: could you output the results or show them in the debugger?
🗪
59:14andsz_ This is awesome. You have a few minutes left: could you output the results or show them in the debugger?
🗪
59:14andsz_ This is awesome. You have a few minutes left: could you output the results or show them in the debugger?
🗪
59:34handmade.cpp: Print out the debug cycle counts
59:34handmade.cpp: Print out the debug cycle counts
59:34handmade.cpp: Print out the debug cycle counts
1:04:34nico3695 Do you recommend taking game-programming as a major or programming in general?
🗪
1:04:34nico3695 Do you recommend taking game-programming as a major or programming in general?
🗪
1:04:34nico3695 Do you recommend taking game-programming as a major or programming in general?
🗪
1:04:48elxenoaizd What other useful preproc values could we use other than __FILE__, __FUNCTION__ and __LINE__?
🗪
1:04:48elxenoaizd What other useful preproc values could we use other than __FILE__, __FUNCTION__ and __LINE__?
🗪
1:04:48elxenoaizd What other useful preproc values could we use other than __FILE__, __FUNCTION__ and __LINE__?
🗪
1:05:47elxenoaizd I'm not sure I fully understand Unity builds. So Unity build is when we compile everything to a single file? I don't think that's the case because we do have multiple source files in HMH...
🗪
1:05:47elxenoaizd I'm not sure I fully understand Unity builds. So Unity build is when we compile everything to a single file? I don't think that's the case because we do have multiple source files in HMH...
🗪
1:05:47elxenoaizd I'm not sure I fully understand Unity builds. So Unity build is when we compile everything to a single file? I don't think that's the case because we do have multiple source files in HMH...
🗪
1:07:16plain_flavored Where did the whole weird IInterface CClass style of programming I see everywhere come from?
🗪
1:07:16plain_flavored Where did the whole weird IInterface CClass style of programming I see everywhere come from?
🗪
1:07:16plain_flavored Where did the whole weird IInterface CClass style of programming I see everywhere come from?
🗪
1:07:43elxenoaizd Why do you have both u32 and uint32 typedefs? What's the difference?
🗪
1:07:43elxenoaizd Why do you have both u32 and uint32 typedefs? What's the difference?
🗪
1:07:43elxenoaizd Why do you have both u32 and uint32 typedefs? What's the difference?
🗪
1:08:18elxenoaizd If exceptions are bad, then what is a good way to handle errors? Just return error codes? A global error value like in errno or GetLastError()? What do you think of the idea of having a central error handling function that we call and pass it the error id and it acts accordingly (switch statement maybe)?ζ
🗪
1:08:18elxenoaizd If exceptions are bad, then what is a good way to handle errors? Just return error codes? A global error value like in errno or GetLastError()? What do you think of the idea of having a central error handling function that we call and pass it the error id and it acts accordingly (switch statement maybe)?ζ
🗪
1:08:18elxenoaizd If exceptions are bad, then what is a good way to handle errors? Just return error codes? A global error value like in errno or GetLastError()? What do you think of the idea of having a central error handling function that we call and pass it the error id and it acts accordingly (switch statement maybe)?ζ
🗪
1:10:39nexus_80 Why use Record->FileName instead of Record->FunctionName?
🗪
1:10:39nexus_80 Why use Record->FileName instead of Record->FunctionName?
🗪
1:10:39nexus_80 Why use Record->FileName instead of Record->FunctionName?
🗪
1:10:47superdude4242564 I am kind of new to the stream. Is there a reason you hate C++ so much?
🗪
1:10:47superdude4242564 I am kind of new to the stream. Is there a reason you hate C++ so much?
🗪
1:10:47superdude4242564 I am kind of new to the stream. Is there a reason you hate C++ so much?
🗪
1:12:14Eipon Will this game compile with gcc or only with the Visual Studio compiler?
🗪
1:12:14Eipon Will this game compile with gcc or only with the Visual Studio compiler?
🗪
1:12:14Eipon Will this game compile with gcc or only with the Visual Studio compiler?
🗪
1:13:04twitch_makes_me_itch General Programming Question: Do you see the use of public variables being accessed outside the class bad practice, versus using a "getter / accessor" function?
🗪
1:13:04twitch_makes_me_itch General Programming Question: Do you see the use of public variables being accessed outside the class bad practice, versus using a "getter / accessor" function?
🗪
1:13:04twitch_makes_me_itch General Programming Question: Do you see the use of public variables being accessed outside the class bad practice, versus using a "getter / accessor" function?
🗪
1:14:03handmade.cpp: Demo bad programming practice
1:14:03handmade.cpp: Demo bad programming practice
1:14:03handmade.cpp: Demo bad programming practice
1:16:32insofaras How would you handle parsing errors / exceptions in a recursive decent parser?
🗪
1:16:32insofaras How would you handle parsing errors / exceptions in a recursive decent parser?
🗪
1:16:32insofaras How would you handle parsing errors / exceptions in a recursive decent parser?
🗪
1:16:48waterlimon Internet says __COUNTER__ started on VC++
🗪
1:16:48waterlimon Internet says __COUNTER__ started on VC++
🗪
1:16:48waterlimon Internet says __COUNTER__ started on VC++
🗪
1:17:53Spin it down
🗩
1:17:53Spin it down
🗩
1:17:53Spin it down
🗩