LCOV - code coverage report
Current view: top level - src/profiler - heap-snapshot-generator-inl.h (source / functions) Hit Total Coverage
Test: app.info Lines: 11 13 84.6 %
Date: 2017-04-26 Functions: 0 0 -

          Line data    Source code
       1             : // Copyright 2013 the V8 project authors. All rights reserved.
       2             : // Use of this source code is governed by a BSD-style license that can be
       3             : // found in the LICENSE file.
       4             : 
       5             : #ifndef V8_PROFILER_HEAP_SNAPSHOT_GENERATOR_INL_H_
       6             : #define V8_PROFILER_HEAP_SNAPSHOT_GENERATOR_INL_H_
       7             : 
       8             : #include "src/profiler/heap-snapshot-generator.h"
       9             : 
      10             : namespace v8 {
      11             : namespace internal {
      12             : 
      13             : 
      14    16731236 : HeapEntry* HeapGraphEdge::from() const {
      15    33462472 :   return &snapshot()->entries()[from_index()];
      16             : }
      17             : 
      18             : 
      19     7202939 : Isolate* HeapGraphEdge::isolate() const {
      20     7202939 :   return snapshot()->profiler()->isolate();
      21             : }
      22             : 
      23             : 
      24             : HeapSnapshot* HeapGraphEdge::snapshot() const {
      25    23934175 :   return to_entry_->snapshot();
      26             : }
      27             : 
      28             : 
      29             : int HeapEntry::index() const {
      30    31290108 :   return static_cast<int>(this - &snapshot_->entries().first());
      31             : }
      32             : 
      33             : 
      34             : int HeapEntry::set_children_index(int index) {
      35     3924585 :   children_index_ = index;
      36     3924585 :   int next_index = index + children_count_;
      37     3924585 :   children_count_ = 0;
      38             :   return next_index;
      39             : }
      40             : 
      41             : std::deque<HeapGraphEdge*>::iterator HeapEntry::children_begin() {
      42             :   DCHECK(children_index_ >= 0);
      43             :   SLOW_DCHECK(
      44             :       children_index_ < static_cast<int>(snapshot_->children().size()) ||
      45             :       (children_index_ == static_cast<int>(snapshot_->children().size()) &&
      46             :        children_count_ == 0));
      47    24451244 :   return snapshot_->children().begin() + children_index_;
      48             : }
      49             : 
      50           0 : std::deque<HeapGraphEdge*>::iterator HeapEntry::children_end() {
      51           0 :   return children_begin() + children_count_;
      52             : }
      53             : 
      54             : 
      55        2316 : Isolate* HeapEntry::isolate() const { return snapshot_->profiler()->isolate(); }
      56             : 
      57             : }  // namespace internal
      58             : }  // namespace v8
      59             : 
      60             : #endif  // V8_PROFILER_HEAP_SNAPSHOT_GENERATOR_INL_H_

Generated by: LCOV version 1.10