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

Unified Diff: content/common/host_discardable_shared_memory_manager.cc

Issue 1060173002: Remove scoped trackers from OnAllocateLockedDiscardableSharedMemory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/host_discardable_shared_memory_manager.cc
diff --git a/content/common/host_discardable_shared_memory_manager.cc b/content/common/host_discardable_shared_memory_manager.cc
index 49c24f812424dac4e3c16efe9eda29d1355126a2..0534bd35ed21c8db03956652366b2df1552e029a 100644
--- a/content/common/host_discardable_shared_memory_manager.cc
+++ b/content/common/host_discardable_shared_memory_manager.cc
@@ -13,7 +13,6 @@
#include "base/lazy_instance.h"
#include "base/memory/discardable_memory.h"
#include "base/numerics/safe_math.h"
-#include "base/profiler/scoped_tracker.h"
#include "base/strings/string_number_conversions.h"
#include "base/sys_info.h"
#include "base/trace_event/trace_event.h"
@@ -190,11 +189,6 @@ void HostDiscardableSharedMemoryManager::AllocateLockedDiscardableSharedMemory(
size_t size,
DiscardableSharedMemoryId id,
base::SharedMemoryHandle* shared_memory_handle) {
- // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466405
- // is fixed.
- tracked_objects::ScopedTracker tracking_profile1(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "466405 AllocateLockedDiscardableSharedMemory::Start"));
base::AutoLock lock(lock_);
// Make sure |id| is not already in use.
@@ -216,19 +210,9 @@ void HostDiscardableSharedMemoryManager::AllocateLockedDiscardableSharedMemory(
if (size < memory_limit_)
limit = memory_limit_ - size;
- // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466405
- // is fixed.
- tracked_objects::ScopedTracker tracking_profile2(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "466405 AllocateLockedDiscardableSharedMemory::ReduceMemoryUsage"));
if (bytes_allocated_ > limit)
ReduceMemoryUsageUntilWithinLimit(limit);
- // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466405
- // is fixed.
- tracked_objects::ScopedTracker tracking_profile3(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "466405 AllocateLockedDiscardableSharedMemory::NewMemory"));
scoped_ptr<base::DiscardableSharedMemory> memory(
new base::DiscardableSharedMemory);
if (!memory->CreateAndMap(size)) {
@@ -236,11 +220,6 @@ void HostDiscardableSharedMemoryManager::AllocateLockedDiscardableSharedMemory(
return;
}
- // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466405
- // is fixed.
- tracked_objects::ScopedTracker tracking_profile4(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "466405 AllocateLockedDiscardableSharedMemory::ShareToProcess"));
if (!memory->ShareToProcess(process_handle, shared_memory_handle)) {
LOG(ERROR) << "Cannot share discardable memory segment";
*shared_memory_handle = base::SharedMemory::NULLHandle();
@@ -254,12 +233,6 @@ void HostDiscardableSharedMemoryManager::AllocateLockedDiscardableSharedMemory(
return;
}
- // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466405
- // is fixed.
- tracked_objects::ScopedTracker tracking_profile5(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "466405 "
- "AllocateLockedDiscardableSharedMemory::BytesAllocatedChanged"));
bytes_allocated_ = checked_bytes_allocated.ValueOrDie();
BytesAllocatedChanged(bytes_allocated_);
@@ -268,13 +241,6 @@ void HostDiscardableSharedMemoryManager::AllocateLockedDiscardableSharedMemory(
segments_.push_back(segment.get());
std::push_heap(segments_.begin(), segments_.end(), CompareMemoryUsageTime);
- // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466405
- // is fixed.
- tracked_objects::ScopedTracker tracking_profile6(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "466405 "
- "AllocateLockedDiscardableSharedMemory::"
- "ScheduleEnforceMemoryPolicy"));
if (bytes_allocated_ > memory_limit_)
ScheduleEnforceMemoryPolicy();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698