Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Unified Diff: content/child/child_discardable_shared_memory_manager.cc

Issue 1386333003: Revert of [tracing] Display the locked size of discardable memory segment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/memory/discardable_shared_memory_unittest.cc ('k') | content/common/discardable_shared_memory_heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_discardable_shared_memory_manager.cc
diff --git a/content/child/child_discardable_shared_memory_manager.cc b/content/child/child_discardable_shared_memory_manager.cc
index 1069fa7242cdf58264d71d7017f7797c9331cb6f..cbe069a27cb011318629a84669ef22ec83331aa7 100644
--- a/content/child/child_discardable_shared_memory_manager.cc
+++ b/content/child/child_discardable_shared_memory_manager.cc
@@ -149,8 +149,6 @@
continue;
}
- free_span->set_is_locked(true);
-
// Memory usage is guaranteed to have changed after having removed
// at least one span from the free lists.
MemoryUsageChanged(heap_.GetSize(), heap_.GetSizeOfFreeLists());
@@ -181,7 +179,6 @@
scoped_ptr<DiscardableSharedMemoryHeap::Span> new_span(heap_.Grow(
shared_memory.Pass(), allocation_size_in_bytes, new_id,
base::Bind(&SendDeletedDiscardableSharedMemoryMessage, sender_, new_id)));
- new_span->set_is_locked(true);
// Unlock and insert any left over memory into free lists.
if (pages < pages_to_allocate) {
@@ -191,7 +188,6 @@
leftover->start() * base::GetPageSize() -
reinterpret_cast<size_t>(leftover->shared_memory()->memory()),
leftover->length() * base::GetPageSize());
- leftover->set_is_locked(false);
heap_.MergeIntoFreeLists(leftover.Pass());
}
@@ -233,11 +229,9 @@
switch (span->shared_memory()->Lock(offset, length)) {
case base::DiscardableSharedMemory::SUCCESS:
- span->set_is_locked(true);
return true;
case base::DiscardableSharedMemory::PURGED:
span->shared_memory()->Unlock(offset, length);
- span->set_is_locked(false);
return false;
case base::DiscardableSharedMemory::FAILED:
return false;
@@ -256,7 +250,6 @@
reinterpret_cast<size_t>(span->shared_memory()->memory());
size_t length = span->length() * base::GetPageSize();
- span->set_is_locked(false);
return span->shared_memory()->Unlock(offset, length);
}
« no previous file with comments | « base/memory/discardable_shared_memory_unittest.cc ('k') | content/common/discardable_shared_memory_heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698