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

Unified Diff: src/log.cc

Issue 14892: Merge changes from bleeding_edge into experimental toiger branch.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 12 years 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/macro-assembler-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
===================================================================
--- src/log.cc (revision 1012)
+++ src/log.cc (working copy)
@@ -32,6 +32,7 @@
#include "log.h"
#include "platform.h"
#include "string-stream.h"
+#include "macro-assembler.h"
namespace v8 { namespace internal {
@@ -556,6 +557,18 @@
}
+void Logger::CodeAllocateEvent(Code* code, Assembler* assem) {
+#ifdef ENABLE_LOGGING_AND_PROFILING
+ if (logfile_ == NULL || !FLAG_log_code) return;
+ ScopedLock sl(mutex_);
+
+ fprintf(logfile_, "code-allocate,0x%x,0x%x\n",
+ reinterpret_cast<unsigned int>(code->address()),
+ reinterpret_cast<unsigned int>(assem));
+#endif
+}
+
+
void Logger::CodeMoveEvent(Address from, Address to) {
#ifdef ENABLE_LOGGING_AND_PROFILING
if (logfile_ == NULL || !FLAG_log_code) return;
@@ -576,6 +589,33 @@
}
+void Logger::BeginCodeRegionEvent(CodeRegion* region,
+ Assembler* masm,
+ const char* name) {
+#ifdef ENABLE_LOGGING_AND_PROFILING
+ if (logfile_ == NULL || !FLAG_log_code) return;
+ ScopedLock sl(mutex_);
+ fprintf(logfile_, "begin-code-region,0x%x,0x%x,0x%x,%s\n",
+ reinterpret_cast<unsigned int>(region),
+ reinterpret_cast<unsigned int>(masm),
+ masm->pc_offset(),
+ name);
+#endif
+}
+
+
+void Logger::EndCodeRegionEvent(CodeRegion* region, Assembler* masm) {
+#ifdef ENABLE_LOGGING_AND_PROFILING
+ if (logfile_ == NULL || !FLAG_log_code) return;
+ ScopedLock sl(mutex_);
+ fprintf(logfile_, "end-code-region,0x%x,0x%x,0x%x\n",
+ reinterpret_cast<unsigned int>(region),
+ reinterpret_cast<unsigned int>(masm),
+ masm->pc_offset());
+#endif
+}
+
+
void Logger::ResourceEvent(const char* name, const char* tag) {
#ifdef ENABLE_LOGGING_AND_PROFILING
if (logfile_ == NULL || !FLAG_log) return;
« no previous file with comments | « src/log.h ('k') | src/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698