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

Side by Side Diff: src/log.cc

Issue 1409993006: Fix external callback logging in profiler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « src/globals.h ('k') | src/vm-state.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/log.h" 5 #include "src/log.h"
6 6
7 #include <cstdarg> 7 #include <cstdarg>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 1490
1491 1491
1492 void Logger::TickEvent(TickSample* sample, bool overflow) { 1492 void Logger::TickEvent(TickSample* sample, bool overflow) {
1493 if (!log_->IsEnabled() || !FLAG_prof_cpp) return; 1493 if (!log_->IsEnabled() || !FLAG_prof_cpp) return;
1494 Log::MessageBuilder msg(log_); 1494 Log::MessageBuilder msg(log_);
1495 msg.Append("%s,", kLogEventsNames[TICK_EVENT]); 1495 msg.Append("%s,", kLogEventsNames[TICK_EVENT]);
1496 msg.AppendAddress(sample->pc); 1496 msg.AppendAddress(sample->pc);
1497 msg.Append(",%ld", static_cast<int>(timer_.Elapsed().InMicroseconds())); 1497 msg.Append(",%ld", static_cast<int>(timer_.Elapsed().InMicroseconds()));
1498 if (sample->has_external_callback) { 1498 if (sample->has_external_callback) {
1499 msg.Append(",1,"); 1499 msg.Append(",1,");
1500 #if USES_FUNCTION_DESCRIPTORS
1501 msg.AppendAddress(*FUNCTION_ENTRYPOINT_ADDRESS(sample->external_callback));
1502 #else
1500 msg.AppendAddress(sample->external_callback); 1503 msg.AppendAddress(sample->external_callback);
1504 #endif
1501 } else { 1505 } else {
1502 msg.Append(",0,"); 1506 msg.Append(",0,");
1503 msg.AppendAddress(sample->tos); 1507 msg.AppendAddress(sample->tos);
1504 } 1508 }
1505 msg.Append(",%d", static_cast<int>(sample->state)); 1509 msg.Append(",%d", static_cast<int>(sample->state));
1506 if (overflow) { 1510 if (overflow) {
1507 msg.Append(",overflow"); 1511 msg.Append(",overflow");
1508 } 1512 }
1509 for (unsigned i = 0; i < sample->frames_count; ++i) { 1513 for (unsigned i = 0; i < sample->frames_count; ++i) {
1510 msg.Append(','); 1514 msg.Append(',');
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1909 removeCodeEventListener(jit_logger_); 1913 removeCodeEventListener(jit_logger_);
1910 delete jit_logger_; 1914 delete jit_logger_;
1911 jit_logger_ = NULL; 1915 jit_logger_ = NULL;
1912 } 1916 }
1913 1917
1914 return log_->Close(); 1918 return log_->Close();
1915 } 1919 }
1916 1920
1917 } // namespace internal 1921 } // namespace internal
1918 } // namespace v8 1922 } // namespace v8
OLDNEW
« no previous file with comments | « src/globals.h ('k') | src/vm-state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698