V8 Project
cpu-profiler-inl.h
Go to the documentation of this file.
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
3 // found in the LICENSE file.
4 
5 #ifndef V8_CPU_PROFILER_INL_H_
6 #define V8_CPU_PROFILER_INL_H_
7 
8 #include "src/cpu-profiler.h"
9 
10 #include <new>
11 #include "src/circular-queue-inl.h"
13 #include "src/unbound-queue-inl.h"
14 
15 namespace v8 {
16 namespace internal {
17 
18 void CodeCreateEventRecord::UpdateCodeMap(CodeMap* code_map) {
19  code_map->AddCode(start, entry, size);
20  if (shared != NULL) {
21  entry->set_shared_id(code_map->GetSharedId(shared));
22  }
23 }
24 
25 
26 void CodeMoveEventRecord::UpdateCodeMap(CodeMap* code_map) {
27  code_map->MoveCode(from, to);
28 }
29 
30 
31 void CodeDisableOptEventRecord::UpdateCodeMap(CodeMap* code_map) {
32  CodeEntry* entry = code_map->FindEntry(start);
33  if (entry != NULL) {
34  entry->set_bailout_reason(bailout_reason);
35  }
36 }
37 
38 
39 void SharedFunctionInfoMoveEventRecord::UpdateCodeMap(CodeMap* code_map) {
40  code_map->MoveCode(from, to);
41 }
42 
43 
44 void ReportBuiltinEventRecord::UpdateCodeMap(CodeMap* code_map) {
45  CodeEntry* entry = code_map->FindEntry(start);
46  if (!entry) {
47  // Code objects for builtins should already have been added to the map but
48  // some of them have been filtered out by CpuProfiler.
49  return;
50  }
51  entry->SetBuiltinId(builtin_id);
52 }
53 
54 
57  return NULL;
58 }
59 
60 
63 }
64 
65 
67  void* address = ticks_buffer_.StartEnqueue();
68  if (address == NULL) return NULL;
71  return &evt->sample;
72 }
73 
74 
76  ticks_buffer_.FinishEnqueue();
77 }
78 
79 } } // namespace v8::internal
80 
81 #endif // V8_CPU_PROFILER_INL_H_
void set_shared_id(int shared_id)
TickSample * StartTickSample()
ProfilerEventsProcessor * processor_
Definition: cpu-profiler.h:262
SamplingCircularQueue< TickSampleEventRecord, kTickSampleQueueLength > ticks_buffer_
Definition: cpu-profiler.h:174
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
Debugger support for the V8 JavaScript engine.
Definition: accessors.cc:20