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: #50344
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
  • Loading branch information
lukealbao authored and targos committed Oct 29, 2023
1 parent c1bc811 commit 5f852cc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 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.26',
'v8_embedder_string': '-node.27',

##### 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 @@ -159,6 +159,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
7 changes: 2 additions & 5 deletions deps/v8/src/diagnostics/perf-jit.cc
Original file line number Diff line number Diff line change
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 @@ -214,11 +215,7 @@ void PerfJitLogger::LogRecordedBuffer(
Handle<AbstractCode> abstract_code,
MaybeHandle<SharedFunctionInfo> maybe_shared, const char* name,
int length) {
if (FLAG_perf_basic_prof_only_functions &&
(abstract_code->kind() != CodeKind::INTERPRETED_FUNCTION &&
abstract_code->kind() != CodeKind::TURBOFAN &&
abstract_code->kind() != CodeKind::MAGLEV &&
abstract_code->kind() != CodeKind::BASELINE)) {
if (FLAG_perf_basic_prof_only_functions && !CodeKindIsJSFunction(abstract_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 @@ -364,7 +364,7 @@ void PerfBasicLogger::LogRecordedBuffer(Handle<AbstractCode> code,
MaybeHandle<SharedFunctionInfo>,
const char* name, int length) {
if (FLAG_perf_basic_prof_only_functions &&
CodeKindIsBuiltinOrJSFunction(code->kind())) {
!CodeKindIsBuiltinOrJSFunction(code->kind())) {
return;
}

Expand Down

0 comments on commit 5f852cc

Please sign in to comment.