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

Side by Side Diff: src/log.cc

Issue 14367020: Revert r14252 as it broke --prof for some cases (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 | src/profile-generator.cc » ('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 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1441 1441
1442 1442
1443 void Logger::TickEvent(TickSample* sample, bool overflow) { 1443 void Logger::TickEvent(TickSample* sample, bool overflow) {
1444 if (!log_->IsEnabled() || !FLAG_prof) return; 1444 if (!log_->IsEnabled() || !FLAG_prof) return;
1445 LogMessageBuilder msg(this); 1445 LogMessageBuilder msg(this);
1446 msg.Append("%s,", kLogEventsNames[TICK_EVENT]); 1446 msg.Append("%s,", kLogEventsNames[TICK_EVENT]);
1447 msg.AppendAddress(sample->pc); 1447 msg.AppendAddress(sample->pc);
1448 msg.Append(','); 1448 msg.Append(',');
1449 msg.AppendAddress(sample->sp); 1449 msg.AppendAddress(sample->sp);
1450 msg.Append(",%ld", static_cast<int>(OS::Ticks() - epoch_)); 1450 msg.Append(",%ld", static_cast<int>(OS::Ticks() - epoch_));
1451 msg.AppendAddress(sample->external_callback); 1451 if (sample->has_external_callback) {
1452 msg.Append(",1,");
1453 msg.AppendAddress(sample->external_callback);
1454 } else {
1455 msg.Append(",0,");
1456 msg.AppendAddress(sample->tos);
1457 }
1452 msg.Append(",%d", static_cast<int>(sample->state)); 1458 msg.Append(",%d", static_cast<int>(sample->state));
1453 if (overflow) { 1459 if (overflow) {
1454 msg.Append(",overflow"); 1460 msg.Append(",overflow");
1455 } 1461 }
1456 for (int i = 0; i < sample->frames_count; ++i) { 1462 for (int i = 0; i < sample->frames_count; ++i) {
1457 msg.Append(','); 1463 msg.Append(',');
1458 msg.AppendAddress(sample->stack[i]); 1464 msg.AppendAddress(sample->stack[i]);
1459 } 1465 }
1460 msg.Append('\n'); 1466 msg.Append('\n');
1461 msg.WriteToLogFile(); 1467 msg.WriteToLogFile();
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1892 profiler_ = NULL; 1898 profiler_ = NULL;
1893 } 1899 }
1894 1900
1895 delete ticker_; 1901 delete ticker_;
1896 ticker_ = NULL; 1902 ticker_ = NULL;
1897 1903
1898 return log_->Close(); 1904 return log_->Close();
1899 } 1905 }
1900 1906
1901 } } // namespace v8::internal 1907 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698