template <bool EnableDirtyTracking, typename = void>
class EffectiveProfileDirtyTracker
Defined at line 271 of file ../../zircon/kernel/include/kernel/scheduler_state.h
TODO(johngro) 2022-09-21:
This odd pattern requires some explanation. Typically, we would use full
specialization in order to control at compile time whether or not
dirty-tracking was enabled. So, we would have:
```
template
<bool
Enable>
class Tracker { // disabled tracker impl };
template
<
>
class Tracker
<true
> { // enabled tracker impl };
```
Unfortunately, there is a bug in GCC which prevents us from doing this in
the logical way. Specifically, GCC does not currently allow full
specialization of classes declared in class/struct scope, even though this
should be supported as of C++17 (which the kernel is currently using).
The bug writeup is here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85282
It has been confirmed as a real bug, but it has been open for over 4 years
now. The most recent update was about 6 months ago, and it basically said
"well, the fix is not going to make it into GCC 12".
So, we are using the workaround suggested in the bug's discussion during
the most recent update. Instead of using full specialization as we
normally would, we use an odd form of partial specialization instead, which
basically boils down to the same thing.
If/when GCC finally fixes this, we can come back here and fix this.
Public Members
static const bool kDirtyTrackingEnabled
Public Methods
void MarkBaseProfileChanged ()
Defined at line 274 of file ../../zircon/kernel/include/kernel/scheduler_state.h
void MarkInheritedProfileChanged ()
Defined at line 275 of file ../../zircon/kernel/include/kernel/scheduler_state.h
void Clean ()
Defined at line 276 of file ../../zircon/kernel/include/kernel/scheduler_state.h
void AssertDirtyState (ProfileDirtyFlag )
Defined at line 277 of file ../../zircon/kernel/include/kernel/scheduler_state.h
void AssertDirty ()
Defined at line 278 of file ../../zircon/kernel/include/kernel/scheduler_state.h
ProfileDirtyFlag dirty_flags ()
Defined at line 279 of file ../../zircon/kernel/include/kernel/scheduler_state.h