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

Side by Side Diff: base/tracked_objects.h

Issue 1113463003: Inlining DeathData accessors, per earlier CR's comment (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 unified diff | Download patch
« no previous file with comments | « no previous file | base/tracked_objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef BASE_TRACKED_OBJECTS_H_ 5 #ifndef BASE_TRACKED_OBJECTS_H_
6 #define BASE_TRACKED_OBJECTS_H_ 6 #define BASE_TRACKED_OBJECTS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <stack> 10 #include <stack>
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 ~DeathData(); 331 ~DeathData();
332 332
333 // Update stats for a task destruction (death) that had a Run() time of 333 // Update stats for a task destruction (death) that had a Run() time of
334 // |duration|, and has had a queueing delay of |queue_duration|. 334 // |duration|, and has had a queueing delay of |queue_duration|.
335 void RecordDeath(const int32 queue_duration, 335 void RecordDeath(const int32 queue_duration,
336 const int32 run_duration, 336 const int32 run_duration,
337 const uint32 random_number); 337 const uint32 random_number);
338 338
339 // Metrics and past snapshots accessors, used only for serialization and in 339 // Metrics and past snapshots accessors, used only for serialization and in
340 // tests. 340 // tests.
341 int count() const; 341 int count() const { return count_; }
342 int32 run_duration_sum() const; 342 int32 run_duration_sum() const { return run_duration_sum_; }
343 int32 run_duration_max() const; 343 int32 run_duration_max() const { return run_duration_max_; }
344 int32 run_duration_sample() const; 344 int32 run_duration_sample() const { return run_duration_sample_; }
345 int32 queue_duration_sum() const; 345 int32 queue_duration_sum() const { return queue_duration_sum_; }
346 int32 queue_duration_max() const; 346 int32 queue_duration_max() const { return queue_duration_max_; }
347 int32 queue_duration_sample() const; 347 int32 queue_duration_sample() const { return queue_duration_sample_; }
348 const DeathDataPhaseSnapshot* last_phase_snapshot() const; 348 const DeathDataPhaseSnapshot* last_phase_snapshot() const {
349 return last_phase_snapshot_;
350 }
349 351
350 // Called when the current profiling phase, identified by |profiling_phase|, 352 // Called when the current profiling phase, identified by |profiling_phase|,
351 // ends. 353 // ends.
352 // Must be called only on the snapshot thread. 354 // Must be called only on the snapshot thread.
353 void OnProfilingPhaseCompleted(int profiling_phase); 355 void OnProfilingPhaseCompleted(int profiling_phase);
354 356
355 private: 357 private:
356 // Members are ordered from most regularly read and updated, to least 358 // Members are ordered from most regularly read and updated, to least
357 // frequently used. This might help a bit with cache lines. 359 // frequently used. This might help a bit with cache lines.
358 // Number of runs seen (divisor for calculating averages). 360 // Number of runs seen (divisor for calculating averages).
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 ProcessDataSnapshot(); 866 ProcessDataSnapshot();
865 ~ProcessDataSnapshot(); 867 ~ProcessDataSnapshot();
866 868
867 PhasedProcessDataSnapshotMap phased_snapshots; 869 PhasedProcessDataSnapshotMap phased_snapshots;
868 base::ProcessId process_id; 870 base::ProcessId process_id;
869 }; 871 };
870 872
871 } // namespace tracked_objects 873 } // namespace tracked_objects
872 874
873 #endif // BASE_TRACKED_OBJECTS_H_ 875 #endif // BASE_TRACKED_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | base/tracked_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698