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

Side by Side Diff: base/debug/activity_tracker.cc

Issue 2692273008: Hacky slashy (Closed)
Patch Set: . Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/debug/activity_tracker.h" 5 #include "base/debug/activity_tracker.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 void GlobalActivityTracker::CreateWithAllocator( 1083 void GlobalActivityTracker::CreateWithAllocator(
1084 std::unique_ptr<PersistentMemoryAllocator> allocator, 1084 std::unique_ptr<PersistentMemoryAllocator> allocator,
1085 int stack_depth) { 1085 int stack_depth) {
1086 // There's no need to do anything with the result. It is self-managing. 1086 // There's no need to do anything with the result. It is self-managing.
1087 GlobalActivityTracker* global_tracker = 1087 GlobalActivityTracker* global_tracker =
1088 new GlobalActivityTracker(std::move(allocator), stack_depth); 1088 new GlobalActivityTracker(std::move(allocator), stack_depth);
1089 // Create a tracker for this thread since it is known. 1089 // Create a tracker for this thread since it is known.
1090 global_tracker->CreateTrackerForCurrentThread(); 1090 global_tracker->CreateTrackerForCurrentThread();
1091 } 1091 }
1092 1092
1093 #if !defined(OS_NACL) 1093 #if !defined(OS_NACL) && !defined(OS_FUCHSIA)
1094 // static 1094 // static
1095 void GlobalActivityTracker::CreateWithFile(const FilePath& file_path, 1095 void GlobalActivityTracker::CreateWithFile(const FilePath& file_path,
1096 size_t size, 1096 size_t size,
1097 uint64_t id, 1097 uint64_t id,
1098 StringPiece name, 1098 StringPiece name,
1099 int stack_depth) { 1099 int stack_depth) {
1100 DCHECK(!file_path.empty()); 1100 DCHECK(!file_path.empty());
1101 DCHECK_GE(static_cast<uint64_t>(std::numeric_limits<int64_t>::max()), size); 1101 DCHECK_GE(static_cast<uint64_t>(std::numeric_limits<int64_t>::max()), size);
1102 1102
1103 // Create and map the file into memory and make it globally available. 1103 // Create and map the file into memory and make it globally available.
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 : GlobalActivityTracker::ScopedThreadActivity( 1378 : GlobalActivityTracker::ScopedThreadActivity(
1379 program_counter, 1379 program_counter,
1380 nullptr, 1380 nullptr,
1381 Activity::ACT_PROCESS_WAIT, 1381 Activity::ACT_PROCESS_WAIT,
1382 ActivityData::ForProcess(process->Pid()), 1382 ActivityData::ForProcess(process->Pid()),
1383 /*lock_allowed=*/true) {} 1383 /*lock_allowed=*/true) {}
1384 #endif 1384 #endif
1385 1385
1386 } // namespace debug 1386 } // namespace debug
1387 } // namespace base 1387 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698