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

Side by Side Diff: chrome/common/profiling.h

Issue 6250070: Added command line switches and UI (controlled via a build option) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Some cleanup Created 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_COMMON_PROFILING_H_
6 #define CHROME_COMMON_PROFILING_H_
7 #pragma once
8
9 #include "build/build_config.h"
10
11 #include "base/basictypes.h"
12 #include "base/debug/profiler.h"
13
14 // The Profiling class manages the interaction with a sampling based profiler.
15 // Its function is controlled by the kProfilingAtStart, kProfilingFile, and
16 // kProfilingFlush command line values.
17 class Profiling {
18 public:
19 // Called early in a process' life to allow profiling of the startup process.
20 static void StartAtStart();
21
22 // Start profiling.
23 static void Start();
24
25 // Stop profiling and write out profiling file.
26 static void Stop();
27
28 // Returns true if the process is being profiled.
29 static bool BeingProfiled();
30
31 // Called when the main message loop is started, so that automatic flushing
32 // of the profile data file can be done.
33 static void MainMessageLoopStarted();
34
35 // Toggle profiling on/off.
36 static void Toggle();
37
38 private:
39 // Do not instantiate this class.
40 Profiling();
41
42 DISALLOW_COPY_AND_ASSIGN(Profiling);
43 };
44
45 #endif // CHROME_COMMON_PROFILING_H_
46
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698