 Chromium Code Reviews
 Chromium Code Reviews Issue 424973004:
  Extend CPU profiler with mapping ticks to source lines   (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
    
  
    Issue 424973004:
  Extend CPU profiler with mapping ticks to source lines   (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge| Index: include/v8-profiler.h | 
| diff --git a/include/v8-profiler.h b/include/v8-profiler.h | 
| index 7fc193db58e9ded01a0b857c33134d0aed6b31d1..37392a1cd3f5e31ca5094327d3d3180ca02846d2 100644 | 
| --- a/include/v8-profiler.h | 
| +++ b/include/v8-profiler.h | 
| @@ -17,6 +17,14 @@ struct HeapStatsUpdate; | 
| typedef uint32_t SnapshotObjectId; | 
| +typedef struct { | 
| 
yurys
2014/07/29 13:15:10
struct LineTick, also it can be nested in CpuProfi
 | 
| + /** The 1-based number of the source line where the function originates. */ | 
| + unsigned int line; | 
| 
yurys
2014/07/29 13:15:10
Why only line number, column would also be interes
 | 
| + | 
| + /** The count of samples associated with the source line. */ | 
| + unsigned int ticks; | 
| 
alph
2014/07/29 12:55:55
hitCount?
 | 
| +} LineTick; | 
| + | 
| /** | 
| * CpuProfileNode represents a node in a call graph. | 
| */ | 
| @@ -43,6 +51,17 @@ class V8_EXPORT CpuProfileNode { | 
| */ | 
| int GetColumnNumber() const; | 
| + /** | 
| + * Returns the number of the function's source lines that collect the samples. | 
| + */ | 
| + unsigned int GetHitLineCount() const; | 
| + | 
| + /** Returns the set of source lines that collect the samples. | 
| + * The caller allocates buffer and responsible for releasing it. | 
| + * True if all available entries are copied, otherwise false. | 
| 
alph
2014/07/29 12:55:55
According to the implementation it copies nothing
 | 
| + */ | 
| + bool GetLineTicks(LineTick* entries, unsigned int number) const; | 
| + | 
| /** Returns bailout reason for the function | 
| * if the optimization was disabled for it. | 
| */ |