From 866cffce8a02a6674f1f8338d9f5188eb2690f7c Mon Sep 17 00:00:00 2001 From: Scott Graham Date: Thu, 26 Nov 2015 12:23:12 -0800 Subject: [PATCH] Revert "win: Cap number of locks gathered" This reverts commit b3464d96f5fc0d82f860651b7918626dfbd80d65. It was temporarily landed to be able to run as the DEPS version in Chrome. BUG= Review URL: https://codereview.chromium.org/1474223002 . --- snapshot/win/process_snapshot_win.cc | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/snapshot/win/process_snapshot_win.cc b/snapshot/win/process_snapshot_win.cc index c59cdded..b8498d6c 100644 --- a/snapshot/win/process_snapshot_win.cc +++ b/snapshot/win/process_snapshot_win.cc @@ -448,10 +448,6 @@ void ProcessSnapshotWin::ReadLocks( WinVMAddress current_address = start_address_backward; WinVMAddress last_good_address; - // Cap the list of locks we capture arbitrarily so we don't walk forever. - const int kMaxWalkLength = 100; - int walk_count = 0; - // Typically, this seems to be a circular list, but it's not clear that it // always is, so follow Blink fields back to the head (or where we started) // before following Flink to capture memory. @@ -477,9 +473,6 @@ void ProcessSnapshotWin::ReadLocks( critical_section_debug.ProcessLocksList.Blink - offsetof(process_types::RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList); - walk_count++; - if (walk_count == kMaxWalkLength) - break; } while (current_address != start_address_backward && current_address != kInvalid); @@ -488,8 +481,6 @@ void ProcessSnapshotWin::ReadLocks( current_address = last_good_address; } - walk_count = 0; - const WinVMAddress start_address_forward = current_address; // current_address is now the head of the list, walk Flink to add the whole @@ -522,12 +513,6 @@ void ProcessSnapshotWin::ReadLocks( critical_section_debug.ProcessLocksList.Flink - offsetof(process_types::RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList); - walk_count++; - // Walk twice as far on the forward walk, so that if we started at an - // important one (for example the Loader Lock), we get it, and ones that - // were presumably allocated temporally near it. - if (walk_count == kMaxWalkLength * 2) - break; } while (current_address != start_address_forward && current_address != kInvalid); }