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

Side by Side Diff: src/cpu-profiler.cc

Issue 6756031: Add initialization for has_external_callback field. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/cpu-profiler-inl.h » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 events_buffer_.Enqueue(evt_rec); 180 events_buffer_.Enqueue(evt_rec);
181 } 181 }
182 182
183 183
184 void ProfilerEventsProcessor::AddCurrentStack() { 184 void ProfilerEventsProcessor::AddCurrentStack() {
185 TickSampleEventRecord record; 185 TickSampleEventRecord record;
186 TickSample* sample = &record.sample; 186 TickSample* sample = &record.sample;
187 sample->state = Isolate::Current()->current_vm_state(); 187 sample->state = Isolate::Current()->current_vm_state();
188 sample->pc = reinterpret_cast<Address>(sample); // Not NULL. 188 sample->pc = reinterpret_cast<Address>(sample); // Not NULL.
189 sample->tos = NULL; 189 sample->tos = NULL;
190 sample->has_external_callback = false;
190 sample->frames_count = 0; 191 sample->frames_count = 0;
191 for (StackTraceFrameIterator it; 192 for (StackTraceFrameIterator it;
192 !it.done() && sample->frames_count < TickSample::kMaxFramesCount; 193 !it.done() && sample->frames_count < TickSample::kMaxFramesCount;
193 it.Advance()) { 194 it.Advance()) {
194 sample->stack[sample->frames_count++] = it.frame()->pc(); 195 sample->stack[sample->frames_count++] = it.frame()->pc();
195 } 196 }
196 record.order = enqueue_order_; 197 record.order = enqueue_order_;
197 ticks_from_vm_buffer_.Enqueue(record); 198 ticks_from_vm_buffer_.Enqueue(record);
198 } 199 }
199 200
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 #ifdef ENABLE_LOGGING_AND_PROFILING 596 #ifdef ENABLE_LOGGING_AND_PROFILING
596 Isolate* isolate = Isolate::Current(); 597 Isolate* isolate = Isolate::Current();
597 if (isolate->cpu_profiler() != NULL) { 598 if (isolate->cpu_profiler() != NULL) {
598 delete isolate->cpu_profiler(); 599 delete isolate->cpu_profiler();
599 } 600 }
600 isolate->set_cpu_profiler(NULL); 601 isolate->set_cpu_profiler(NULL);
601 #endif 602 #endif
602 } 603 }
603 604
604 } } // namespace v8::internal 605 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/cpu-profiler-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698