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

Unified Diff: include/v8-profiler.h

Issue 22715004: Version 3.20.15 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Add TypedArray API and correctness patches r16033 and r16084 Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/v8-preparser.h ('k') | include/v8-testing.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8-profiler.h
diff --git a/include/v8-profiler.h b/include/v8-profiler.h
index 1d7b70d3c4e7988a2f8090ed2c1ef84da1bd195b..cf2834130053656f5ecd7d30d08d1f0627544d40 100644
--- a/include/v8-profiler.h
+++ b/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;
@@ -95,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;
@@ -119,18 +149,6 @@ class V8_EXPORT CpuProfile {
const CpuProfileNode* GetSample(int index) const;
/**
- * Returns time when the profile recording started (in microseconds
- * since the Epoch).
- */
- int64_t GetStartTime() const;
-
- /**
- * Returns time when the profile recording was stopped (in microseconds
- * since the Epoch).
- */
- int64_t GetEndTime() const;
-
- /**
* Deletes the profile and removes it from CpuProfiler's list.
* All pointers to nodes previously returned become invalid.
* Profiles with the same uid but obtained using different
@@ -146,7 +164,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
@@ -207,7 +225,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.
@@ -243,7 +261,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.
@@ -295,7 +313,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.
@@ -365,7 +383,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
@@ -503,7 +521,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;
@@ -569,4 +587,7 @@ struct HeapStatsUpdate {
} // namespace v8
+#undef V8EXPORT
+
+
#endif // V8_V8_PROFILER_H_
« no previous file with comments | « include/v8-preparser.h ('k') | include/v8-testing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698