aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/log.h
diff options
context:
space:
mode:
authorMichaƫl Zasso <targos@protonmail.com>2018-01-24 20:16:06 +0100
committerMyles Borins <mylesborins@google.com>2018-01-24 15:02:20 -0800
commit4c4af643e5042d615a60c6bbc05aee9d81b903e5 (patch)
tree3fb0a97988fe4439ae3ae06f26915d1dcf8cab92 /deps/v8/src/log.h
parentfa9f31a4fda5a3782c652e56e394465805ebb50f (diff)
downloadandroid-node-v8-4c4af643e5042d615a60c6bbc05aee9d81b903e5.tar.gz
android-node-v8-4c4af643e5042d615a60c6bbc05aee9d81b903e5.tar.bz2
android-node-v8-4c4af643e5042d615a60c6bbc05aee9d81b903e5.zip
deps: update V8 to 6.4.388.40
PR-URL: https://github.com/nodejs/node/pull/17489 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'deps/v8/src/log.h')
-rw-r--r--deps/v8/src/log.h79
1 files changed, 46 insertions, 33 deletions
diff --git a/deps/v8/src/log.h b/deps/v8/src/log.h
index 91672875ef..7efa50b8de 100644
--- a/deps/v8/src/log.h
+++ b/deps/v8/src/log.h
@@ -14,6 +14,7 @@
#include "src/base/platform/platform.h"
#include "src/code-events.h"
#include "src/isolate.h"
+#include "src/log-utils.h"
#include "src/objects.h"
namespace v8 {
@@ -93,7 +94,10 @@ class Ticker;
class Logger : public CodeEventListener {
public:
- enum StartEnd { START = 0, END = 1 };
+ enum StartEnd { START = 0, END = 1, STAMP = 2 };
+
+ // The separator is used to write an unescaped "," into the log.
+ static const LogSeparator kNext = LogSeparator::kSeparator;
// Acquires resources for logging if the right flags are set.
bool SetUp(Isolate* isolate);
@@ -121,7 +125,6 @@ class Logger : public CodeEventListener {
void StringEvent(const char* name, const char* value);
// Emits an event with an int value -> (name, value).
- void IntEvent(const char* name, int value);
void IntPtrTEvent(const char* name, intptr_t value);
// Emits an event with an handle value -> (name, location).
@@ -141,6 +144,14 @@ class Logger : public CodeEventListener {
// object.
void SuspectReadEvent(Name* name, Object* obj);
+ void FunctionEvent(const char* reason, Script* script, int script_id,
+ double time_delta_ms, int start_position = -1,
+ int end_position = -1, String* function_name = nullptr);
+ void FunctionEvent(const char* reason, Script* script, int script_id,
+ double time_delta_ms, int start_position, int end_position,
+ const char* function_name = nullptr,
+ size_t function_name_length = 0);
+
// ==== Events logged by --log-api. ====
void ApiSecurityCheck();
void ApiNamedPropertyAccess(const char* tag, JSObject* holder, Object* name);
@@ -169,8 +180,6 @@ class Logger : public CodeEventListener {
void CodeCreateEvent(CodeEventListener::LogEventsAndTags tag,
AbstractCode* code, SharedFunctionInfo* shared,
Name* source, int line, int column);
- void CodeCreateEvent(CodeEventListener::LogEventsAndTags tag,
- AbstractCode* code, int args_count);
// Emits a code deoptimization event.
void CodeDisableOptEvent(AbstractCode* code, SharedFunctionInfo* shared);
void CodeMovingGCEvent();
@@ -179,7 +188,7 @@ class Logger : public CodeEventListener {
// Emits a code move event.
void CodeMoveEvent(AbstractCode* from, Address to);
// Emits a code line info record event.
- void CodeLinePosInfoRecordEvent(AbstractCode* code,
+ void CodeLinePosInfoRecordEvent(Address code_start,
ByteArray* source_position_table);
void SharedFunctionInfoMoveEvent(Address from, Address to);
@@ -189,11 +198,15 @@ class Logger : public CodeEventListener {
void CodeDeoptEvent(Code* code, DeoptKind kind, Address pc,
int fp_to_sp_delta);
- void ICEvent(const char* type, bool keyed, const Address pc, int line,
- int column, Map* map, Object* key, char old_state,
- char new_state, const char* modifier,
+ void ICEvent(const char* type, bool keyed, Map* map, Object* key,
+ char old_state, char new_state, const char* modifier,
const char* slow_stub_reason);
+ void MapEvent(const char* type, Map* from, Map* to,
+ const char* reason = nullptr,
+ HeapObject* name_or_sfi = nullptr);
+ void MapDetails(Map* map);
+
// ==== Events logged by --log-gc. ====
// Heap sampling events: start, end, and individual types.
void HeapSampleBeginEvent(const char* space, const char* kind);
@@ -213,7 +226,7 @@ class Logger : public CodeEventListener {
void CurrentTimeEvent();
- void TimerEvent(StartEnd se, const char* name);
+ V8_EXPORT_PRIVATE void TimerEvent(StartEnd se, const char* name);
static void EnterExternal(Isolate* isolate);
static void LeaveExternal(Isolate* isolate);
@@ -228,7 +241,7 @@ class Logger : public CodeEventListener {
}
bool is_logging_code_events() {
- return is_logging() || jit_logger_ != NULL;
+ return is_logging() || jit_logger_ != nullptr;
}
// Stop collection of profiling data.
@@ -245,6 +258,8 @@ class Logger : public CodeEventListener {
void LogCodeObjects();
// Used for logging bytecode handlers found in the snapshot.
void LogBytecodeHandlers();
+ // Logs all Mpas foind in the heap.
+ void LogMaps();
// Converts tag to a corresponding NATIVE_... if the script is native.
INLINE(static CodeEventListener::LogEventsAndTags ToNativeByScript(
@@ -253,6 +268,9 @@ class Logger : public CodeEventListener {
// Callback from Log, stops profiling in case of insufficient resources.
void LogFailure();
+ // Used for logging stubs found in the snapshot.
+ void LogCodeObject(Object* code_object);
+
private:
explicit Logger(Isolate* isolate);
~Logger();
@@ -269,9 +287,6 @@ class Logger : public CodeEventListener {
void MoveEventInternal(CodeEventListener::LogEventsAndTags event,
Address from, Address to);
- // Used for logging stubs found in the snapshot.
- void LogCodeObject(Object* code_object);
-
// Helper method. It resets name_buffer_ and add tag name into it.
void InitNameBuffer(CodeEventListener::LogEventsAndTags tag);
@@ -279,13 +294,10 @@ class Logger : public CodeEventListener {
void TickEvent(TickSample* sample, bool overflow);
void RuntimeCallTimerEvent();
- PRINTF_FORMAT(2, 3) void ApiEvent(const char* format, ...);
-
// Logs a StringEvent regardless of whether FLAG_log is true.
void UncheckedStringEvent(const char* name, const char* value);
- // Logs an IntEvent regardless of whether FLAG_log is true.
- void UncheckedIntEvent(const char* name, int value);
+ // Logs an IntPtrTEvent regardless of whether FLAG_log is true.
void UncheckedIntPtrTEvent(const char* name, intptr_t value);
Isolate* isolate_;
@@ -329,22 +341,25 @@ class Logger : public CodeEventListener {
friend class CpuProfiler;
};
-#define TIMER_EVENTS_LIST(V) \
- V(RecompileSynchronous, true) \
- V(RecompileConcurrent, true) \
- V(CompileIgnition, true) \
- V(CompileFullCode, true) \
- V(OptimizeCode, true) \
- V(CompileCode, true) \
- V(DeoptimizeCode, true) \
- V(Execute, true) \
+#define TIMER_EVENTS_LIST(V) \
+ V(RecompileSynchronous, true) \
+ V(RecompileConcurrent, true) \
+ V(CompileIgnition, true) \
+ V(CompileFullCode, true) \
+ V(OptimizeCode, true) \
+ V(CompileCode, true) \
+ V(CompileCodeBackground, true) \
+ V(DeoptimizeCode, true) \
+ V(Execute, true) \
V(External, true)
-#define V(TimerName, expose) \
- class TimerEvent##TimerName : public AllStatic { \
- public: \
- static const char* name(void* unused = NULL) { return "V8." #TimerName; } \
- static bool expose_to_api() { return expose; } \
+#define V(TimerName, expose) \
+ class TimerEvent##TimerName : public AllStatic { \
+ public: \
+ static const char* name(void* unused = nullptr) { \
+ return "V8." #TimerName; \
+ } \
+ static bool expose_to_api() { return expose; } \
};
TIMER_EVENTS_LIST(V)
#undef V
@@ -374,8 +389,6 @@ class CodeEventLogger : public CodeEventListener {
void CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code,
Name* name) override;
void CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code,
- int args_count) override;
- void CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code,
SharedFunctionInfo* shared, Name* name) override;
void CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code,
SharedFunctionInfo* shared, Name* source, int line,