Commit 423f38ab authored by Leszek Swirski's avatar Leszek Swirski Committed by V8 LUCI CQ

[system-analyzer] Process shared-library events

Add a new LogEntry for sharedlib PCs

Change-Id: I4f7fdca93a9905e41b73347df475dffcb84bcb89
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2959620
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75125}
parent e9c4ff40
......@@ -8,6 +8,7 @@ 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';
import {IcLogEntry} from './log/ic.mjs';
import {LogEntry} from './log/log.mjs';
import {MapLogEntry} from './log/map.mjs';
......@@ -60,7 +61,7 @@ class App {
static get allEventTypes() {
return new Set([
SourcePosition, MapLogEntry, IcLogEntry, ApiLogEntry, CodeLogEntry,
DeoptLogEntry, TickLogEntry
DeoptLogEntry, SharedLibLogEntry, TickLogEntry
]);
}
......@@ -109,6 +110,8 @@ class App {
break;
case TickLogEntry:
break;
case SharedLibLogEntry:
break;
case DeoptLogEntry:
// TODO select map + code entries
if (entry.fileSourcePosition) entries.push(entry.fileSourcePosition);
......@@ -166,6 +169,8 @@ class App {
return this.showCodeEntries(entries);
case DeoptLogEntry:
return this.showDeoptEntries(entries);
case SharedLibLogEntry:
return this.showSharedLibEntries(entries);
case TickLogEntry:
break;
default:
......@@ -186,6 +191,8 @@ class App {
this._view.deoptList.selectedLogEntries = entries;
}
showSharedLibEntries(entries) {}
showCodeEntries(entries) {
this._view.codePanel.selectedEntries = entries;
this._view.codeList.selectedLogEntries = entries;
......@@ -238,6 +245,8 @@ class App {
return this.focusCodeLogEntry(entry);
case DeoptLogEntry:
return this.focusDeoptLogEntry(entry);
case SharedLibLogEntry:
return this.focusDeoptLogEntry(entry);
case TickLogEntry:
return this.focusTickLogEntry(entry);
default:
......@@ -266,6 +275,10 @@ class App {
this._state.deoptLogEntry = entry;
}
focusSharedLibLogEntry(entry) {
// no-op.
}
focusApiLogEntry(entry) {
this._state.apiLogEntry = entry;
this._view.apiTrack.focusedEntry = entry;
......@@ -294,6 +307,7 @@ class App {
case ApiLogEntry:
case CodeLogEntry:
case DeoptLogEntry:
case SharedLibLogEntry:
case TickLogEntry:
content = content.toolTipDict;
break;
......
......@@ -98,3 +98,22 @@ export class CodeLogEntry extends LogEntry {
];
}
}
export class SharedLibLogEntry extends LogEntry {
constructor(name) {
super('SHARED_LIB', 0);
this._name = name;
}
get name() {
return this._name;
}
toString() {
return `SharedLib`;
}
static get propertyNames() {
return ['name'];
}
}
......@@ -6,7 +6,7 @@ import {LogReader, parseString, parseVarArgs} from '../logreader.mjs';
import {Profile} from '../profile.mjs';
import {ApiLogEntry} from './log/api.mjs';
import {CodeLogEntry, DeoptLogEntry} from './log/code.mjs';
import {CodeLogEntry, DeoptLogEntry, SharedLibLogEntry} from './log/code.mjs';
import {IcLogEntry} from './log/ic.mjs';
import {Edge, MapLogEntry} from './log/map.mjs';
import {TickLogEntry} from './log/tick.mjs';
......@@ -43,6 +43,10 @@ export class Processor extends LogReader {
],
processor: this.processV8Version
},
'shared-library': {
parsers: [parseString, parseInt, parseInt, parseInt],
processor: this.processSharedLibrary
},
'code-creation': {
parsers: [
parseString, parseInt, parseInt, parseInt, parseInt, parseString,
......@@ -215,6 +219,11 @@ export class Processor extends LogReader {
}
}
processSharedLibrary(name, start, end, aslr_slide) {
const entry = this._profile.addLibrary(name, start, end);
entry.logEntry = new SharedLibLogEntry(name);
}
processCodeCreation(type, kind, timestamp, start, size, name, maybe_func) {
this._lastTimestamp = timestamp;
let entry;
......
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