Report code stubs to OProfile.
Patch from Dineel D Sule <dsule@codeaurora.org>. Original issue: http://codereview.chromium.org/600019 TBR=sgjesse@chromium.org Review URL: http://codereview.chromium.org/593038 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3831 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
9344612bef
commit
4f7b9e4da3
1
AUTHORS
1
AUTHORS
@ -23,3 +23,4 @@ Rene Rebe <rene@exactcode.de>
|
||||
Ryan Dahl <coldredlemur@gmail.com>
|
||||
Patrick Gansterer <paroga@paroga.com>
|
||||
Subrato K De <subratokde@codeaurora.org>
|
||||
Dineel D Sule <dsule@codeaurora.org>
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "code-stubs.h"
|
||||
#include "factory.h"
|
||||
#include "macro-assembler.h"
|
||||
#include "oprofile-agent.h"
|
||||
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
@ -63,6 +64,13 @@ void CodeStub::RecordCodeGeneration(Code* code, MacroAssembler* masm) {
|
||||
// Add unresolved entries in the code to the fixup list.
|
||||
Bootstrapper::AddFixup(code, masm);
|
||||
|
||||
#ifdef ENABLE_OPROFILE_AGENT
|
||||
// Register the generated stub with the OPROFILE agent.
|
||||
OProfileAgent::CreateNativeCodeRegion(GetName(),
|
||||
code->instruction_start(),
|
||||
code->instruction_size());
|
||||
#endif
|
||||
|
||||
LOG(CodeCreateEvent(Logger::STUB_TAG, code, GetName()));
|
||||
Counters::total_stubs_code_size.Increment(code->instruction_size());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user