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

Side by Side Diff: src/sampler.cc

Issue 22849002: Rewrite SamplingCircularQueue (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use V8_ALIGNAS from include/v8config.h Created 7 years, 4 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 | « src/globals.h ('k') | src/v8globals.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 #include <mach/mach.h> 58 #include <mach/mach.h>
59 59
60 #elif defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__) 60 #elif defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__)
61 61
62 #include "win32-headers.h" 62 #include "win32-headers.h"
63 63
64 #endif 64 #endif
65 65
66 #include "v8.h" 66 #include "v8.h"
67 67
68 #include "cpu-profiler.h" 68 #include "cpu-profiler-inl.h"
69 #include "flags.h" 69 #include "flags.h"
70 #include "frames-inl.h" 70 #include "frames-inl.h"
71 #include "log.h" 71 #include "log.h"
72 #include "platform.h" 72 #include "platform.h"
73 #include "simulator.h" 73 #include "simulator.h"
74 #include "v8threads.h" 74 #include "v8threads.h"
75 #include "vm-state-inl.h" 75 #include "vm-state-inl.h"
76 76
77 77
78 #if defined(__ANDROID__) && !defined(__BIONIC_HAVE_UCONTEXT_T) 78 #if defined(__ANDROID__) && !defined(__BIONIC_HAVE_UCONTEXT_T)
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 686
687 687
688 void Sampler::Stop() { 688 void Sampler::Stop() {
689 ASSERT(IsActive()); 689 ASSERT(IsActive());
690 SamplerThread::RemoveActiveSampler(this); 690 SamplerThread::RemoveActiveSampler(this);
691 SetActive(false); 691 SetActive(false);
692 } 692 }
693 693
694 694
695 void Sampler::SampleStack(const RegisterState& state) { 695 void Sampler::SampleStack(const RegisterState& state) {
696 TickSample* sample = isolate_->cpu_profiler()->TickSampleEvent(); 696 TickSample* sample = isolate_->cpu_profiler()->StartTickSample();
697 TickSample sample_obj; 697 TickSample sample_obj;
698 if (sample == NULL) sample = &sample_obj; 698 if (sample == NULL) sample = &sample_obj;
699 sample->Init(isolate_, state); 699 sample->Init(isolate_, state);
700 if (is_counting_samples_) { 700 if (is_counting_samples_) {
701 if (sample->state == JS || sample->state == EXTERNAL) { 701 if (sample->state == JS || sample->state == EXTERNAL) {
702 ++js_and_external_sample_count_; 702 ++js_and_external_sample_count_;
703 } 703 }
704 } 704 }
705 Tick(sample); 705 Tick(sample);
706 if (sample != &sample_obj) {
707 isolate_->cpu_profiler()->FinishTickSample();
708 }
706 } 709 }
707 710
708 } } // namespace v8::internal 711 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/globals.h ('k') | src/v8globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698