v8-profiler.h | v8-profiler.h | |||
---|---|---|---|---|
skipping to change at line 265 | skipping to change at line 265 | |||
/** | /** | |||
* Returns node name. Depending on node's type this can be the name | * Returns node name. Depending on node's type this can be the name | |||
* of the constructor (for objects), the name of the function (for | * of the constructor (for objects), the name of the function (for | |||
* closures), string value, or an empty string (for compiled code). | * closures), string value, or an empty string (for compiled code). | |||
*/ | */ | |||
Handle<String> GetName() const; | Handle<String> GetName() const; | |||
/** | /** | |||
* Returns node id. For the same heap object, the id remains the same | * Returns node id. For the same heap object, the id remains the same | |||
* across all snapshots. Not applicable to aggregated heap snapshots | * across all snapshots. | |||
* as they only contain aggregated instances. | ||||
*/ | */ | |||
uint64_t GetId() const; | uint64_t GetId() const; | |||
/** | ||||
* Returns the number of instances. Only applicable to aggregated | ||||
* heap snapshots. | ||||
*/ | ||||
int GetInstancesCount() const; | ||||
/** Returns node's own size, in bytes. */ | /** Returns node's own size, in bytes. */ | |||
int GetSelfSize() const; | int GetSelfSize() const; | |||
/** | /** | |||
* Returns node's retained size, in bytes. That is, self + sizes of | * Returns node's retained size, in bytes. That is, self + sizes of | |||
* the objects that are reachable only from this object. In other | * the objects that are reachable only from this object. In other | |||
* words, the size of memory that will be reclaimed having this node | * words, the size of memory that will be reclaimed having this node | |||
* collected. | * collected. | |||
* | * | |||
* Exact retained size calculation has O(N) (number of nodes) | * Exact retained size calculation has O(N) (number of nodes) | |||
skipping to change at line 318 | skipping to change at line 311 | |||
*/ | */ | |||
const HeapGraphNode* GetDominatorNode() const; | const HeapGraphNode* GetDominatorNode() const; | |||
}; | }; | |||
/** | /** | |||
* HeapSnapshots record the state of the JS heap at some moment. | * HeapSnapshots record the state of the JS heap at some moment. | |||
*/ | */ | |||
class V8EXPORT HeapSnapshot { | class V8EXPORT HeapSnapshot { | |||
public: | public: | |||
enum Type { | enum Type { | |||
kFull = 0, // Heap snapshot with all instances and references. | kFull = 0 // Heap snapshot with all instances and references. | |||
kAggregated = 1 // Snapshot doesn't contain individual heap entries, | ||||
// instead they are grouped by constructor name. | ||||
}; | }; | |||
enum SerializationFormat { | enum SerializationFormat { | |||
kJSON = 0 // See format description near 'Serialize' method. | kJSON = 0 // See format description near 'Serialize' method. | |||
}; | }; | |||
/** Returns heap snapshot type. */ | /** Returns heap snapshot type. */ | |||
Type GetType() const; | Type GetType() const; | |||
/** Returns heap snapshot UID (assigned by the profiler.) */ | /** Returns heap snapshot UID (assigned by the profiler.) */ | |||
unsigned GetUid() const; | unsigned GetUid() const; | |||
End of changes. 3 change blocks. | ||||
11 lines changed or deleted | 2 lines changed or added | |||
v8.h | v8.h | |||
---|---|---|---|---|
skipping to change at line 2100 | skipping to change at line 2100 | |||
* | * | |||
* Call with a value of true to make the __proto__ accessor ignore | * Call with a value of true to make the __proto__ accessor ignore | |||
* instances of the function template. Call with a value of false | * instances of the function template. Call with a value of false | |||
* to make the __proto__ accessor not ignore instances of the | * to make the __proto__ accessor not ignore instances of the | |||
* function template. By default, instances of a function template | * function template. By default, instances of a function template | |||
* are not ignored. | * are not ignored. | |||
*/ | */ | |||
void SetHiddenPrototype(bool value); | void SetHiddenPrototype(bool value); | |||
/** | /** | |||
* Sets the property attributes of the 'prototype' property of functions | ||||
* created from this FunctionTemplate. Can be any combination of ReadOnly | ||||
, | ||||
* DontEnum and DontDelete. | ||||
*/ | ||||
void SetPrototypeAttributes(int attributes); | ||||
/** | ||||
* Returns true if the given object is an instance of this function | * Returns true if the given object is an instance of this function | |||
* template. | * template. | |||
*/ | */ | |||
bool HasInstance(Handle<Value> object); | bool HasInstance(Handle<Value> object); | |||
private: | private: | |||
FunctionTemplate(); | FunctionTemplate(); | |||
void AddInstancePropertyAccessor(Handle<String> name, | void AddInstancePropertyAccessor(Handle<String> name, | |||
AccessorGetter getter, | AccessorGetter getter, | |||
AccessorSetter setter, | AccessorSetter setter, | |||
skipping to change at line 2492 | skipping to change at line 2499 | |||
}; | }; | |||
typedef void (*GCPrologueCallback)(GCType type, GCCallbackFlags flags); | typedef void (*GCPrologueCallback)(GCType type, GCCallbackFlags flags); | |||
typedef void (*GCEpilogueCallback)(GCType type, GCCallbackFlags flags); | typedef void (*GCEpilogueCallback)(GCType type, GCCallbackFlags flags); | |||
typedef void (*GCCallback)(); | typedef void (*GCCallback)(); | |||
/** | /** | |||
* Profiler modules. | * Profiler modules. | |||
* | * | |||
* In V8, profiler consists of several modules: CPU profiler, and different | * In V8, profiler consists of several modules. Each can be turned on / off | |||
* kinds of heap profiling. Each can be turned on / off independently. | * independently. | |||
* When PROFILER_MODULE_HEAP_SNAPSHOT flag is passed to ResumeProfilerEx, | ||||
* modules are enabled only temporarily for making a snapshot of the heap. | ||||
*/ | */ | |||
enum ProfilerModules { | enum ProfilerModules { | |||
PROFILER_MODULE_NONE = 0, | PROFILER_MODULE_NONE = 0, | |||
PROFILER_MODULE_CPU = 1, | PROFILER_MODULE_CPU = 1 | |||
PROFILER_MODULE_HEAP_STATS = 1 << 1, | ||||
PROFILER_MODULE_JS_CONSTRUCTORS = 1 << 2, | ||||
PROFILER_MODULE_HEAP_SNAPSHOT = 1 << 16 | ||||
}; | }; | |||
/** | /** | |||
* Collection of V8 heap information. | * Collection of V8 heap information. | |||
* | * | |||
* Instances of this class can be passed to v8::V8::HeapStatistics to | * Instances of this class can be passed to v8::V8::HeapStatistics to | |||
* get heap statistics from V8. | * get heap statistics from V8. | |||
*/ | */ | |||
class V8EXPORT HeapStatistics { | class V8EXPORT HeapStatistics { | |||
public: | public: | |||
End of changes. 3 change blocks. | ||||
8 lines changed or deleted | 11 lines changed or added | |||