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

Unified Diff: base/debug/activity_tracker.cc

Issue 2753573002: Remove 'global' user-data in favor of 'process' user-data. (Closed)
Patch Set: rebased Created 3 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 | « base/debug/activity_tracker.h ('k') | base/debug/activity_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/activity_tracker.cc
diff --git a/base/debug/activity_tracker.cc b/base/debug/activity_tracker.cc
index 5081c1c9d20b0da899481b81d9b0c347afe5cb96..7fc5748fa04247885fd762bdcdcb1e4706ac77dc 100644
--- a/base/debug/activity_tracker.cc
+++ b/base/debug/activity_tracker.cc
@@ -38,7 +38,6 @@ const int kMinStackDepth = 2;
// pairs) globally or associated with ActivityData entries.
const size_t kUserDataSize = 1 << 10; // 1 KiB
const size_t kProcessDataSize = 4 << 10; // 4 KiB
-const size_t kGlobalDataSize = 16 << 10; // 16 KiB
const size_t kMaxUserDataNameLength =
static_cast<size_t>(std::numeric_limits<uint8_t>::max());
@@ -1599,7 +1598,7 @@ void GlobalActivityTracker::RecordModuleInfo(const ModuleInfo& info) {
void GlobalActivityTracker::RecordFieldTrial(const std::string& trial_name,
StringPiece group_name) {
const std::string key = std::string("FieldTrial.") + trial_name;
- global_data_.SetString(key, group_name);
+ process_data_.SetString(key, group_name);
}
GlobalActivityTracker::GlobalActivityTracker(
@@ -1631,14 +1630,7 @@ GlobalActivityTracker::GlobalActivityTracker(
kTypeIdProcessDataRecord,
kProcessDataSize),
kProcessDataSize,
- process_id_),
- global_data_(
- allocator_->GetAsArray<char>(
- allocator_->Allocate(kGlobalDataSize, kTypeIdGlobalDataRecord),
- kTypeIdGlobalDataRecord,
- kGlobalDataSize),
- kGlobalDataSize,
- process_id_) {
+ process_id_) {
DCHECK_NE(0, process_id_);
// Ensure that there is no other global object and then make this one such.
@@ -1648,8 +1640,6 @@ GlobalActivityTracker::GlobalActivityTracker(
// The data records must be iterable in order to be found by an analyzer.
allocator_->MakeIterable(allocator_->GetAsReference(
process_data_.GetBaseAddress(), kTypeIdProcessDataRecord));
- allocator_->MakeIterable(allocator_->GetAsReference(
- global_data_.GetBaseAddress(), kTypeIdGlobalDataRecord));
// Note that this process has launched.
SetProcessPhase(PROCESS_LAUNCHED);
« no previous file with comments | « base/debug/activity_tracker.h ('k') | base/debug/activity_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698