~yolanda.robla/ubuntu/trusty/nodejs/add_distribution

« back to all changes in this revision

Viewing changes to deps/v8/src/profile-generator-inl.h

  • Committer: Package Import Robot
  • Author(s): Jérémy Lal
  • Date: 2013-08-14 00:16:46 UTC
  • mfrom: (7.1.40 sid)
  • Revision ID: package-import@ubuntu.com-20130814001646-bzlysfh8sd6mukbo
Tags: 0.10.15~dfsg1-4
* Update 2005 patch, adding a handful of tests that can fail on
  slow platforms.
* Add 1004 patch to fix test failures when writing NaN to buffer
  on mipsel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
      return gc_entry_;
85
85
    case JS:
86
86
    case COMPILER:
 
87
    case PARALLEL_COMPILER_PROLOGUE:
87
88
    // DOM events handlers are reported as OTHER / EXTERNAL entries.
88
89
    // To avoid confusing people, let's put all these entries into
89
90
    // one bucket.
95
96
}
96
97
 
97
98
 
98
 
uint64_t HeapEntry::id() {
99
 
  union {
100
 
    Id stored_id;
101
 
    uint64_t returned_id;
102
 
  } id_adaptor = {id_};
103
 
  return id_adaptor.returned_id;
 
99
HeapEntry* HeapGraphEdge::from() const {
 
100
  return &snapshot()->entries()[from_index_];
 
101
}
 
102
 
 
103
 
 
104
HeapSnapshot* HeapGraphEdge::snapshot() const {
 
105
  return to_entry_->snapshot();
 
106
}
 
107
 
 
108
 
 
109
int HeapEntry::index() const {
 
110
  return static_cast<int>(this - &snapshot_->entries().first());
 
111
}
 
112
 
 
113
 
 
114
int HeapEntry::set_children_index(int index) {
 
115
  children_index_ = index;
 
116
  int next_index = index + children_count_;
 
117
  children_count_ = 0;
 
118
  return next_index;
 
119
}
 
120
 
 
121
 
 
122
HeapGraphEdge** HeapEntry::children_arr() {
 
123
  ASSERT(children_index_ >= 0);
 
124
  return &snapshot_->children()[children_index_];
 
125
}
 
126
 
 
127
 
 
128
SnapshotObjectId HeapObjectsMap::GetNthGcSubrootId(int delta) {
 
129
  return kGcRootsFirstSubrootId + delta * kObjectIdStep;
 
130
}
 
131
 
 
132
 
 
133
HeapObject* V8HeapExplorer::GetNthGcSubrootObject(int delta) {
 
134
  return reinterpret_cast<HeapObject*>(
 
135
      reinterpret_cast<char*>(kFirstGcSubrootObject) +
 
136
      delta * HeapObjectsMap::kObjectIdStep);
 
137
}
 
138
 
 
139
 
 
140
int V8HeapExplorer::GetGcSubrootOrder(HeapObject* subroot) {
 
141
  return static_cast<int>(
 
142
      (reinterpret_cast<char*>(subroot) -
 
143
       reinterpret_cast<char*>(kFirstGcSubrootObject)) /
 
144
      HeapObjectsMap::kObjectIdStep);
104
145
}
105
146
 
106
147
} }  // namespace v8::internal