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

Unified Diff: src/log-utils.h

Issue 499483002: [WIP] A sampler thread in d8 for consuming the new API. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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
diff --git a/src/log-utils.h b/src/log-utils.h
index 451ffaa24b4a701c732735ea9d5f5745b6de5722..ff8fc28e0429866a5c5ba644674b4a1c247d375e 100644
--- a/src/log-utils.h
+++ b/src/log-utils.h
@@ -5,6 +5,8 @@
#ifndef V8_LOG_UTILS_H_
#define V8_LOG_UTILS_H_
+#include <string>
+
#include "src/allocation.h"
namespace v8 {
@@ -80,6 +82,13 @@ class Log {
// Append a portion of a string.
void AppendStringPart(const char* str, int len);
+ // GetSubstring fills str with a string consisting
+ // all that's been appendend starting from a call to
+ // StartSubstring and till a call to EndSubstring
+ void StartSubstring();
+ void EndSubstring();
+ void GetSubstring(std::string* str);
+
// Write the log message to the log file currently opened.
void WriteToLogFile();
@@ -87,6 +96,8 @@ class Log {
Log* log_;
base::LockGuard<base::Mutex> lock_guard_;
int pos_;
+ int substr_start_pos_;
+ int substr_end_pos_;
};
private:
« 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