Log-based Performance Counters
?
?

Keyboard Navigation

Global Keys

[, < / ], > Jump to previous / next episode
W, K, P / S, J, N Jump to previous / next timestamp
t / T Toggle theatre / SUPERtheatre mode
V Revert filter to original state Y Select link (requires manual Ctrl-c)

Menu toggling

q Quotes r References f Filter y Link c Credits

In-Menu and Index Controls

a
w
s
d
h j k l


Esc Close menu / unfocus timestamp

Quotes and References Menus and Index

Enter Jump to timestamp

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

Filter and Link Menus

z Toggle filter / linking mode

Credits Menu

Enter Open URL (in new tab)
0:11Recap and plan for today
0:11Recap and plan for today
0:11Recap and plan for today
2:10Our performance counters are inexpensive, convenient and thread-safe
2:10Our performance counters are inexpensive, convenient and thread-safe
2:10Our performance counters are inexpensive, convenient and thread-safe
3:39They report the amount of time an operation takes, but not _when_ it happens
3:39They report the amount of time an operation takes, but not _when_ it happens
3:39They report the amount of time an operation takes, but not _when_ it happens
4:18In order to improve our profile view, we need to collect more data
4:18In order to improve our profile view, we need to collect more data
4:18In order to improve our profile view, we need to collect more data
6:02The action of collecting the data should be cheap. Any real work should be deferred till the end of the frame
6:02The action of collecting the data should be cheap. Any real work should be deferred till the end of the frame
6:02The action of collecting the data should be cheap. Any real work should be deferred till the end of the frame
7:36A log-based system could fit our requirements
7:36A log-based system could fit our requirements
7:36A log-based system could fit our requirements
8:18Is the amount of logged events going to be too large?
8:18Is the amount of logged events going to be too large?
8:18Is the amount of logged events going to be too large?
10:27Let's give the log-based approach a try
10:27Let's give the log-based approach a try
10:27Let's give the log-based approach a try
10:55Can we call rdtscp?
10:55Can we call rdtscp?
10:55Can we call rdtscp?
12:15We seem to be in luckα
12:15We seem to be in luckα
12:15We seem to be in luckα
13:50rdtsc tells us about elapsed processor time
13:50rdtsc tells us about elapsed processor time
13:50rdtsc tells us about elapsed processor time
14:51rdtscp should also report which processor/core is running our code
14:51rdtscp should also report which processor/core is running our code
14:51rdtscp should also report which processor/core is running our code
19:00Trying to see if rdtscp returns the core identity
19:00Trying to see if rdtscp returns the core identity
19:00Trying to see if rdtscp returns the core identity
20:20We don't have a way of disambiguating threads at the moment
20:20We don't have a way of disambiguating threads at the moment
20:20We don't have a way of disambiguating threads at the moment
20:58"It's kinda nice to get stuff for free"β
20:58"It's kinda nice to get stuff for free"β
20:58"It's kinda nice to get stuff for free"β
21:13We'll use a lighter version of debug_record to record debug entries
21:13We'll use a lighter version of debug_record to record debug entries
21:13We'll use a lighter version of debug_record to record debug entries
23:22Disambiguating threads, cores, debug_records and debug_record_arrays inside debug_event
23:22Disambiguating threads, cores, debug_records and debug_record_arrays inside debug_event
23:22Disambiguating threads, cores, debug_records and debug_record_arrays inside debug_event
24:19We only need a single big DebugEventArray
24:19We only need a single big DebugEventArray
24:19We only need a single big DebugEventArray
25:26Keeping track of the position inside the debug event array
25:26Keeping track of the position inside the debug event array
25:26Keeping track of the position inside the debug event array
25:55Double-buffering the debug event arrays
25:55Double-buffering the debug event arrays
25:55Double-buffering the debug event arrays
27:12Filling in the debug event records
27:12Filling in the debug event records
27:12Filling in the debug event records
28:22The array index will be determined by a preprocessor symbol defined inside build.bat
28:22The array index will be determined by a preprocessor symbol defined inside build.bat
28:22The array index will be determined by a preprocessor symbol defined inside build.bat
29:49Defining AtomicAddU32
29:49Defining AtomicAddU32
29:49Defining AtomicAddU32
32:34Telling apart the beginning and end of a timed block using entry types
32:34Telling apart the beginning and end of a timed block using entry types
32:34Telling apart the beginning and end of a timed block using entry types
33:46Pulling together duplicated event recording code into the RecordDebugEvent macro
33:46Pulling together duplicated event recording code into the RecordDebugEvent macro
33:46Pulling together duplicated event recording code into the RecordDebugEvent macro
37:30What is the 32-bit interlocked add-exchange instruction? It's _InterlockedExchangeAdd
37:30What is the 32-bit interlocked add-exchange instruction? It's _InterlockedExchangeAdd
37:30What is the 32-bit interlocked add-exchange instruction? It's _InterlockedExchangeAdd
40:38We can't do a synchronous exchange of pointers and clear the event index at the same time...
40:38We can't do a synchronous exchange of pointers and clear the event index at the same time...
40:38We can't do a synchronous exchange of pointers and clear the event index at the same time...
42:08... unless we pack the position and the event index together into a single 64-bit variable
42:08... unless we pack the position and the event index together into a single 64-bit variable
42:08... unless we pack the position and the event index together into a single 64-bit variable
45:41Exchanging debug event arrays at the end of the frame
45:41Exchanging debug event arrays at the end of the frame
45:41Exchanging debug event arrays at the end of the frame
46:30Transforming the macros into inline functions temporarily for easy stepping
46:30Transforming the macros into inline functions temporarily for easy stepping
46:30Transforming the macros into inline functions temporarily for easy stepping
47:40Our debug array is not large enough for the amount of entries we're recording
47:40Our debug array is not large enough for the amount of entries we're recording
47:40Our debug array is not large enough for the amount of entries we're recording
49:04Bump that number temporarily just to see if that really is happening for realsγ
49:04Bump that number temporarily just to see if that really is happening for realsγ
49:04Bump that number temporarily just to see if that really is happening for realsγ
49:30The information we log will allow more in-depth profiling operations
49:30The information we log will allow more in-depth profiling operations
49:30The information we log will allow more in-depth profiling operations
50:05Recap on the bundling together of array and event indices
50:05Recap on the bundling together of array and event indices
50:05Recap on the bundling together of array and event indices
50:49Switching event array indices correctly
50:49Switching event array indices correctly
50:49Switching event array indices correctly
53:29CollateRecords() can reproduce the behavior of our old non-log-based event system
53:29CollateRecords() can reproduce the behavior of our old non-log-based event system
53:29CollateRecords() can reproduce the behavior of our old non-log-based event system
57:12We have two event arrays (one for each compilation unit) and that makes the code uglier than it would be if we had better tools
57:12We have two event arrays (one for each compilation unit) and that makes the code uglier than it would be if we had better tools
57:12We have two event arrays (one for each compilation unit) and that makes the code uglier than it would be if we had better tools
58:25Linearizing the access to the debug_record arrays
58:25Linearizing the access to the debug_record arrays
58:25Linearizing the access to the debug_record arrays
1:02:21Fixing compilation errors
1:02:21Fixing compilation errors
1:02:21Fixing compilation errors
1:03:59Accessing the filenames, function names and line numbers of debug_records
1:03:59Accessing the filenames, function names and line numbers of debug_records
1:03:59Accessing the filenames, function names and line numbers of debug_records
1:06:50The log-based system seems to be working
1:06:50The log-based system seems to be working
1:06:50The log-based system seems to be working
1:07:37Q&A
🗩
1:07:37Q&A
🗩
1:07:37Q&A
🗩
1:08:04elxenoaizd You mentioned that you use a known base address for your memory management. Could you talk a bit more about that? Does that mean I can now find things by just offsetting from that address, and does it mean that if I fwrite this whole block I'll essentially be fwriting the whole game?
🗪
1:08:04elxenoaizd You mentioned that you use a known base address for your memory management. Could you talk a bit more about that? Does that mean I can now find things by just offsetting from that address, and does it mean that if I fwrite this whole block I'll essentially be fwriting the whole game?
🗪
1:08:04elxenoaizd You mentioned that you use a known base address for your memory management. Could you talk a bit more about that? Does that mean I can now find things by just offsetting from that address, and does it mean that if I fwrite this whole block I'll essentially be fwriting the whole game?
🗪
1:09:02butwhynot1 You can specify which functions to optimize by enabling optimization on the command line and surrounding code you don't want optimized with #pragma optimize("", off) ..... #pragma optimize("", on)
🗪
1:09:02butwhynot1 You can specify which functions to optimize by enabling optimization on the command line and surrounding code you don't want optimized with #pragma optimize("", off) ..... #pragma optimize("", on)
🗪
1:09:02butwhynot1 You can specify which functions to optimize by enabling optimization on the command line and surrounding code you don't want optimized with #pragma optimize("", off) ..... #pragma optimize("", on)
🗪
1:09:51elxenoaizd Do you ever find use size_t or do you just use u32, u64, etc?
🗪
1:09:51elxenoaizd Do you ever find use size_t or do you just use u32, u64, etc?
🗪
1:09:51elxenoaizd Do you ever find use size_t or do you just use u32, u64, etc?
🗪
1:10:20elxenoaizd Do you keep track of struct padding when you add / remove fields, or is it something you don't think about too much, so order of fields doesn't matter much?
🗪
1:10:20elxenoaizd Do you keep track of struct padding when you add / remove fields, or is it something you don't think about too much, so order of fields doesn't matter much?
🗪
1:10:20elxenoaizd Do you keep track of struct padding when you add / remove fields, or is it something you don't think about too much, so order of fields doesn't matter much?
🗪
1:10:56butwhynot1 Also, what's the point of the core number in the debug info? It seems the thread ID is the important part
🗪
1:10:56butwhynot1 Also, what's the point of the core number in the debug info? It seems the thread ID is the important part
🗪
1:10:56butwhynot1 Also, what's the point of the core number in the debug info? It seems the thread ID is the important part
🗪
1:11:54Look forward to tomorrow
1:11:54Look forward to tomorrow
1:11:54Look forward to tomorrow
1:12:35JamesWidman How will we avoid collecting or displaying stats on debug-rendering code?
🗪
1:12:35JamesWidman How will we avoid collecting or displaying stats on debug-rendering code?
🗪
1:12:35JamesWidman How will we avoid collecting or displaying stats on debug-rendering code?
🗪
1:12:53plain_flavored Are profilers as bad as debuggers?
🗪
1:12:53plain_flavored Are profilers as bad as debuggers?
🗪
1:12:53plain_flavored Are profilers as bad as debuggers?
🗪
1:12:58inliferty What do you think about checked exceptions?
🗪
1:12:58inliferty What do you think about checked exceptions?
🗪
1:12:58inliferty What do you think about checked exceptions?
🗪
1:13:29Thanks and a few words on preordering the source and using the GitHub repositories
🗩
1:13:29Thanks and a few words on preordering the source and using the GitHub repositories
🗩
1:13:29Thanks and a few words on preordering the source and using the GitHub repositories
🗩