Reviewers: iposva, Description: Remove unused CodeRegion class and corresponding logging functions.
Please review this at http://codereview.chromium.org/67221 Affected files: M src/assembler.h M src/globals.h M src/log.h M src/log.cc Index: src/assembler.h diff --git a/src/assembler.h b/src/assembler.h index 02ee6c6e9144a1b15645bf01fa8dd28aa9cd3e3f..0352a7015f806cee683467811e9227cbcfd2e393 100644 --- a/src/assembler.h +++ b/src/assembler.h @@ -341,22 +341,6 @@ class RelocIterator: public Malloced { }; -// A stack-allocated code region logs a name for the code generated -// while the region is in effect. This information is used by the -// profiler to categorize ticks within generated code. -class CodeRegion BASE_EMBEDDED { - public: - inline CodeRegion(Assembler* assm, const char *name) : assm_(assm) { - LOG(BeginCodeRegionEvent(this, assm, name)); - } - inline ~CodeRegion() { - LOG(EndCodeRegionEvent(this, assm_)); - } - private: - Assembler* assm_; -}; - - //------------------------------------------------------------------------------ // External function Index: src/globals.h diff --git a/src/globals.h b/src/globals.h index 1a7231253f275698986aafc76b770c36f2d0e8a7..09af766ce2bec910ea1009380abfbf1c9c136503 100644 --- a/src/globals.h +++ b/src/globals.h @@ -146,7 +146,6 @@ class Assembler; class BreakableStatement; class Code; class CodeGenerator; -class CodeRegion; class CodeStub; class Context; class Debug; Index: src/log.cc diff --git a/src/log.cc b/src/log.cc index d9e304d606ce61a9289f1bb8f38f22d6426633dd..f23b73b2f802d59714ac6720e2615dcf272b8bc4 100644 --- a/src/log.cc +++ b/src/log.cc @@ -814,35 +814,6 @@ void Logger::CodeDeleteEvent(Address from) { } -void Logger::BeginCodeRegionEvent(CodeRegion* region, - Assembler* masm, - const char* name) { -#ifdef ENABLE_LOGGING_AND_PROFILING - if (logfile_ == NULL || !FLAG_log_code) return; - LogMessageBuilder msg; - msg.Append("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); - msg.WriteToLogFile(); -#endif -} - - -void Logger::EndCodeRegionEvent(CodeRegion* region, Assembler* masm) { -#ifdef ENABLE_LOGGING_AND_PROFILING - if (logfile_ == NULL || !FLAG_log_code) return; - LogMessageBuilder msg; - msg.Append("end-code-region,0x%x,0x%x,0x%x\n", - reinterpret_cast<unsigned int>(region), - reinterpret_cast<unsigned int>(masm), - masm->pc_offset()); - msg.WriteToLogFile(); -#endif -} - - void Logger::ResourceEvent(const char* name, const char* tag) { #ifdef ENABLE_LOGGING_AND_PROFILING if (logfile_ == NULL || !FLAG_log) return; Index: src/log.h diff --git a/src/log.h b/src/log.h index bbcfa42c63b7471ddbd31cdd55d6092003676d46..44c1957697c7220942dce041ddba90d60cce8adf 100644 --- a/src/log.h +++ b/src/log.h @@ -174,11 +174,6 @@ class Logger { static void CodeMoveEvent(Address from, Address to); // Emits a code delete event. static void CodeDeleteEvent(Address from); - // Emits region delimiters - static void BeginCodeRegionEvent(CodeRegion* region, - Assembler* masm, - const char* name); - static void EndCodeRegionEvent(CodeRegion* region, Assembler* masm); // ==== Events logged by --log-gc. ==== // Heap sampling events: start, end, and individual types. --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
