Chromium Code Reviews| Index: src/code-stubs.cc |
| =================================================================== |
| --- src/code-stubs.cc (revision 3791) |
| +++ src/code-stubs.cc (working copy) |
| @@ -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 @@ |
| // Add unresolved entries in the code to the fixup list. |
| Bootstrapper::AddFixup(code, masm); |
| +#if defined ENABLE_LOGGING_AND_PROFILING || defined ENABLE_OPROFILE_AGENT |
|
mnaganov (inactive)
2010/02/10 17:39:57
A check for ENABLE_LOGGING_AND_PROFILING isn't nee
|
| + // 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()); |