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

Side by Side Diff: src/log.cc

Issue 23011029: Do not start sampler thread when CpuProfiler is active (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 7 years, 3 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/cpu-profiler.cc ('k') | src/sampler.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 } 619 }
620 620
621 void SetProfiler(Profiler* profiler) { 621 void SetProfiler(Profiler* profiler) {
622 ASSERT(profiler_ == NULL); 622 ASSERT(profiler_ == NULL);
623 profiler_ = profiler; 623 profiler_ = profiler;
624 IncreaseProfilingDepth(); 624 IncreaseProfilingDepth();
625 if (!IsActive()) Start(); 625 if (!IsActive()) Start();
626 } 626 }
627 627
628 void ClearProfiler() { 628 void ClearProfiler() {
629 DecreaseProfilingDepth();
630 profiler_ = NULL; 629 profiler_ = NULL;
631 if (IsActive()) Stop(); 630 if (IsActive()) Stop();
631 DecreaseProfilingDepth();
632 } 632 }
633 633
634 private: 634 private:
635 Profiler* profiler_; 635 Profiler* profiler_;
636 }; 636 };
637 637
638 638
639 // 639 //
640 // Profiler implementation. 640 // Profiler implementation.
641 // 641 //
(...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after
1906 if (jit_logger_) { 1906 if (jit_logger_) {
1907 removeCodeEventListener(jit_logger_); 1907 removeCodeEventListener(jit_logger_);
1908 delete jit_logger_; 1908 delete jit_logger_;
1909 jit_logger_ = NULL; 1909 jit_logger_ = NULL;
1910 } 1910 }
1911 1911
1912 return log_->Close(); 1912 return log_->Close();
1913 } 1913 }
1914 1914
1915 } } // namespace v8::internal 1915 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/cpu-profiler.cc ('k') | src/sampler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698