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

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

Issue 7046001: Fix bug with long stack traces truncation in DevTools CPU profiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 7 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 | test/cctest/test-cpu-profiler.cc » ('j') | test/cctest/test-cpu-profiler.cc » ('J')
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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // Make a local copy of tick sample record to ensure that it won't 237 // Make a local copy of tick sample record to ensure that it won't
238 // be modified as we are processing it. This is possible as the 238 // be modified as we are processing it. This is possible as the
239 // sampler writes w/o any sync to the queue, so if the processor 239 // sampler writes w/o any sync to the queue, so if the processor
240 // will get far behind, a record may be modified right under its 240 // will get far behind, a record may be modified right under its
241 // feet. 241 // feet.
242 TickSampleEventRecord record = *rec; 242 TickSampleEventRecord record = *rec;
243 if (record.order == dequeue_order) { 243 if (record.order == dequeue_order) {
244 // A paranoid check to make sure that we don't get a memory overrun 244 // A paranoid check to make sure that we don't get a memory overrun
245 // in case of frames_count having a wild value. 245 // in case of frames_count having a wild value.
246 if (record.sample.frames_count < 0 246 if (record.sample.frames_count < 0
247 || record.sample.frames_count >= TickSample::kMaxFramesCount) 247 || record.sample.frames_count > TickSample::kMaxFramesCount)
248 record.sample.frames_count = 0; 248 record.sample.frames_count = 0;
249 generator_->RecordTickSample(record.sample); 249 generator_->RecordTickSample(record.sample);
250 ticks_buffer_.FinishDequeue(); 250 ticks_buffer_.FinishDequeue();
251 } else { 251 } else {
252 return true; 252 return true;
253 } 253 }
254 } 254 }
255 } 255 }
256 256
257 257
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 #ifdef ENABLE_LOGGING_AND_PROFILING 600 #ifdef ENABLE_LOGGING_AND_PROFILING
601 Isolate* isolate = Isolate::Current(); 601 Isolate* isolate = Isolate::Current();
602 if (isolate->cpu_profiler() != NULL) { 602 if (isolate->cpu_profiler() != NULL) {
603 delete isolate->cpu_profiler(); 603 delete isolate->cpu_profiler();
604 } 604 }
605 isolate->set_cpu_profiler(NULL); 605 isolate->set_cpu_profiler(NULL);
606 #endif 606 #endif
607 } 607 }
608 608
609 } } // namespace v8::internal 609 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-cpu-profiler.cc » ('j') | test/cctest/test-cpu-profiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698