diff options
Diffstat (limited to 'chromium/v8/include/v8-profiler.h')
-rw-r--r-- | chromium/v8/include/v8-profiler.h | 69 |
1 files changed, 45 insertions, 24 deletions
diff --git a/chromium/v8/include/v8-profiler.h b/chromium/v8/include/v8-profiler.h index e538f4a8406..7898fef1967 100644 --- a/chromium/v8/include/v8-profiler.h +++ b/chromium/v8/include/v8-profiler.h @@ -30,6 +30,36 @@ #include "v8.h" +#ifdef _WIN32 +// Setup for Windows DLL export/import. See v8.h in this directory for +// information on how to build/use V8 as a DLL. +#if defined(BUILDING_V8_SHARED) && defined(USING_V8_SHARED) +#error both BUILDING_V8_SHARED and USING_V8_SHARED are set - please check the\ + build configuration to ensure that at most one of these is set +#endif + +#ifdef BUILDING_V8_SHARED +#define V8EXPORT __declspec(dllexport) +#elif USING_V8_SHARED +#define V8EXPORT __declspec(dllimport) +#else +#define V8EXPORT +#endif + +#else // _WIN32 + +// Setup for Linux shared library export. See v8.h in this directory for +// information on how to build/use V8 as shared library. +#if defined(__GNUC__) && ((__GNUC__ >= 4) || \ + (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(V8_SHARED) +#define V8EXPORT __attribute__ ((visibility("default"))) +#else +#define V8EXPORT +#endif + +#endif // _WIN32 + + /** * Profiler support for the V8 JavaScript engine. */ @@ -40,7 +70,7 @@ typedef uint32_t SnapshotObjectId; /** * CpuProfileNode represents a node in a call graph. */ -class V8_EXPORT CpuProfileNode { +class V8EXPORT CpuProfileNode { public: /** Returns function name (empty string for anonymous functions.) */ Handle<String> GetFunctionName() const; @@ -61,27 +91,20 @@ class V8_EXPORT CpuProfileNode { * Returns total (self + children) execution time of the function, * in milliseconds, estimated by samples count. */ - V8_DEPRECATED(double GetTotalTime() const); + double GetTotalTime() const; /** * Returns self execution time of the function, in milliseconds, * estimated by samples count. */ - V8_DEPRECATED(double GetSelfTime() const); + double GetSelfTime() const; /** Returns the count of samples where function exists. */ - V8_DEPRECATED(double GetTotalSamplesCount() const); + double GetTotalSamplesCount() const; - /** DEPRECATED. Please use GetHitCount instead. - * Returns the count of samples where function was currently executing. - */ + /** Returns the count of samples where function was currently executing. */ double GetSelfSamplesCount() const; - /** - * Returns the count of samples where the function was currently executing. - */ - unsigned GetHitCount() const; - /** Returns function entry UID. */ unsigned GetCallUid() const; @@ -102,7 +125,7 @@ class V8_EXPORT CpuProfileNode { * CpuProfile contains a CPU profile in a form of top-down call tree * (from main() down to functions that do all the work). */ -class V8_EXPORT CpuProfile { +class V8EXPORT CpuProfile { public: /** Returns CPU profile UID (assigned by the profiler.) */ unsigned GetUid() const; @@ -153,7 +176,7 @@ class V8_EXPORT CpuProfile { * Interface for controlling CPU profiling. Instance of the * profiler can be retrieved using v8::Isolate::GetCpuProfiler. */ -class V8_EXPORT CpuProfiler { +class V8EXPORT CpuProfiler { public: /** * A note on security tokens usage. As scripts from different @@ -199,11 +222,6 @@ class V8_EXPORT CpuProfiler { */ void DeleteAllCpuProfiles(); - /** - * Tells the profiler whether the embedder is idle. - */ - void SetIdle(bool is_idle); - private: CpuProfiler(); ~CpuProfiler(); @@ -219,7 +237,7 @@ class HeapGraphNode; * HeapSnapshotEdge represents a directed connection between heap * graph nodes: from retainers to retained nodes. */ -class V8_EXPORT HeapGraphEdge { +class V8EXPORT HeapGraphEdge { public: enum Type { kContextVariable = 0, // A variable from a function context. @@ -255,7 +273,7 @@ class V8_EXPORT HeapGraphEdge { /** * HeapGraphNode represents a node in a heap graph. */ -class V8_EXPORT HeapGraphNode { +class V8EXPORT HeapGraphNode { public: enum Type { kHidden = 0, // Hidden node, may be filtered when shown to user. @@ -307,7 +325,7 @@ class V8_EXPORT HeapGraphNode { /** * HeapSnapshots record the state of the JS heap at some moment. */ -class V8_EXPORT HeapSnapshot { +class V8EXPORT HeapSnapshot { public: enum SerializationFormat { kJSON = 0 // See format description near 'Serialize' method. @@ -377,7 +395,7 @@ class RetainedObjectInfo; * Interface for controlling heap profiling. Instance of the * profiler can be retrieved using v8::Isolate::GetHeapProfiler. */ -class V8_EXPORT HeapProfiler { +class V8EXPORT HeapProfiler { public: /** * Callback function invoked for obtaining RetainedObjectInfo for @@ -515,7 +533,7 @@ class V8_EXPORT HeapProfiler { * keeps them alive only during snapshot collection. Afterwards, they * are freed by calling the Dispose class function. */ -class V8_EXPORT RetainedObjectInfo { // NOLINT +class V8EXPORT RetainedObjectInfo { // NOLINT public: /** Called by V8 when it no longer needs an instance. */ virtual void Dispose() = 0; @@ -581,4 +599,7 @@ struct HeapStatsUpdate { } // namespace v8 +#undef V8EXPORT + + #endif // V8_V8_PROFILER_H_ |