OLD | NEW |
1 /* | 1 /* |
2 This file is provided under a dual BSD/GPLv2 license. When using or | 2 This file is provided under a dual BSD/GPLv2 license. When using or |
3 redistributing this file, you may do so under either license. | 3 redistributing this file, you may do so under either license. |
4 | 4 |
5 GPL LICENSE SUMMARY | 5 GPL LICENSE SUMMARY |
6 | 6 |
7 Copyright(c) 2005-2012 Intel Corporation. All rights reserved. | 7 Copyright(c) 2005-2012 Intel Corporation. All rights reserved. |
8 | 8 |
9 This program is free software; you can redistribute it and/or modify | 9 This program is free software; you can redistribute it and/or modify |
10 it under the terms of version 2 of the GNU General Public License as | 10 it under the terms of version 2 of the GNU General Public License as |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 jmethod.method_size = static_cast<unsigned int>(event->code_len); | 187 jmethod.method_size = static_cast<unsigned int>(event->code_len); |
188 jmethod.method_name = temp_method_name; | 188 jmethod.method_name = temp_method_name; |
189 | 189 |
190 Handle<Script> script = event->script; | 190 Handle<Script> script = event->script; |
191 | 191 |
192 if (*script != NULL) { | 192 if (*script != NULL) { |
193 // Get the source file name and set it to jmethod.source_file_name | 193 // Get the source file name and set it to jmethod.source_file_name |
194 if ((*script->GetScriptName())->IsString()) { | 194 if ((*script->GetScriptName())->IsString()) { |
195 Handle<String> script_name = | 195 Handle<String> script_name = |
196 Handle<String>(String::Cast(*script->GetScriptName())); | 196 Handle<String>(String::Cast(*script->GetScriptName())); |
197 temp_file_name = new char[script_name->Length() + 1]; | 197 temp_file_name = new char[script_name->Utf8Length() + 1]; |
198 script_name->WriteAscii(temp_file_name); | 198 script_name->WriteUtf8(temp_file_name); |
199 jmethod.source_file_name = temp_file_name; | 199 jmethod.source_file_name = temp_file_name; |
200 } | 200 } |
201 | 201 |
202 JitInfoMap::iterator entry = | 202 JitInfoMap::iterator entry = |
203 GetEntries()->find(event->code_start); | 203 GetEntries()->find(event->code_start); |
204 if (entry != GetEntries()->end() && IsLineInfoTagged(entry->first)) { | 204 if (entry != GetEntries()->end() && IsLineInfoTagged(entry->first)) { |
205 JITCodeLineInfo* line_info = UntagLineInfo(entry->second); | 205 JITCodeLineInfo* line_info = UntagLineInfo(entry->second); |
206 // Get the line_num_info and set it to jmethod.line_number_table | 206 // Get the line_num_info and set it to jmethod.line_number_table |
207 std::list<JITCodeLineInfo::LineNumInfo>* vtunelineinfo = | 207 std::list<JITCodeLineInfo::LineNumInfo>* vtunelineinfo = |
208 line_info->GetLineNumInfo(); | 208 line_info->GetLineNumInfo(); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 void InitilizeVtuneForV8() { | 270 void InitilizeVtuneForV8() { |
271 if (v8::V8::Initialize()) { | 271 if (v8::V8::Initialize()) { |
272 v8::V8::SetFlagsFromString("--nocompact_code_space", | 272 v8::V8::SetFlagsFromString("--nocompact_code_space", |
273 (int)strlen("--nocompact_code_space")); | 273 (int)strlen("--nocompact_code_space")); |
274 v8::V8::SetJitCodeEventHandler(v8::kJitCodeEventDefault, | 274 v8::V8::SetJitCodeEventHandler(v8::kJitCodeEventDefault, |
275 vTune::internal::VTUNEJITInterface::event_handler); | 275 vTune::internal::VTUNEJITInterface::event_handler); |
276 } | 276 } |
277 } | 277 } |
278 | 278 |
279 } // namespace vTune | 279 } // namespace vTune |
OLD | NEW |