Commit 1b8d4e3a authored by Camillo Bruni's avatar Camillo Bruni Committed by V8 LUCI CQ

[api] Remove FLAG_log_api

API logging has not been used in a while and we have valid alternatives:
- Runtime call stats
- Profiling
- Timer events

Together they make --log-api superfluous and we can remove it and reduce
the number of branches when calling into the V8 API.

Change-Id: Ie10f70b61ebdb82166270e7630ebcf20a27c4902
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3574549Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: 's avatarJakob Linke <jgruber@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79904}
parent e94b84a8
......@@ -87,24 +87,22 @@ inline JSReceiver FunctionCallbackArguments::holder() {
ExternalCallbackScope call_scope(ISOLATE, FUNCTION_ADDR(F)); \
PropertyCallbackInfo<API_RETURN_TYPE> callback_info(values_);
#define CREATE_NAMED_CALLBACK(FUNCTION, TYPE, RETURN_TYPE, API_RETURN_TYPE, \
INFO_FOR_SIDE_EFFECT) \
Handle<RETURN_TYPE> PropertyCallbackArguments::CallNamed##FUNCTION( \
Handle<InterceptorInfo> interceptor, Handle<Name> name) { \
DCHECK_NAME_COMPATIBLE(interceptor, name); \
Isolate* isolate = this->isolate(); \
RCS_SCOPE(isolate, RuntimeCallCounterId::kNamed##FUNCTION##Callback); \
Handle<Object> receiver_check_unsupported; \
GenericNamedProperty##FUNCTION##Callback f = \
ToCData<GenericNamedProperty##FUNCTION##Callback>( \
interceptor->TYPE()); \
PREPARE_CALLBACK_INFO(isolate, f, Handle<RETURN_TYPE>, API_RETURN_TYPE, \
INFO_FOR_SIDE_EFFECT, receiver_check_unsupported, \
NotAccessor); \
LOG(isolate, \
ApiNamedPropertyAccess("interceptor-named-" #TYPE, holder(), *name)); \
f(v8::Utils::ToLocal(name), callback_info); \
return GetReturnValue<RETURN_TYPE>(isolate); \
#define CREATE_NAMED_CALLBACK(FUNCTION, TYPE, RETURN_TYPE, API_RETURN_TYPE, \
INFO_FOR_SIDE_EFFECT) \
Handle<RETURN_TYPE> PropertyCallbackArguments::CallNamed##FUNCTION( \
Handle<InterceptorInfo> interceptor, Handle<Name> name) { \
DCHECK_NAME_COMPATIBLE(interceptor, name); \
Isolate* isolate = this->isolate(); \
RCS_SCOPE(isolate, RuntimeCallCounterId::kNamed##FUNCTION##Callback); \
Handle<Object> receiver_check_unsupported; \
GenericNamedProperty##FUNCTION##Callback f = \
ToCData<GenericNamedProperty##FUNCTION##Callback>( \
interceptor->TYPE()); \
PREPARE_CALLBACK_INFO(isolate, f, Handle<RETURN_TYPE>, API_RETURN_TYPE, \
INFO_FOR_SIDE_EFFECT, receiver_check_unsupported, \
NotAccessor); \
f(v8::Utils::ToLocal(name), callback_info); \
return GetReturnValue<RETURN_TYPE>(isolate); \
}
FOR_EACH_CALLBACK(CREATE_NAMED_CALLBACK)
......@@ -123,8 +121,6 @@ FOR_EACH_CALLBACK(CREATE_NAMED_CALLBACK)
PREPARE_CALLBACK_INFO(isolate, f, Handle<RETURN_TYPE>, API_RETURN_TYPE, \
INFO_FOR_SIDE_EFFECT, receiver_check_unsupported, \
NotAccessor); \
LOG(isolate, ApiIndexedPropertyAccess("interceptor-indexed-" #TYPE, \
holder(), index)); \
f(index, callback_info); \
return GetReturnValue<RETURN_TYPE>(isolate); \
}
......@@ -136,7 +132,6 @@ FOR_EACH_CALLBACK(CREATE_INDEXED_CALLBACK)
Handle<Object> FunctionCallbackArguments::Call(CallHandlerInfo handler) {
Isolate* isolate = this->isolate();
LOG(isolate, ApiObjectAccess("call", holder()));
RCS_SCOPE(isolate, RuntimeCallCounterId::kFunctionCallback);
v8::FunctionCallback f =
v8::ToCData<v8::FunctionCallback>(handler.callback());
......@@ -156,7 +151,6 @@ Handle<Object> FunctionCallbackArguments::Call(CallHandlerInfo handler) {
Handle<JSObject> PropertyCallbackArguments::CallNamedEnumerator(
Handle<InterceptorInfo> interceptor) {
DCHECK(interceptor->is_named());
LOG(isolate(), ApiObjectAccess("interceptor-named-enumerator", holder()));
RCS_SCOPE(isolate(), RuntimeCallCounterId::kNamedEnumeratorCallback);
return CallPropertyEnumerator(interceptor);
}
......@@ -164,7 +158,6 @@ Handle<JSObject> PropertyCallbackArguments::CallNamedEnumerator(
Handle<JSObject> PropertyCallbackArguments::CallIndexedEnumerator(
Handle<InterceptorInfo> interceptor) {
DCHECK(!interceptor->is_named());
LOG(isolate(), ApiObjectAccess("interceptor-indexed-enumerator", holder()));
RCS_SCOPE(isolate(), RuntimeCallCounterId::kIndexedEnumeratorCallback);
return CallPropertyEnumerator(interceptor);
}
......@@ -174,8 +167,6 @@ Handle<Object> PropertyCallbackArguments::CallNamedGetter(
DCHECK_NAME_COMPATIBLE(interceptor, name);
Isolate* isolate = this->isolate();
RCS_SCOPE(isolate, RuntimeCallCounterId::kNamedGetterCallback);
LOG(isolate,
ApiNamedPropertyAccess("interceptor-named-getter", holder(), *name));
GenericNamedPropertyGetterCallback f =
ToCData<GenericNamedPropertyGetterCallback>(interceptor->getter());
return BasicCallNamedGetterCallback(f, name, interceptor);
......@@ -186,8 +177,6 @@ Handle<Object> PropertyCallbackArguments::CallNamedDescriptor(
DCHECK_NAME_COMPATIBLE(interceptor, name);
Isolate* isolate = this->isolate();
RCS_SCOPE(isolate, RuntimeCallCounterId::kNamedDescriptorCallback);
LOG(isolate,
ApiNamedPropertyAccess("interceptor-named-descriptor", holder(), *name));
GenericNamedPropertyDescriptorCallback f =
ToCData<GenericNamedPropertyDescriptorCallback>(
interceptor->descriptor());
......@@ -215,8 +204,6 @@ Handle<Object> PropertyCallbackArguments::CallNamedSetter(
RCS_SCOPE(isolate, RuntimeCallCounterId::kNamedSetterCallback);
PREPARE_CALLBACK_INFO_FAIL_SIDE_EFFECT_CHECK(isolate, f, Handle<Object>,
v8::Value);
LOG(isolate,
ApiNamedPropertyAccess("interceptor-named-set", holder(), *name));
f(v8::Utils::ToLocal(name), v8::Utils::ToLocal(value), callback_info);
return GetReturnValue<Object>(isolate);
}
......@@ -231,8 +218,6 @@ Handle<Object> PropertyCallbackArguments::CallNamedDefiner(
ToCData<GenericNamedPropertyDefinerCallback>(interceptor->definer());
PREPARE_CALLBACK_INFO_FAIL_SIDE_EFFECT_CHECK(isolate, f, Handle<Object>,
v8::Value);
LOG(isolate,
ApiNamedPropertyAccess("interceptor-named-define", holder(), *name));
f(v8::Utils::ToLocal(name), desc, callback_info);
return GetReturnValue<Object>(isolate);
}
......@@ -246,8 +231,6 @@ Handle<Object> PropertyCallbackArguments::CallIndexedSetter(
ToCData<IndexedPropertySetterCallback>(interceptor->setter());
PREPARE_CALLBACK_INFO_FAIL_SIDE_EFFECT_CHECK(isolate, f, Handle<Object>,
v8::Value);
LOG(isolate,
ApiIndexedPropertyAccess("interceptor-indexed-set", holder(), index));
f(index, v8::Utils::ToLocal(value), callback_info);
return GetReturnValue<Object>(isolate);
}
......@@ -262,8 +245,6 @@ Handle<Object> PropertyCallbackArguments::CallIndexedDefiner(
ToCData<IndexedPropertyDefinerCallback>(interceptor->definer());
PREPARE_CALLBACK_INFO_FAIL_SIDE_EFFECT_CHECK(isolate, f, Handle<Object>,
v8::Value);
LOG(isolate,
ApiIndexedPropertyAccess("interceptor-indexed-define", holder(), index));
f(index, desc, callback_info);
return GetReturnValue<Object>(isolate);
}
......@@ -273,8 +254,6 @@ Handle<Object> PropertyCallbackArguments::CallIndexedGetter(
DCHECK(!interceptor->is_named());
Isolate* isolate = this->isolate();
RCS_SCOPE(isolate, RuntimeCallCounterId::kNamedGetterCallback);
LOG(isolate,
ApiIndexedPropertyAccess("interceptor-indexed-getter", holder(), index));
IndexedPropertyGetterCallback f =
ToCData<IndexedPropertyGetterCallback>(interceptor->getter());
return BasicCallIndexedGetterCallback(f, index, interceptor);
......@@ -285,8 +264,6 @@ Handle<Object> PropertyCallbackArguments::CallIndexedDescriptor(
DCHECK(!interceptor->is_named());
Isolate* isolate = this->isolate();
RCS_SCOPE(isolate, RuntimeCallCounterId::kIndexedDescriptorCallback);
LOG(isolate, ApiIndexedPropertyAccess("interceptor-indexed-descriptor",
holder(), index));
IndexedPropertyDescriptorCallback f =
ToCData<IndexedPropertyDescriptorCallback>(interceptor->descriptor());
return BasicCallIndexedGetterCallback(f, index, interceptor);
......@@ -323,7 +300,6 @@ Handle<Object> PropertyCallbackArguments::CallAccessorGetter(
Handle<AccessorInfo> info, Handle<Name> name) {
Isolate* isolate = this->isolate();
RCS_SCOPE(isolate, RuntimeCallCounterId::kAccessorGetterCallback);
LOG(isolate, ApiNamedPropertyAccess("accessor-getter", holder(), *name));
AccessorNameGetterCallback f =
ToCData<AccessorNameGetterCallback>(info->getter());
return BasicCallNamedGetterCallback(f, name, info,
......@@ -339,7 +315,6 @@ Handle<Object> PropertyCallbackArguments::CallAccessorSetter(
ToCData<AccessorNameSetterCallback>(accessor_info->setter());
PREPARE_CALLBACK_INFO(isolate, f, Handle<Object>, void, accessor_info,
handle(receiver(), isolate), Setter);
LOG(isolate, ApiNamedPropertyAccess("accessor-setter", holder(), *name));
f(v8::Utils::ToLocal(name), v8::Utils::ToLocal(value), callback_info);
return GetReturnValue<Object>(isolate);
}
......
......@@ -35,10 +35,9 @@
* TODO(verwaest): Remove calls form API methods to DO_NOT_USE macros.
*/
#define LOG_API(isolate, class_name, function_name) \
RCS_SCOPE(isolate, \
i::RuntimeCallCounterId::kAPI_##class_name##_##function_name); \
LOG(isolate, ApiEntryCall("v8::" #class_name "::" #function_name))
#define API_RCS_SCOPE(isolate, class_name, function_name) \
RCS_SCOPE(isolate, \
i::RuntimeCallCounterId::kAPI_##class_name##_##function_name);
#define ENTER_V8_DO_NOT_USE(isolate) i::VMState<v8::OTHER> __state__((isolate))
......@@ -50,7 +49,7 @@
} \
HandleScopeClass handle_scope(isolate); \
CallDepthScope<do_callback> call_depth_scope(isolate, context); \
LOG_API(isolate, class_name, function_name); \
API_RCS_SCOPE(isolate, class_name, function_name); \
i::VMState<v8::OTHER> __state__((isolate)); \
bool has_pending_exception = false
......
This diff is collapsed.
......@@ -267,7 +267,6 @@ V8_WARN_UNUSED_RESULT static Object HandleApiCallAsFunctionOrConstructor(
Object result;
{
HandleScope scope(isolate);
LOG(isolate, ApiObjectAccess("call non-function", obj));
FunctionCallbackArguments custom(
isolate, call_data.data(), constructor, obj, new_target,
args.address_of_first_argument(), args.length() - 1);
......
......@@ -183,7 +183,7 @@ bool GetPrivateMembers(Local<Context> context, Local<Object> object,
std::vector<Local<Value>>* names_out,
std::vector<Local<Value>>* values_out) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
LOG_API(isolate, debug, GetPrivateMembers);
API_RCS_SCOPE(isolate, debug, GetPrivateMembers);
ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
i::Handle<i::JSReceiver> receiver = Utils::OpenHandle(*object);
i::Handle<i::JSArray> names;
......
......@@ -1528,8 +1528,6 @@ bool Isolate::MayAccess(Handle<Context> accessing_context,
data = handle(access_check_info.data(), this);
}
LOG(this, ApiSecurityCheck());
{
// Leaving JavaScript.
VMState<EXTERNAL> state(this);
......
......@@ -2009,7 +2009,6 @@ DEFINE_BOOL(log, false,
"Minimal logging (no API, code, GC, suspect, or handles samples).")
DEFINE_BOOL(log_all, false, "Log all events to the log file.")
DEFINE_BOOL(log_api, false, "Log API events to the log file.")
DEFINE_BOOL(log_code, false,
"Log code events to the log file without profiling.")
DEFINE_BOOL(log_code_disassemble, false,
......
......@@ -135,7 +135,6 @@ void V8::Initialize() {
// Update logging information before enforcing flag implications.
bool* log_all_flags[] = {&FLAG_turbo_profiling_log_builtins,
&FLAG_log_all,
&FLAG_log_api,
&FLAG_log_code,
&FLAG_log_code_disassemble,
&FLAG_log_source_code,
......
......@@ -1074,13 +1074,6 @@ void Logger::IntPtrTEvent(const char* name, intptr_t value) {
msg.WriteToLogFile();
}
void Logger::WriteApiSecurityCheck() {
DCHECK(FLAG_log_api);
MSG_BUILDER();
msg << "api" << kNext << "check-security";
msg.WriteToLogFile();
}
void Logger::SharedLibraryEvent(const std::string& library_path,
uintptr_t start, uintptr_t end,
intptr_t aslr_slide) {
......@@ -1152,39 +1145,6 @@ bool Logger::is_logging() {
TIMER_EVENTS_LIST(V)
#undef V
void Logger::WriteApiNamedPropertyAccess(const char* tag, JSObject holder,
Object property_name) {
DCHECK(FLAG_log_api);
DCHECK(property_name.IsName());
MSG_BUILDER();
msg << "api" << kNext << tag << kNext << holder.class_name() << kNext
<< Name::cast(property_name);
msg.WriteToLogFile();
}
void Logger::WriteApiIndexedPropertyAccess(const char* tag, JSObject holder,
uint32_t index) {
DCHECK(FLAG_log_api);
MSG_BUILDER();
msg << "api" << kNext << tag << kNext << holder.class_name() << kNext
<< index;
msg.WriteToLogFile();
}
void Logger::WriteApiObjectAccess(const char* tag, JSReceiver object) {
DCHECK(FLAG_log_api);
MSG_BUILDER();
msg << "api" << kNext << tag << kNext << object.class_name();
msg.WriteToLogFile();
}
void Logger::WriteApiEntryCall(const char* name) {
DCHECK(FLAG_log_api);
MSG_BUILDER();
msg << "api" << kNext << name;
msg.WriteToLogFile();
}
void Logger::NewEvent(const char* name, void* object, size_t size) {
if (!FLAG_log) return;
MSG_BUILDER();
......
......@@ -160,30 +160,6 @@ class Logger : public CodeEventListener {
void ScriptEvent(ScriptEventType type, int script_id);
void ScriptDetails(Script script);
// ==== Events logged by --log-api. ====
void ApiSecurityCheck() {
if (!FLAG_log_api) return;
WriteApiSecurityCheck();
}
void ApiNamedPropertyAccess(const char* tag, JSObject holder, Object name) {
if (!FLAG_log_api) return;
WriteApiNamedPropertyAccess(tag, holder, name);
}
void ApiIndexedPropertyAccess(const char* tag, JSObject holder,
uint32_t index) {
if (!FLAG_log_api) return;
WriteApiIndexedPropertyAccess(tag, holder, index);
}
void ApiObjectAccess(const char* tag, JSReceiver obj) {
if (!FLAG_log_api) return;
WriteApiObjectAccess(tag, obj);
}
void ApiEntryCall(const char* name) {
if (!FLAG_log_api) return;
WriteApiEntryCall(name);
}
// ==== Events logged by --log-code. ====
V8_EXPORT_PRIVATE void AddCodeEventListener(CodeEventListener* listener);
V8_EXPORT_PRIVATE void RemoveCodeEventListener(CodeEventListener* listener);
......
......@@ -513,7 +513,6 @@ UNINITIALIZED_TEST(LogAll) {
SETUP_FLAGS();
i::FLAG_log_all = true;
i::FLAG_log_deopt = true;
i::FLAG_log_api = true;
i::FLAG_turbo_inlining = false;
i::FLAG_log_internal_timer_events = true;
i::FLAG_allow_natives_syntax = true;
......@@ -551,11 +550,9 @@ UNINITIALIZED_TEST(LogAll) {
logger.StopLogging();
// We should find at least one code-creation even for testAddFn();
CHECK(logger.ContainsLine({"api,v8::Context::New"}));
CHECK(logger.ContainsLine({"timer-event-start", "V8.CompileCode"}));
CHECK(logger.ContainsLine({"timer-event-end", "V8.CompileCode"}));
CHECK(logger.ContainsLine({"code-creation,Script", ":1:1"}));
CHECK(logger.ContainsLine({"api,v8::Script::Run"}));
CHECK(logger.ContainsLine({"code-creation,LazyCompile,", "testAddFn"}));
if (i::FLAG_opt && !i::FLAG_always_opt) {
......
......@@ -17,7 +17,6 @@ class State {
_mapTimeline;
_deoptTimeline;
_codeTimeline;
_apiTimeline;
_tickTimeline;
_timerTimeline;
_minStartTime = Number.POSITIVE_INFINITY;
......@@ -42,13 +41,12 @@ class State {
}
setTimelines(
mapTimeline, icTimeline, deoptTimeline, codeTimeline, apiTimeline,
tickTimeline, timerTimeline) {
mapTimeline, icTimeline, deoptTimeline, codeTimeline, tickTimeline,
timerTimeline) {
this._mapTimeline = mapTimeline;
this._icTimeline = icTimeline;
this._deoptTimeline = deoptTimeline;
this._codeTimeline = codeTimeline;
this._apiTimeline = apiTimeline;
this._tickTimeline = tickTimeline;
this._timerTimeline = timerTimeline;
for (let timeline of arguments) {
......@@ -78,10 +76,6 @@ class State {
return this._codeTimeline;
}
get apiTimeline() {
return this._apiTimeline;
}
get tickTimeline() {
return this._tickTimeline;
}
......@@ -93,8 +87,7 @@ class State {
get timelines() {
return [
this._mapTimeline, this._icTimeline, this._deoptTimeline,
this._codeTimeline, this._apiTimeline, this._tickTimeline,
this._timerTimeline
this._codeTimeline, this._tickTimeline, this._timerTimeline
];
}
......
......@@ -61,7 +61,6 @@ found in the LICENSE file. -->
<timeline-track id="ic-track" title="IC"></timeline-track>
<timeline-track id="deopt-track" title="Deopt"></timeline-track>
<timeline-track id="code-track" title="Code"></timeline-track>
<timeline-track id="api-track" title="API"></timeline-track>
</timeline-panel>
<div class="panels">
......@@ -92,7 +91,6 @@ found in the LICENSE file. -->
<list-panel id="map-list" title="Map Events"></list-panel>
<list-panel id="deopt-list" title="Deopt Events"></list-panel>
<list-panel id="code-list" title="Code Events"></list-panel>
<list-panel id="api-list" title="API Events"></list-panel>
</div>
</section>
......@@ -155,8 +153,8 @@ found in the LICENSE file. -->
</dt>
<dd>Log detailed generated generated code</dd>
<dt>
<a href="https://source.chromium.org/search?q=FLAG_log_api">
<code>--log-api</code>
<a href="https://source.chromium.org/search?q=FLAG_log_code">
<code>--log-code</code>
</a>
</dt>
<dd>Log details about deoptimized code</dd>
......
......@@ -5,7 +5,6 @@
import {Script, SourcePosition} from '../profile.mjs';
import {State} from './app-model.mjs';
import {ApiLogEntry} from './log/api.mjs';
import {CodeLogEntry} from './log/code.mjs';
import {DeoptLogEntry} from './log/code.mjs';
import {SharedLibLogEntry} from './log/code.mjs';
......@@ -34,14 +33,12 @@ class App {
icTrack: $('#ic-track'),
deoptTrack: $('#deopt-track'),
codeTrack: $('#code-track'),
apiTrack: $('#api-track'),
timerTrack: $('#timer-track'),
icList: $('#ic-list'),
mapList: $('#map-list'),
codeList: $('#code-list'),
deoptList: $('#deopt-list'),
apiList: $('#api-list'),
mapPanel: $('#map-panel'),
codePanel: $('#code-panel'),
......@@ -64,7 +61,6 @@ class App {
SourcePosition,
MapLogEntry,
IcLogEntry,
ApiLogEntry,
CodeLogEntry,
DeoptLogEntry,
SharedLibLogEntry,
......@@ -125,7 +121,6 @@ class App {
entries = entry.entries.concat(entry.sourcePositions);
break;
case TimerLogEntry:
case ApiLogEntry:
case CodeLogEntry:
case TickLogEntry:
case SharedLibLogEntry:
......@@ -175,8 +170,6 @@ class App {
return this.showMapEntries(entries, focusView);
case IcLogEntry:
return this.showIcEntries(entries, focusView);
case ApiLogEntry:
return this.showApiEntries(entries, focusView);
case CodeLogEntry:
return this.showCodeEntries(entries, focusView);
case DeoptLogEntry:
......@@ -215,11 +208,6 @@ class App {
if (focusView) this._view.codePanel.show();
}
showApiEntries(entries, focusView = true) {
this._view.apiList.selectedLogEntries = entries;
if (focusView) this._view.apiList.show();
}
showTickEntries(entries, focusView = true) {}
showTimerEntries(entries, focusView = true) {}
......@@ -239,7 +227,6 @@ class App {
this.showIcEntries(this._state.icTimeline.selectionOrSelf, false);
this.showDeoptEntries(this._state.deoptTimeline.selectionOrSelf, false);
this.showCodeEntries(this._state.codeTimeline.selectionOrSelf, false);
this.showApiEntries(this._state.apiTimeline.selectionOrSelf, false);
this.showTickEntries(this._state.tickTimeline.selectionOrSelf, false);
this.showTimerEntries(this._state.timerTimeline.selectionOrSelf, false);
this._view.timelinePanel.timeSelection = {start, end, focus, zoom};
......@@ -260,8 +247,6 @@ class App {
return this.focusMapLogEntry(entry);
case IcLogEntry:
return this.focusIcLogEntry(entry);
case ApiLogEntry:
return this.focusApiLogEntry(entry);
case CodeLogEntry:
return this.focusCodeLogEntry(entry);
case DeoptLogEntry:
......@@ -312,12 +297,6 @@ class App {
// no-op.
}
focusApiLogEntry(entry) {
this._state.apiLogEntry = entry;
this._view.apiTrack.focusedEntry = entry;
this.focusSourcePosition(entry.sourcePosition);
}
focusTickLogEntry(entry) {
this._state.tickLogEntry = entry;
this._view.tickTrack.focusedEntry = entry;
......@@ -380,18 +359,16 @@ class App {
const icTimeline = processor.icTimeline;
const deoptTimeline = processor.deoptTimeline;
const codeTimeline = processor.codeTimeline;
const apiTimeline = processor.apiTimeline;
const tickTimeline = processor.tickTimeline;
const timerTimeline = processor.timerTimeline;
this._state.setTimelines(
mapTimeline, icTimeline, deoptTimeline, codeTimeline, apiTimeline,
tickTimeline, timerTimeline);
mapTimeline, icTimeline, deoptTimeline, codeTimeline, tickTimeline,
timerTimeline);
this._view.mapPanel.timeline = mapTimeline;
this._view.icList.timeline = icTimeline;
this._view.mapList.timeline = mapTimeline;
this._view.deoptList.timeline = deoptTimeline;
this._view.codeList.timeline = codeTimeline;
this._view.apiList.timeline = apiTimeline;
this._view.scriptPanel.scripts = processor.scripts;
this._view.codePanel.timeline = codeTimeline;
this._view.codePanel.timeline = codeTimeline;
......@@ -410,7 +387,6 @@ class App {
this._view.icTrack.data = this._state.icTimeline;
this._view.deoptTrack.data = this._state.deoptTimeline;
this._view.codeTrack.data = this._state.codeTimeline;
this._view.apiTrack.data = this._state.apiTimeline;
this._view.tickTrack.data = this._state.tickTimeline;
this._view.timerTrack.data = this._state.timerTimeline;
}
......
// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {LogEntry} from './log.mjs';
export class ApiLogEntry extends LogEntry {
constructor(type, time, name, argument) {
super(type, time);
this._name = name;
this._argument = argument;
}
get name() {
return this._name;
}
get argument() {
return this._argument;
}
static get propertyNames() {
return ['type', 'name', 'argument'];
}
}
......@@ -6,7 +6,6 @@ import {LogReader, parseString, parseVarArgs} from '../logreader.mjs';
import {Profile} from '../profile.mjs';
import {RemoteLinuxCppEntriesProvider, RemoteMacOSCppEntriesProvider} from '../tickprocessor.mjs'
import {ApiLogEntry} from './log/api.mjs';
import {CodeLogEntry, DeoptLogEntry, FeedbackVectorEntry, SharedLibLogEntry} from './log/code.mjs';
import {IcLogEntry} from './log/ic.mjs';
import {Edge, MapLogEntry} from './log/map.mjs';
......@@ -49,7 +48,6 @@ class AsyncConsumer {
export class Processor extends LogReader {
_profile = new Profile();
_apiTimeline = new Timeline();
_codeTimeline = new Timeline();
_deoptTimeline = new Timeline();
_icTimeline = new Timeline();
......@@ -580,19 +578,7 @@ export class Processor extends LogReader {
}
processApiEvent(type, varArgs) {
let name, arg1;
if (varArgs.length == 0) {
const index = type.indexOf(':');
if (index > 0) {
name = type;
type = type.substr(0, index);
}
} else {
name = varArgs[0];
arg1 = varArgs[1];
}
this._apiTimeline.push(
new ApiLogEntry(type, this._lastTimestamp, name, arg1));
// legacy events that are no longer supported
}
processTimerEventStart(type, time) {
......@@ -629,10 +615,6 @@ export class Processor extends LogReader {
return this._codeTimeline;
}
get apiTimeline() {
return this._apiTimeline;
}
get tickTimeline() {
return this._tickTimeline;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment