| Index: include/v8.h | 
| diff --git a/include/v8.h b/include/v8.h | 
| index 5730fdf8e7fa5bccdf55eaa2de8b45145c606297..b02cbc8db7ba414b48296998e54dce47c37c0589 100644 | 
| --- a/include/v8.h | 
| +++ b/include/v8.h | 
| @@ -1289,6 +1289,29 @@ class V8_EXPORT StackFrame { | 
|  | 
|  | 
| /** | 
| + * Isolate::Getsample collects the current JS execution state as a sample. | 
| + * A collected sample contains, | 
| + * - stack       : An array of addresses. | 
| + *                 One address per stack frame. | 
| + *                 The address is the instruction pointer, | 
| + *                 pointing to the instruction which led to the | 
| + *                 creation of the stack frame. | 
| + *                 (for example, a function call) | 
| + * - frames_count: Number of stack frames that were captured. | 
| + *                 That is, stack[frames_count+i] might contain meaningless | 
| + *                 addresses for any i >= 0. | 
| + */ | 
| +struct V8_EXPORT Sample { | 
| +  Sample() | 
| +      : frames_count(0) {} | 
| +  static const unsigned kMaxFramesCount = 255; | 
| + | 
| +  void* stack[kMaxFramesCount];  // Call stack. | 
| +  unsigned frames_count;         // Number of captured frames. | 
| +}; | 
| + | 
| + | 
| +/** | 
| * A JSON Parser. | 
| */ | 
| class V8_EXPORT JSON { | 
| @@ -4208,6 +4231,11 @@ class V8_EXPORT Isolate { | 
| void GetHeapStatistics(HeapStatistics* heap_statistics); | 
|  | 
| /** | 
| +   * Get a sample from the isolate. | 
| +   */ | 
| +  void GetSample(Sample* sample); | 
| + | 
| +  /** | 
| * Adjusts the amount of registered external memory. Used to give V8 an | 
| * indication of the amount of externally allocated memory that is kept alive | 
| * by JavaScript objects. V8 uses this to decide when to perform global | 
|  |