[profview] Avoid treating embedded builtins as CPP code.
Instead attribute them properly as Bultin or BytecodeHandler. Bug: v8:6240 Change-Id: I773a533b318afe52d63152edf5b16463801db8e9 Reviewed-on: https://chromium-review.googlesource.com/1249202 Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/master@{#56262}
This commit is contained in:
parent
94364486c6
commit
88a444baa2
@ -123,8 +123,19 @@ Code* BuiltinDeserializer::DeserializeBuiltinRaw(int builtin_id) {
|
||||
Assembler::FlushICache(code->raw_instruction_start(),
|
||||
code->raw_instruction_size());
|
||||
|
||||
PROFILE(isolate(), CodeCreateEvent(CodeEventListener::BUILTIN_TAG,
|
||||
AbstractCode::cast(code),
|
||||
CodeEventListener::LogEventsAndTags code_tag;
|
||||
switch (code->kind()) {
|
||||
case AbstractCode::BUILTIN:
|
||||
code_tag = CodeEventListener::BUILTIN_TAG;
|
||||
break;
|
||||
case AbstractCode::BYTECODE_HANDLER:
|
||||
code_tag = CodeEventListener::BYTECODE_HANDLER_TAG;
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
PROFILE(isolate(), CodeCreateEvent(code_tag, AbstractCode::cast(code),
|
||||
Builtins::name(builtin_id)));
|
||||
LOG_CODE_EVENT(isolate(),
|
||||
CodeLinePosInfoRecordEvent(
|
||||
|
@ -892,16 +892,24 @@ JsonProfile.prototype.addStaticCode = function(
|
||||
|
||||
JsonProfile.prototype.addCode = function(
|
||||
kind, name, timestamp, start, size) {
|
||||
let codeId = this.codeEntries_.length;
|
||||
// Find out if we have a static code entry for the code. If yes, we will
|
||||
// make sure it is written to the JSON file just once.
|
||||
let staticEntry = this.codeMap_.findAddress(start);
|
||||
if (staticEntry && staticEntry.entry.type === 'CPP') {
|
||||
codeId = staticEntry.entry.codeId;
|
||||
}
|
||||
|
||||
var entry = new CodeMap.CodeEntry(size, name, 'CODE');
|
||||
this.codeMap_.addCode(start, entry);
|
||||
|
||||
entry.codeId = this.codeEntries_.length;
|
||||
this.codeEntries_.push({
|
||||
entry.codeId = codeId;
|
||||
this.codeEntries_[codeId] = {
|
||||
name : entry.name,
|
||||
timestamp: timestamp,
|
||||
type : entry.type,
|
||||
kind : kind
|
||||
});
|
||||
};
|
||||
|
||||
return entry;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user