| Index: src/oprofile-agent.h
|
| diff --git a/src/oprofile-agent.h b/src/oprofile-agent.h
|
| index 4c299bfbc6c5b5beb1e1f33d83dfc3c4984648d7..4c50f0ff7ddbc4e9a51d7996df1f078ddef60e6d 100644
|
| --- a/src/oprofile-agent.h
|
| +++ b/src/oprofile-agent.h
|
| @@ -37,6 +37,14 @@
|
| // system headers (they have __uint64_t), but is defined
|
| // in V8's headers.
|
| #include <opagent.h> // NOLINT
|
| +
|
| +#define OPROFILE(Call) \
|
| + do { \
|
| + if (v8::internal::OProfileAgent::is_enabled()) \
|
| + v8::internal::OProfileAgent::Call; \
|
| + } while (false)
|
| +#else
|
| +#define OPROFILE(Call) ((void) 0)
|
| #endif
|
|
|
| namespace v8 {
|
| @@ -46,13 +54,13 @@ class OProfileAgent {
|
| public:
|
| static bool Initialize();
|
| static void TearDown();
|
| +#ifdef ENABLE_OPROFILE_AGENT
|
| static void CreateNativeCodeRegion(const char* name,
|
| const void* ptr, unsigned int size);
|
| static void CreateNativeCodeRegion(String* name,
|
| const void* ptr, unsigned int size);
|
| static void CreateNativeCodeRegion(String* name, String* source, int line_num,
|
| const void* ptr, unsigned int size);
|
| -#ifdef ENABLE_OPROFILE_AGENT
|
| static bool is_enabled() { return handle_ != NULL; }
|
|
|
| private:
|
|
|