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

Side by Side Diff: test/cctest/test-cpu-profiler.cc

Issue 1523015: C++ profiles processor: align browser mode with the old implementation, sample VM state. (Closed)
Patch Set: Using Script::type to filter out native scripts. Created 10 years, 8 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-inl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // 2 //
3 // Tests of profiles generator and utilities. 3 // Tests of profiles generator and utilities.
4 4
5 #ifdef ENABLE_CPP_PROFILES_PROCESSOR 5 #ifdef ENABLE_CPP_PROFILES_PROCESSOR
6 6
7 #include "v8.h" 7 #include "v8.h"
8 #include "cpu-profiler-inl.h" 8 #include "cpu-profiler-inl.h"
9 #include "cctest.h" 9 #include "cctest.h"
10 10
(...skipping 29 matching lines...) Expand all
40 40
41 static inline i::Address ToAddress(int n) { 41 static inline i::Address ToAddress(int n) {
42 return reinterpret_cast<i::Address>(n); 42 return reinterpret_cast<i::Address>(n);
43 } 43 }
44 44
45 static void EnqueueTickSampleEvent(ProfilerEventsProcessor* proc, 45 static void EnqueueTickSampleEvent(ProfilerEventsProcessor* proc,
46 i::Address frame1, 46 i::Address frame1,
47 i::Address frame2 = NULL, 47 i::Address frame2 = NULL,
48 i::Address frame3 = NULL) { 48 i::Address frame3 = NULL) {
49 i::TickSample* sample = proc->TickSampleEvent(); 49 i::TickSample* sample = proc->TickSampleEvent();
50 sample->state = i::OTHER;
50 sample->pc = frame1; 51 sample->pc = frame1;
51 sample->function = frame1; 52 sample->function = frame1;
52 sample->frames_count = 0; 53 sample->frames_count = 0;
53 if (frame2 != NULL) { 54 if (frame2 != NULL) {
54 sample->stack[0] = frame2; 55 sample->stack[0] = frame2;
55 sample->frames_count = 1; 56 sample->frames_count = 1;
56 } 57 }
57 if (frame3 != NULL) { 58 if (frame3 != NULL) {
58 sample->stack[1] = frame3; 59 sample->stack[1] = frame3;
59 sample->frames_count = 2; 60 sample->frames_count = 2;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 bottom_up_root_children[2]->children(); 196 bottom_up_root_children[2]->children();
196 CHECK_EQ(1, bottom_up_ddd_children->length()); 197 CHECK_EQ(1, bottom_up_ddd_children->length());
197 CHECK_EQ("5", bottom_up_ddd_children->last()->entry()->name()); 198 CHECK_EQ("5", bottom_up_ddd_children->last()->entry()->name());
198 const i::List<ProfileNode*>* bottom_up_ddd_stub_children = 199 const i::List<ProfileNode*>* bottom_up_ddd_stub_children =
199 bottom_up_ddd_children->last()->children(); 200 bottom_up_ddd_children->last()->children();
200 CHECK_EQ(1, bottom_up_ddd_stub_children->length()); 201 CHECK_EQ(1, bottom_up_ddd_stub_children->length());
201 CHECK_EQ("bbb", bottom_up_ddd_stub_children->last()->entry()->name()); 202 CHECK_EQ("bbb", bottom_up_ddd_stub_children->last()->entry()->name());
202 } 203 }
203 204
204 #endif // ENABLE_CPP_PROFILES_PROCESSOR 205 #endif // ENABLE_CPP_PROFILES_PROCESSOR
OLDNEW
« no previous file with comments | « src/profile-generator-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698