65 #define OLD_DEPRECATED __DEPRECATED
71 #include <ext/hash_map>
72 using namespace __gnu_cxx;
74 #define __DEPRECATED OLD_DEPRECATED
98 : pc_(
pc), pos_(pos) { }
105 return &line_num_info_;
110 line_num_info_.push_back(line_info);
116 bool operator () (
void* key1,
void* key2)
const {
123 static const uintptr_t kGoldenRatio = 2654435761u;
125 return static_cast<uint32_t>(hash * kGoldenRatio);
132 typedef hash_map<void*, void*, HashForCodeObject, SameCodeObjects>
JitInfoMap;
137 if (entries ==
NULL) {
144 return 0 != (
reinterpret_cast<intptr_t
>(ptr));
149 reinterpret_cast<intptr_t
>(ptr));
159 char* start_ptr =
NULL;
161 while (str[index++] !=
':' && (index < length)) {}
163 if (str[index] ==
'*' || str[index] ==
'~' ) index++;
164 if (index >= length)
return NULL;
166 start_ptr =
const_cast<char*
>(str + index);
168 while (index < length && str[index++] !=
' ') {
172 char* result =
new char[count + 1];
173 memcpy(result, start_ptr, count);
174 result[count] =
'\0';
182 switch (event->
type) {
184 char* temp_file_name =
NULL;
185 char* temp_method_name =
187 static_cast<int>(event->
name.
len));
189 memset(&jmethod, 0,
sizeof jmethod);
192 jmethod.
method_size =
static_cast<unsigned int>(
event->code_len);
197 if (*script !=
NULL) {
199 if ((*script->GetScriptName())->IsString()) {
201 temp_file_name =
new char[script_name->Utf8Length() + 1];
202 script_name->WriteUtf8(temp_file_name);
206 JitInfoMap::iterator entry =
211 std::list<JITCodeLineInfo::LineNumInfo>* vtunelineinfo =
219 std::list<JITCodeLineInfo::LineNumInfo>::iterator Iter;
221 for (Iter = vtunelineinfo->begin();
222 Iter != vtunelineinfo->end();
225 static_cast<unsigned int>(Iter->pc_);
227 script->GetLineNumber(Iter->pos_) + 1;
234 reinterpret_cast<void*
>(&jmethod));
235 if (temp_method_name)
236 delete []temp_method_name;
238 delete []temp_file_name;
250 if (line_info !=
NULL) {
252 static_cast<int>(
event->line_info.pos));
276 (
int)strlen(
"--nocompact_code_space"));
An object reference managed by the v8 garbage collector.
static void SetFlagsFromString(const char *str, int length)
Sets V8 flags from a string.
void SetPosition(intptr_t pc, int pos)
void AddCodeLineInfo(const LineNumInfo &line_info)
std::list< LineNumInfo > * GetLineNumInfo()
std::list< LineNumInfo > line_num_info_
static void event_handler(const v8::JitCodeEvent *event)
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
ITT_EXTERN_C int JITAPI iJIT_NotifyEvent(iJIT_JVM_EVENT event_type, void *EventSpecificData)
ITT_EXTERN_C unsigned int JITAPI iJIT_GetNewMethodID()
@ iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED
static JitInfoMap * GetEntries()
static char * GetFunctionNameFromMixedName(const char *str, int length)
static JITCodeLineInfo * UntagLineInfo(void *ptr)
hash_map< void *, void *, HashForCodeObject, SameCodeObjects > JitInfoMap
static bool IsLineInfoTagged(void *ptr)
void InitializeVtuneForV8(v8::Isolate::CreateParams ¶ms)
unsigned int line_number_size
pLineNumberInfo line_number_table
void * method_load_address
Initial configuration parameters for a new Isolate.
JitCodeEventHandler code_event_handler
Allows the host application to provide the address of a function that is notified each time code is a...
A JIT code event is issued each time code is added, moved or removed.
struct line_info_t line_info
@ CODE_END_LINE_INFO_RECORDING
@ CODE_START_LINE_INFO_RECORDING
LineNumInfo(intptr_t pc, int pos)