15
15
*/
16
16
17
17
#include " translate-time-profile.hh"
18
- #include " general-regs-only.hh"
19
18
#include " profile-translator.hh"
20
19
21
20
namespace dd {
@@ -41,8 +40,8 @@ class TimeProfileTranslator : ProfileTranslator {
41
40
FIELDS
42
41
#undef X
43
42
44
- v8::Local<v8::Array> getContextsForNode (const v8::CpuProfileNode* node,
45
- uint32_t & hitcount) {
43
+ v8::Local<v8::Array> getContextsForNode (
44
+ const v8::CpuProfileNode* node, uint32_t & hitcount) GENERAL_REGS_ONLY {
46
45
hitcount = node->GetHitCount ();
47
46
if (!contextsByNode) {
48
47
// custom contexts are not enabled, keep the node hitcount and return
@@ -71,7 +70,8 @@ class TimeProfileTranslator : ProfileTranslator {
71
70
v8::Local<v8::Integer> columnNumber,
72
71
v8::Local<v8::Integer> hitCount,
73
72
v8::Local<v8::Array> children,
74
- v8::Local<v8::Array> contexts) {
73
+ v8::Local<v8::Array> contexts)
74
+ GENERAL_REGS_ONLY {
75
75
v8::Local<v8::Object> js_node = NewObject ();
76
76
#define X (name ) Set(js_node, str_##name, name);
77
77
FIELDS
@@ -133,7 +133,8 @@ class TimeProfileTranslator : ProfileTranslator {
133
133
}
134
134
135
135
v8::Local<v8::Object> TranslateLineNumbersTimeProfileNode (
136
- const v8::CpuProfileNode* parent, const v8::CpuProfileNode* node) {
136
+ const v8::CpuProfileNode* parent,
137
+ const v8::CpuProfileNode* node) GENERAL_REGS_ONLY {
137
138
return CreateTimeNode (parent->GetFunctionName (),
138
139
parent->GetScriptResourceName (),
139
140
NewInteger (parent->GetScriptId ()),
@@ -148,7 +149,7 @@ class TimeProfileTranslator : ProfileTranslator {
148
149
// and column number refer to the line/column from which the function was
149
150
// called.
150
151
v8::Local<v8::Value> TranslateLineNumbersTimeProfileRoot (
151
- const v8::CpuProfileNode* node) {
152
+ const v8::CpuProfileNode* node) GENERAL_REGS_ONLY {
152
153
int32_t count = node->GetChildrenCount ();
153
154
std::vector<v8::Local<v8::Array>> childrenArrs (count);
154
155
int32_t childCount = 0 ;
@@ -179,8 +180,8 @@ class TimeProfileTranslator : ProfileTranslator {
179
180
emptyArray);
180
181
}
181
182
182
- v8::Local<v8::Value> TranslateTimeProfileNode (
183
- const v8::CpuProfileNode* node) {
183
+ v8::Local<v8::Value> TranslateTimeProfileNode (const v8::CpuProfileNode* node)
184
+ GENERAL_REGS_ONLY {
184
185
int32_t count = node->GetChildrenCount ();
185
186
v8::Local<v8::Array> children = NewArray (count);
186
187
for (int32_t i = 0 ; i < count; i++) {
@@ -207,7 +208,8 @@ class TimeProfileTranslator : ProfileTranslator {
207
208
v8::Local<v8::Value> TranslateTimeProfile (const v8::CpuProfile* profile,
208
209
bool includeLineInfo,
209
210
bool hasCpuTime,
210
- int64_t nonJSThreadsCpuTime) {
211
+ int64_t nonJSThreadsCpuTime)
212
+ GENERAL_REGS_ONLY {
211
213
v8::Local<v8::Object> js_profile = NewObject ();
212
214
213
215
if (includeLineInfo) {
0 commit comments