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: #50077
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
  • Loading branch information
lukealbao authored and targos committed Nov 21, 2023
1 parent 4b243b5 commit e63aef9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion common.gypi
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.23',
'v8_embedder_string': '-node.24',

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

Expand Down
1 change: 1 addition & 0 deletions deps/v8/AUTHORS
Expand Up @@ -172,6 +172,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
Expand Up @@ -42,6 +42,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 @@ -222,9 +223,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
Expand Up @@ -433,7 +433,7 @@ void LinuxPerfBasicLogger::LogRecordedBuffer(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 e63aef9

Please sign in to comment.