Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: src/profile-generator.cc

Issue 907353003: Remove obsolete method ProfileTree::AddPathFromStart and the corresponding test. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/profile-generator.h ('k') | test/cctest/test-profile-generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/profile-generator-inl.h" 7 #include "src/profile-generator-inl.h"
8 8
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/debug.h" 10 #include "src/debug.h"
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 } 318 }
319 } 319 }
320 node->IncrementSelfTicks(); 320 node->IncrementSelfTicks();
321 if (src_line != v8::CpuProfileNode::kNoLineNumberInfo) { 321 if (src_line != v8::CpuProfileNode::kNoLineNumberInfo) {
322 node->IncrementLineTicks(src_line); 322 node->IncrementLineTicks(src_line);
323 } 323 }
324 return node; 324 return node;
325 } 325 }
326 326
327 327
328 void ProfileTree::AddPathFromStart(const Vector<CodeEntry*>& path,
329 int src_line) {
330 ProfileNode* node = root_;
331 for (CodeEntry** entry = path.start();
332 entry != path.start() + path.length();
333 ++entry) {
334 if (*entry != NULL) {
335 node = node->FindOrAddChild(*entry);
336 }
337 }
338 node->IncrementSelfTicks();
339 if (src_line != v8::CpuProfileNode::kNoLineNumberInfo) {
340 node->IncrementLineTicks(src_line);
341 }
342 }
343
344
345 struct NodesPair { 328 struct NodesPair {
346 NodesPair(ProfileNode* src, ProfileNode* dst) 329 NodesPair(ProfileNode* src, ProfileNode* dst)
347 : src(src), dst(dst) { } 330 : src(src), dst(dst) { }
348 ProfileNode* src; 331 ProfileNode* src;
349 ProfileNode* dst; 332 ProfileNode* dst;
350 }; 333 };
351 334
352 335
353 class Position { 336 class Position {
354 public: 337 public:
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 case OTHER: 738 case OTHER:
756 case EXTERNAL: 739 case EXTERNAL:
757 return program_entry_; 740 return program_entry_;
758 case IDLE: 741 case IDLE:
759 return idle_entry_; 742 return idle_entry_;
760 default: return NULL; 743 default: return NULL;
761 } 744 }
762 } 745 }
763 746
764 } } // namespace v8::internal 747 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/profile-generator.h ('k') | test/cctest/test-profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698