1 // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are
7 // * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer.
9 // * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following disclaimer
11 // in the documentation and/or other materials provided with the
13 // * Neither the name of Google Inc. nor the name Chromium Embedded
14 // Framework nor the names of its contributors may be used to endorse
15 // or promote products derived from this software without specific prior
16 // written permission.
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 #ifndef CEF_INCLUDE_INTERNAL_CEF_TRACE_EVENT_INTERNAL_H_
31 #define CEF_INCLUDE_INTERNAL_CEF_TRACE_EVENT_INTERNAL_H_
34 #include "include/internal/cef_export.h"
35 #include "include/internal/cef_types.h"
41 // See include/base/cef_trace_event.h for macros and intended usage.
43 // Functions for tracing counters and functions; called from macros.
44 // - |category| string must have application lifetime (static or literal). They
45 // may not include "(quotes) chars.
46 // - |argX_name|, |argX_val|, |valueX_name|, |valeX_val| are optional parameters
47 // and represent pairs of name and values of arguments
48 // - |copy| is used to avoid memory scoping issues with the |name| and
49 // |arg_name| parameters by copying them
50 // - |id| is used to disambiguate counters with the same name, or match async
53 CEF_EXPORT void cef_trace_event_instant(const char* category,
55 const char* arg1_name,
57 const char* arg2_name,
60 CEF_EXPORT void cef_trace_event_begin(const char* category,
62 const char* arg1_name,
64 const char* arg2_name,
67 CEF_EXPORT void cef_trace_event_end(const char* category,
69 const char* arg1_name,
71 const char* arg2_name,
74 CEF_EXPORT void cef_trace_counter(const char* category,
76 const char* value1_name,
78 const char* value2_name,
81 CEF_EXPORT void cef_trace_counter_id(const char* category,
84 const char* value1_name,
86 const char* value2_name,
89 CEF_EXPORT void cef_trace_event_async_begin(const char* category,
92 const char* arg1_name,
94 const char* arg2_name,
97 CEF_EXPORT void cef_trace_event_async_step_into(const char* category,
101 const char* arg1_name,
104 CEF_EXPORT void cef_trace_event_async_step_past(const char* category,
108 const char* arg1_name,
111 CEF_EXPORT void cef_trace_event_async_end(const char* category,
114 const char* arg1_name,
116 const char* arg2_name,
122 #endif // __cplusplus
124 #endif // CEF_INCLUDE_INTERNAL_CEF_TRACE_EVENT_INTERNAL_H_