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

Unified Diff: src/log.cc

Issue 7276046: Remove "modules" and "tags" of the logging CPU profiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/log.h ('k') | src/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index 7c85c8a2642cd36f0a3875317f7d8bdcbc5860a8..004e21a650f644cfb9524fc6d2d48b4da7749a95 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -1362,18 +1362,14 @@ void Logger::TickEvent(TickSample* sample, bool overflow) {
}
-int Logger::GetActiveProfilerModules() {
- int result = PROFILER_MODULE_NONE;
- if (profiler_ != NULL && !profiler_->paused()) {
- result |= PROFILER_MODULE_CPU;
- }
- return result;
+bool Logger::IsProfilerPaused() {
+ return profiler_ == NULL || profiler_->paused();
}
-void Logger::PauseProfiler(int flags, int tag) {
+void Logger::PauseProfiler() {
if (!log_->IsEnabled()) return;
- if (profiler_ != NULL && (flags & PROFILER_MODULE_CPU)) {
+ if (profiler_ != NULL) {
// It is OK to have negative nesting.
if (--cpu_profiler_nesting_ == 0) {
profiler_->pause();
@@ -1388,18 +1384,12 @@ void Logger::PauseProfiler(int flags, int tag) {
--logging_nesting_;
}
}
- if (tag != 0) {
- UncheckedIntEvent("close-tag", tag);
- }
}
-void Logger::ResumeProfiler(int flags, int tag) {
+void Logger::ResumeProfiler() {
if (!log_->IsEnabled()) return;
- if (tag != 0) {
- UncheckedIntEvent("open-tag", tag);
- }
- if (profiler_ != NULL && (flags & PROFILER_MODULE_CPU)) {
+ if (profiler_ != NULL) {
if (cpu_profiler_nesting_++ == 0) {
++logging_nesting_;
if (FLAG_prof_lazy) {
@@ -1421,7 +1411,7 @@ void Logger::ResumeProfiler(int flags, int tag) {
// This function can be called when Log's mutex is acquired,
// either from main or Profiler's thread.
void Logger::LogFailure() {
- PauseProfiler(PROFILER_MODULE_CPU, 0);
+ PauseProfiler();
}
« no previous file with comments | « src/log.h ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698