1 // Copyright (c) 2009 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.
5 // An abstraction for functions used to control execution time profiling.
6 // All methods are effectively no-ops unless this program is being run through
7 // a supported tool (currently only Quantify, a companion tool to Purify)
9 #ifndef BASE_PROFILER_H__
10 #define BASE_PROFILER_H__
12 #include "base/basictypes.h"
18 // Starts or resumes recording.
19 static void StartRecording();
21 // Stops recording until StartRecording is called or the program exits.
22 static void StopRecording();
24 // Throw away data collected so far. This can be useful to call before
25 // your first call to StartRecording, for instance to avoid counting any
26 // time in application startup.
27 static void ClearData();
29 // Sets the name of the current thread for display in the profiler's UI.
30 static void SetThreadName(const char *name
);
33 DISALLOW_IMPLICIT_CONSTRUCTORS(Profiler
);
38 #endif // BASE_PROFILER_H__