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

Side by Side Diff: src/profiler/sampler.h

Issue 1764603003: Handle stack frames differently inside and on the boundary of wasm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 9 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 | « src/objects-inl.h ('k') | src/snapshot/code-serializer.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project 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 V8_PROFILER_SAMPLER_H_ 5 #ifndef V8_PROFILER_SAMPLER_H_
6 #define V8_PROFILER_SAMPLER_H_ 6 #define V8_PROFILER_SAMPLER_H_
7 7
8 #include "include/v8.h" 8 #include "include/v8.h"
9 9
10 #include "src/base/atomicops.h" 10 #include "src/base/atomicops.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 Address tos; // Top stack value (*sp). 51 Address tos; // Top stack value (*sp).
52 Address external_callback; 52 Address external_callback;
53 }; 53 };
54 static const unsigned kMaxFramesCountLog2 = 8; 54 static const unsigned kMaxFramesCountLog2 = 8;
55 static const unsigned kMaxFramesCount = (1 << kMaxFramesCountLog2) - 1; 55 static const unsigned kMaxFramesCount = (1 << kMaxFramesCountLog2) - 1;
56 Address stack[kMaxFramesCount]; // Call stack. 56 Address stack[kMaxFramesCount]; // Call stack.
57 base::TimeTicks timestamp; 57 base::TimeTicks timestamp;
58 unsigned frames_count : kMaxFramesCountLog2; // Number of captured frames. 58 unsigned frames_count : kMaxFramesCountLog2; // Number of captured frames.
59 bool has_external_callback : 1; 59 bool has_external_callback : 1;
60 bool update_stats : 1; // Whether the sample should update aggregated stats. 60 bool update_stats : 1; // Whether the sample should update aggregated stats.
61 StackFrame::Type top_frame_type : 4; 61 StackFrame::Type top_frame_type : 5;
62 }; 62 };
63 63
64 class Sampler { 64 class Sampler {
65 public: 65 public:
66 // Initializes the Sampler support. Called once at VM startup. 66 // Initializes the Sampler support. Called once at VM startup.
67 static void SetUp(); 67 static void SetUp();
68 static void TearDown(); 68 static void TearDown();
69 69
70 // Initialize sampler. 70 // Initialize sampler.
71 Sampler(Isolate* isolate, int interval); 71 Sampler(Isolate* isolate, int interval);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 unsigned js_sample_count_; 130 unsigned js_sample_count_;
131 unsigned external_sample_count_; 131 unsigned external_sample_count_;
132 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); 132 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler);
133 }; 133 };
134 134
135 135
136 } // namespace internal 136 } // namespace internal
137 } // namespace v8 137 } // namespace v8
138 138
139 #endif // V8_PROFILER_SAMPLER_H_ 139 #endif // V8_PROFILER_SAMPLER_H_
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/snapshot/code-serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698