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

Side by Side Diff: src/cpu-profiler-inl.h

Issue 941973002: CpuProfiler: eliminate cpu-profiler dependency from heap-inl.h (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comments addressed Created 5 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
« no previous file with comments | « src/cpu-profiler.cc ('k') | src/deoptimizer.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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_CPU_PROFILER_INL_H_ 5 #ifndef V8_CPU_PROFILER_INL_H_
6 #define V8_CPU_PROFILER_INL_H_ 6 #define V8_CPU_PROFILER_INL_H_
7 7
8 #include "src/cpu-profiler.h" 8 #include "src/cpu-profiler.h"
9 9
10 #include <new> 10 #include <new>
11 #include "src/circular-queue-inl.h" 11 #include "src/circular-queue-inl.h"
12 #include "src/profile-generator-inl.h" 12 #include "src/profile-generator-inl.h"
13 #include "src/unbound-queue-inl.h" 13 #include "src/unbound-queue-inl.h"
14 14
15 namespace v8 { 15 namespace v8 {
16 namespace internal { 16 namespace internal {
17 17
18 void CodeCreateEventRecord::UpdateCodeMap(CodeMap* code_map) { 18 void CodeCreateEventRecord::UpdateCodeMap(CodeMap* code_map) {
19 code_map->AddCode(start, entry, size); 19 code_map->AddCode(start, entry, size);
20 if (shared != NULL) {
21 entry->set_shared_id(code_map->GetSharedId(shared));
22 }
23 } 20 }
24 21
25 22
26 void CodeMoveEventRecord::UpdateCodeMap(CodeMap* code_map) { 23 void CodeMoveEventRecord::UpdateCodeMap(CodeMap* code_map) {
27 code_map->MoveCode(from, to); 24 code_map->MoveCode(from, to);
28 } 25 }
29 26
30 27
31 void CodeDisableOptEventRecord::UpdateCodeMap(CodeMap* code_map) { 28 void CodeDisableOptEventRecord::UpdateCodeMap(CodeMap* code_map) {
32 CodeEntry* entry = code_map->FindEntry(start); 29 CodeEntry* entry = code_map->FindEntry(start);
33 if (entry != NULL) { 30 if (entry != NULL) {
34 entry->set_bailout_reason(bailout_reason); 31 entry->set_bailout_reason(bailout_reason);
35 } 32 }
36 } 33 }
37 34
38 35
39 void CodeDeoptEventRecord::UpdateCodeMap(CodeMap* code_map) { 36 void CodeDeoptEventRecord::UpdateCodeMap(CodeMap* code_map) {
40 CodeEntry* entry = code_map->FindEntry(start); 37 CodeEntry* entry = code_map->FindEntry(start);
41 if (entry != NULL) entry->set_deopt_info(deopt_reason, raw_position); 38 if (entry != NULL) entry->set_deopt_info(deopt_reason, raw_position);
42 } 39 }
43 40
44 41
45 void SharedFunctionInfoMoveEventRecord::UpdateCodeMap(CodeMap* code_map) {
46 code_map->MoveCode(from, to);
47 }
48
49
50 void ReportBuiltinEventRecord::UpdateCodeMap(CodeMap* code_map) { 42 void ReportBuiltinEventRecord::UpdateCodeMap(CodeMap* code_map) {
51 CodeEntry* entry = code_map->FindEntry(start); 43 CodeEntry* entry = code_map->FindEntry(start);
52 if (!entry) { 44 if (!entry) {
53 // Code objects for builtins should already have been added to the map but 45 // Code objects for builtins should already have been added to the map but
54 // some of them have been filtered out by CpuProfiler. 46 // some of them have been filtered out by CpuProfiler.
55 return; 47 return;
56 } 48 }
57 entry->SetBuiltinId(builtin_id); 49 entry->SetBuiltinId(builtin_id);
58 } 50 }
59 51
(...skipping 18 matching lines...) Expand all
78 } 70 }
79 71
80 72
81 void ProfilerEventsProcessor::FinishTickSample() { 73 void ProfilerEventsProcessor::FinishTickSample() {
82 ticks_buffer_.FinishEnqueue(); 74 ticks_buffer_.FinishEnqueue();
83 } 75 }
84 76
85 } } // namespace v8::internal 77 } } // namespace v8::internal
86 78
87 #endif // V8_CPU_PROFILER_INL_H_ 79 #endif // V8_CPU_PROFILER_INL_H_
OLDNEW
« no previous file with comments | « src/cpu-profiler.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698