Skip to content

Commit

Permalink
deps: V8: cherry-pick f7d000a7ae7b
Browse files Browse the repository at this point in the history
Original commit message:

    [logging] Bugfix: LinuxPerfBasicLogger should log JS functions

    This patch fixes a typo that was introduced in commit
    c51041f45400928cd64fbc8f389c0dd0dd15f82f /
    https://chromium-review.googlesource.com/c/v8/v8/+/2336793, which reversed the behavior of the perf_basic_prof_only_functions flag.

    This also refactors the equivalent guard in LinuxPerfJitLogger to use the same inline CodeKind API for identifying JS Functions. This is unrelated to the bug, but it seems a fair rider to add on here.

    Bug: v8:14387
    Change-Id: I25766b0d45f4c65dfec5ae01e094a1ed94111054
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4954225
    Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    Commit-Queue: Camillo Bruni <cbruni@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#90501}

Refs: v8/v8@f7d000a
PR-URL: #50302
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
  • Loading branch information
lukealbao authored and targos committed Oct 24, 2023
1 parent 998feda commit f4da308
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.13',
'v8_embedder_string': '-node.14',

##### V8 defaults for Node.js #####

Expand Down
1 change: 1 addition & 0 deletions deps/v8/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ Kyounga Ra <kyounga@alticast.com>
Loo Rong Jie <loorongjie@gmail.com>
Lu Yahan <yahan@iscas.ac.cn>
Luis Reis <luis.m.reis@gmail.com>
Luke Albao <lukealbao@gmail.com>
Luke Zarko <lukezarko@gmail.com>
Ma Aiguo <maaiguo@uniontech.com>
Maciej Małecki <me@mmalecki.com>
Expand Down
5 changes: 2 additions & 3 deletions deps/v8/src/diagnostics/perf-jit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include "src/codegen/assembler.h"
#include "src/codegen/source-position-table.h"
#include "src/diagnostics/eh-frame.h"
#include "src/objects/code-kind.h"
#include "src/objects/objects-inl.h"
#include "src/objects/shared-function-info.h"
#include "src/snapshot/embedded/embedded-data.h"
Expand Down Expand Up @@ -225,9 +226,7 @@ void LinuxPerfJitLogger::LogRecordedBuffer(
DisallowGarbageCollection no_gc;
if (v8_flags.perf_basic_prof_only_functions) {
CodeKind code_kind = abstract_code->kind(isolate_);
if (code_kind != CodeKind::INTERPRETED_FUNCTION &&
code_kind != CodeKind::TURBOFAN && code_kind != CodeKind::MAGLEV &&
code_kind != CodeKind::BASELINE) {
if (!CodeKindIsJSFunction(code_kind)) {
return;
}
}
Expand Down
2 changes: 1 addition & 1 deletion deps/v8/src/logging/log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ void LinuxPerfBasicLogger::LogRecordedBuffer(Tagged<AbstractCode> code,
DisallowGarbageCollection no_gc;
PtrComprCageBase cage_base(isolate_);
if (v8_flags.perf_basic_prof_only_functions &&
CodeKindIsBuiltinOrJSFunction(code->kind(cage_base))) {
!CodeKindIsBuiltinOrJSFunction(code->kind(cage_base))) {
return;
}

Expand Down

0 comments on commit f4da308

Please sign in to comment.