@@ -216,36 +216,14 @@ void PageGuardManager::InitializeSystemExceptionContext(void)
216
216
}
217
217
218
218
PageGuardManager::PageGuardManager () :
219
- exception_handler_(nullptr ), exception_handler_count_(0 ), system_page_size_(util::platform::GetSystemPageSize()),
220
- system_page_pot_shift_(GetSystemPagePotShift()), enable_copy_on_map_(kDefaultEnableCopyOnMap ),
221
- enable_separate_read_(kDefaultEnableSeparateRead ), unblock_sigsegv_(kDefaultUnblockSIGSEGV ),
222
- enable_signal_handler_watcher_(kDefaultEnableSignalHandlerWatcher ),
223
- signal_handler_watcher_max_restores_(kDefaultSignalHandlerWatcherMaxRestores ),
224
- enable_read_write_same_page_(kDefaultEnableReadWriteSamePage ), protection_mode_(kDefaultMemoryProtMode )
225
- {
226
- if (kUserFaultFdMode == protection_mode_ && !USERFAULTFD_SUPPORTED)
227
- {
228
- GFXRECON_LOG_WARNING (
229
- " Kernel does not support all features for userfaultfd memory tracking mode. Falling back to mprotect mode." );
230
-
231
- protection_mode_ = kMProtectMode ;
232
- }
233
-
234
- if (kMProtectMode == protection_mode_)
235
- {
236
- InitializeSystemExceptionContext ();
237
- }
238
- else
239
- {
240
- if (!InitializeUserFaultFd ())
241
- {
242
- GFXRECON_LOG_ERROR (" Userfaultfd initialization failed. Falling back to mprotect memory tracking mode." );
243
-
244
- protection_mode_ = kMProtectMode ;
245
- InitializeSystemExceptionContext ();
246
- }
247
- }
248
- }
219
+ PageGuardManager(kDefaultEnableCopyOnMap ,
220
+ kDefaultEnableSeparateRead ,
221
+ kDefaultUnblockSIGSEGV ,
222
+ kDefaultEnableSignalHandlerWatcher ,
223
+ kDefaultSignalHandlerWatcherMaxRestores ,
224
+ kDefaultEnableReadWriteSamePage ,
225
+ kDefaultMemoryProtMode )
226
+ {}
249
227
250
228
PageGuardManager::PageGuardManager (bool enable_copy_on_map,
251
229
bool enable_separate_read,
@@ -264,8 +242,8 @@ PageGuardManager::PageGuardManager(bool enable_copy_on_map,
264
242
{
265
243
if (kUserFaultFdMode == protection_mode_ && !USERFAULTFD_SUPPORTED)
266
244
{
267
- GFXRECON_LOG_WARNING (
268
- " Kernel does not support all features for userfaultfd memory tracking mode. Falling back to mprotect mode." );
245
+ GFXRECON_LOG_WARNING (" Kernel does not support all features for userfaultfd memory tracking mode. Falling back "
246
+ " to mprotect mode." );
269
247
270
248
protection_mode_ = kMProtectMode ;
271
249
}
0 commit comments