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

Side by Side Diff: src/code-stubs.cc

Issue 10824032: Enables V8 integration with the Intel VTune performance analysis tool. This allows the VTune profi… (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 15 matching lines...) Expand all
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #include "v8.h" 28 #include "v8.h"
29 29
30 #include "bootstrapper.h" 30 #include "bootstrapper.h"
31 #include "code-stubs.h" 31 #include "code-stubs.h"
32 #include "stub-cache.h" 32 #include "stub-cache.h"
33 #include "factory.h" 33 #include "factory.h"
34 #include "gdb-jit.h" 34 #include "gdb-jit.h"
35 #include "macro-assembler.h" 35 #include "macro-assembler.h"
36 #include "third_party/vtune/vtune-jit.h"
36 37
37 namespace v8 { 38 namespace v8 {
38 namespace internal { 39 namespace internal {
39 40
40 bool CodeStub::FindCodeInCache(Code** code_out) { 41 bool CodeStub::FindCodeInCache(Code** code_out) {
41 Heap* heap = Isolate::Current()->heap(); 42 Heap* heap = Isolate::Current()->heap();
42 int index = heap->code_stubs()->FindEntry(GetKey()); 43 int index = heap->code_stubs()->FindEntry(GetKey());
43 if (index != UnseededNumberDictionary::kNotFound) { 44 if (index != UnseededNumberDictionary::kNotFound) {
44 *code_out = Code::cast(heap->code_stubs()->ValueAt(index)); 45 *code_out = Code::cast(heap->code_stubs()->ValueAt(index));
45 return true; 46 return true;
(...skipping 24 matching lines...) Expand all
70 PrintName(&stream); 71 PrintName(&stream);
71 return stream.ToCString(); 72 return stream.ToCString();
72 } 73 }
73 74
74 75
75 void CodeStub::RecordCodeGeneration(Code* code, MacroAssembler* masm) { 76 void CodeStub::RecordCodeGeneration(Code* code, MacroAssembler* masm) {
76 Isolate* isolate = masm->isolate(); 77 Isolate* isolate = masm->isolate();
77 SmartArrayPointer<const char> name = GetName(); 78 SmartArrayPointer<const char> name = GetName();
78 PROFILE(isolate, CodeCreateEvent(Logger::STUB_TAG, code, *name)); 79 PROFILE(isolate, CodeCreateEvent(Logger::STUB_TAG, code, *name));
79 GDBJIT(AddCode(GDBJITInterface::STUB, *name, code)); 80 GDBJIT(AddCode(GDBJITInterface::STUB, *name, code));
81 VTUNEJIT(AddCode(*name, code));
80 Counters* counters = isolate->counters(); 82 Counters* counters = isolate->counters();
81 counters->total_stubs_code_size()->Increment(code->instruction_size()); 83 counters->total_stubs_code_size()->Increment(code->instruction_size());
82 } 84 }
83 85
84 86
85 int CodeStub::GetCodeKind() { 87 int CodeStub::GetCodeKind() {
86 return Code::STUB; 88 return Code::STUB;
87 } 89 }
88 90
89 91
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 // already active, as the hooks won't stack. 488 // already active, as the hooks won't stack.
487 if (entry_hook != 0 && entry_hook_ != 0) 489 if (entry_hook != 0 && entry_hook_ != 0)
488 return false; 490 return false;
489 491
490 entry_hook_ = entry_hook; 492 entry_hook_ = entry_hook;
491 return true; 493 return true;
492 } 494 }
493 495
494 496
495 } } // namespace v8::internal 497 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698