v8-profiler.h | v8-profiler.h | |||
---|---|---|---|---|
skipping to change at line 107 | skipping to change at line 107 | |||
/** Returns the count of samples where function exists. */ | /** Returns the count of samples where function exists. */ | |||
double GetTotalSamplesCount() const; | double GetTotalSamplesCount() const; | |||
/** Returns the count of samples where function was currently executing. */ | /** Returns the count of samples where function was currently executing. */ | |||
double GetSelfSamplesCount() const; | double GetSelfSamplesCount() const; | |||
/** Returns function entry UID. */ | /** Returns function entry UID. */ | |||
unsigned GetCallUid() const; | unsigned GetCallUid() const; | |||
/** Returns id of the node. The id is unique within the tree */ | ||||
unsigned GetNodeId() const; | ||||
/** Returns child nodes count of the node. */ | /** Returns child nodes count of the node. */ | |||
int GetChildrenCount() const; | int GetChildrenCount() const; | |||
/** Retrieves a child node by index. */ | /** Retrieves a child node by index. */ | |||
const CpuProfileNode* GetChild(int index) const; | const CpuProfileNode* GetChild(int index) const; | |||
static const int kNoLineNumberInfo = Message::kNoLineNumberInfo; | static const int kNoLineNumberInfo = Message::kNoLineNumberInfo; | |||
}; | }; | |||
/** | /** | |||
* CpuProfile contains a CPU profile in a form of two call trees: | * CpuProfile contains a CPU profile in a form of top-down call tree | |||
* - top-down (from main() down to functions that do all the work); | * (from main() down to functions that do all the work). | |||
* - bottom-up call graph (in backward direction). | ||||
*/ | */ | |||
class V8EXPORT CpuProfile { | class V8EXPORT CpuProfile { | |||
public: | public: | |||
/** Returns CPU profile UID (assigned by the profiler.) */ | /** Returns CPU profile UID (assigned by the profiler.) */ | |||
unsigned GetUid() const; | unsigned GetUid() const; | |||
/** Returns CPU profile title. */ | /** Returns CPU profile title. */ | |||
Handle<String> GetTitle() const; | Handle<String> GetTitle() const; | |||
/** Returns the root node of the bottom up call tree. */ | ||||
const CpuProfileNode* GetBottomUpRoot() const; | ||||
/** Returns the root node of the top down call tree. */ | /** Returns the root node of the top down call tree. */ | |||
const CpuProfileNode* GetTopDownRoot() const; | const CpuProfileNode* GetTopDownRoot() const; | |||
/** | /** | |||
* Returns number of samples recorded. The samples are not recorded unle | ||||
ss | ||||
* |record_samples| parameter of CpuProfiler::StartProfiling is true. | ||||
*/ | ||||
int GetSamplesCount() const; | ||||
/** | ||||
* Returns profile node corresponding to the top frame the sample at | ||||
* the given index. | ||||
*/ | ||||
const CpuProfileNode* GetSample(int index) const; | ||||
/** | ||||
* Deletes the profile and removes it from CpuProfiler's list. | * Deletes the profile and removes it from CpuProfiler's list. | |||
* All pointers to nodes previously returned become invalid. | * All pointers to nodes previously returned become invalid. | |||
* Profiles with the same uid but obtained using different | * Profiles with the same uid but obtained using different | |||
* security token are not deleted, but become inaccessible | * security token are not deleted, but become inaccessible | |||
* using FindProfile method. It is embedder's responsibility | * using FindProfile method. It is embedder's responsibility | |||
* to call Delete on these profiles. | * to call Delete on these profiles. | |||
*/ | */ | |||
void Delete(); | void Delete(); | |||
}; | }; | |||
skipping to change at line 183 | skipping to change at line 194 | |||
unsigned uid, | unsigned uid, | |||
Handle<Value> security_token = Handle<Value>()); | Handle<Value> security_token = Handle<Value>()); | |||
/** | /** | |||
* Starts collecting CPU profile. Title may be an empty string. It | * Starts collecting CPU profile. Title may be an empty string. It | |||
* is allowed to have several profiles being collected at | * is allowed to have several profiles being collected at | |||
* once. Attempts to start collecting several profiles with the same | * once. Attempts to start collecting several profiles with the same | |||
* title are silently ignored. While collecting a profile, functions | * title are silently ignored. While collecting a profile, functions | |||
* from all security contexts are included in it. The token-based | * from all security contexts are included in it. The token-based | |||
* filtering is only performed when querying for a profile. | * filtering is only performed when querying for a profile. | |||
* | ||||
* |record_samples| parameter controls whether individual samples should | ||||
* be recorded in addition to the aggregated tree. | ||||
*/ | */ | |||
static void StartProfiling(Handle<String> title); | static void StartProfiling(Handle<String> title, bool record_samples = fa lse); | |||
/** | /** | |||
* Stops collecting CPU profile with a given title and returns it. | * Stops collecting CPU profile with a given title and returns it. | |||
* If the title given is empty, finishes the last profile started. | * If the title given is empty, finishes the last profile started. | |||
*/ | */ | |||
static const CpuProfile* StopProfiling( | static const CpuProfile* StopProfiling( | |||
Handle<String> title, | Handle<String> title, | |||
Handle<Value> security_token = Handle<Value>()); | Handle<Value> security_token = Handle<Value>()); | |||
/** | /** | |||
skipping to change at line 255 | skipping to change at line 269 | |||
enum Type { | enum Type { | |||
kHidden = 0, // Hidden node, may be filtered when shown to user. | kHidden = 0, // Hidden node, may be filtered when shown to user. | |||
kArray = 1, // An array of elements. | kArray = 1, // An array of elements. | |||
kString = 2, // A string. | kString = 2, // A string. | |||
kObject = 3, // A JS object (except for arrays and strings). | kObject = 3, // A JS object (except for arrays and strings). | |||
kCode = 4, // Compiled code. | kCode = 4, // Compiled code. | |||
kClosure = 5, // Function closure. | kClosure = 5, // Function closure. | |||
kRegExp = 6, // RegExp. | kRegExp = 6, // RegExp. | |||
kHeapNumber = 7, // Number stored in the heap. | kHeapNumber = 7, // Number stored in the heap. | |||
kNative = 8, // Native object (not from V8 heap). | kNative = 8, // Native object (not from V8 heap). | |||
kSynthetic = 9, // Synthetic object, usualy used for grouping | kSynthetic = 9 // Synthetic object, usualy used for grouping | |||
// snapshot items together. | // snapshot items together. | |||
kContext = 10 // Context | ||||
}; | }; | |||
/** Returns node type (see HeapGraphNode::Type). */ | /** Returns node type (see HeapGraphNode::Type). */ | |||
Type GetType() const; | Type GetType() const; | |||
/** | /** | |||
* 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). | |||
*/ | */ | |||
End of changes. 8 change blocks. | ||||
9 lines changed or deleted | 23 lines changed or added | |||
v8.h | v8.h | |||
---|---|---|---|---|
skipping to change at line 100 | skipping to change at line 100 | |||
#define V8_DEPRECATED(declarator) __declspec(deprecated) declarator | #define V8_DEPRECATED(declarator) __declspec(deprecated) declarator | |||
#else | #else | |||
#define V8_DEPRECATED(declarator) declarator | #define V8_DEPRECATED(declarator) declarator | |||
#endif | #endif | |||
/** | /** | |||
* The v8 JavaScript engine. | * The v8 JavaScript engine. | |||
*/ | */ | |||
namespace v8 { | namespace v8 { | |||
class Context; | class AccessorInfo; | |||
class String; | class AccessorSignature; | |||
class StringObject; | ||||
class Value; | ||||
class Utils; | ||||
class Number; | ||||
class NumberObject; | ||||
class Object; | ||||
class Array; | class Array; | |||
class Int32; | ||||
class Uint32; | ||||
class External; | ||||
class Primitive; | ||||
class Boolean; | class Boolean; | |||
class BooleanObject; | class BooleanObject; | |||
class Integer; | class Context; | |||
class Function; | class Data; | |||
class Date; | class Date; | |||
class DeclaredAccessorDescriptor; | ||||
class External; | ||||
class Function; | ||||
class FunctionTemplate; | ||||
class ImplementationUtilities; | class ImplementationUtilities; | |||
class Int32; | ||||
class Integer; | ||||
class Isolate; | ||||
class Number; | ||||
class NumberObject; | ||||
class Object; | ||||
class ObjectOperationDescriptor; | ||||
class ObjectTemplate; | ||||
class Primitive; | ||||
class RawOperationDescriptor; | ||||
class Signature; | class Signature; | |||
class AccessorSignature; | class StackFrame; | |||
class StackTrace; | ||||
class String; | ||||
class StringObject; | ||||
class Uint32; | ||||
class Utils; | ||||
class Value; | ||||
template <class T> class Handle; | template <class T> class Handle; | |||
template <class T> class Local; | template <class T> class Local; | |||
template <class T> class Persistent; | template <class T> class Persistent; | |||
class FunctionTemplate; | ||||
class ObjectTemplate; | ||||
class Data; | ||||
class AccessorInfo; | ||||
class StackTrace; | ||||
class StackFrame; | ||||
class Isolate; | ||||
class DeclaredAccessorDescriptor; | ||||
class ObjectOperationDescriptor; | ||||
class RawOperationDescriptor; | ||||
namespace internal { | namespace internal { | |||
class Arguments; | class Arguments; | |||
class Object; | ||||
class Heap; | class Heap; | |||
class HeapObject; | class HeapObject; | |||
class Isolate; | class Isolate; | |||
class Object; | ||||
} | } | |||
// --- Weak Handles --- | // --- Weak Handles --- | |||
/** | /** | |||
* A weak reference callback function. | * A weak reference callback function. | |||
* | * | |||
* This callback should either explicitly invoke Dispose on |object| if | * This callback should either explicitly invoke Dispose on |object| if | |||
* V8 wrapper is not needed anymore, or 'revive' it by invocation of MakeWe ak. | * V8 wrapper is not needed anymore, or 'revive' it by invocation of MakeWe ak. | |||
* | * | |||
End of changes. 10 change blocks. | ||||
27 lines changed or deleted | 26 lines changed or added | |||