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

Unified Diff: src/log-utils.h

Issue 6532091: Merge bleeding_edge revision (5922, 5934] to isolates branch.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: Created 9 years, 10 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
« src/log.cc ('K') | « src/log.cc ('k') | src/log-utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log-utils.h
===================================================================
--- src/log-utils.h (revision 6894)
+++ src/log-utils.h (working copy)
@@ -180,53 +180,9 @@
friend class Logger;
friend class LogMessageBuilder;
- friend class LogRecordCompressor;
};
-// An utility class for performing backward reference compression
-// of string ends. It operates using a window of previous strings.
-class LogRecordCompressor {
- public:
- // 'window_size' is the size of backward lookup window.
- explicit LogRecordCompressor(int window_size)
- : buffer_(window_size + kNoCompressionWindowSize),
- kMaxBackwardReferenceSize(
- GetBackwardReferenceSize(window_size, Log::kMessageBufferSize)),
- curr_(-1), prev_(-1) {
- }
-
- ~LogRecordCompressor();
-
- // Fills vector with a compressed version of the previous record.
- // Returns false if there is no previous record.
- bool RetrievePreviousCompressed(Vector<char>* prev_record);
-
- // Stores a record if it differs from a previous one (or there's no previous).
- // Returns true, if the record has been stored.
- bool Store(const Vector<const char>& record);
-
- private:
- // The minimum size of a buffer: a place needed for the current and
- // the previous record. Since there is no place for precedessors of a previous
- // record, it can't be compressed at all.
- static const int kNoCompressionWindowSize = 2;
-
- // Formatting strings for back references.
- static const char* const kLineBackwardReferenceFormat;
- static const char* const kBackwardReferenceFormat;
-
- static int GetBackwardReferenceSize(int distance, int pos);
-
- static void PrintBackwardReference(Vector<char> dest, int distance, int pos);
-
- ScopedVector< Vector<const char> > buffer_;
- const int kMaxBackwardReferenceSize;
- int curr_;
- int prev_;
-};
-
-
// Utility class for formatting log messages. It fills the message into the
// static buffer in Log.
class LogMessageBuilder BASE_EMBEDDED {
@@ -248,32 +204,14 @@
// Append a heap string.
void Append(String* str);
- // Appends an address, compressing it if needed by offsetting
- // from Logger::last_address_.
+ // Appends an address.
void AppendAddress(Address addr);
- // Appends an address, compressing it if needed.
- void AppendAddress(Address addr, Address bias);
-
void AppendDetailed(String* str, bool show_impl_info);
// Append a portion of a string.
void AppendStringPart(const char* str, int len);
- // Stores log message into compressor, returns true if the message
- // was stored (i.e. doesn't repeat the previous one).
- bool StoreInCompressor(LogRecordCompressor* compressor);
-
- // Sets log message to a previous version of compressed message.
- // Returns false, if there is no previous message.
- bool RetrieveCompressedPrevious(LogRecordCompressor* compressor) {
- return RetrieveCompressedPrevious(compressor, "");
- }
-
- // Does the same at the version without arguments, and sets a prefix.
- bool RetrieveCompressedPrevious(LogRecordCompressor* compressor,
- const char* prefix);
-
// Write the log message to the log file currently opened.
void WriteToLogFile();
« src/log.cc ('K') | « src/log.cc ('k') | src/log-utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698