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 <[email protected]>
    Commit-Queue: Camillo Bruni <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#90501}

Refs: v8/v8@f7d000a
PR-URL: nodejs/node#50344
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
  • Loading branch information
sercher committed Apr 24, 2024
1 parent 4e51651 commit eb1ea8e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion graal-nodejs/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 graal-nodejs/deps/v8/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ Kyounga Ra <[email protected]>
Loo Rong Jie <[email protected]>
Lu Yahan <[email protected]>
Luis Reis <[email protected]>
Luke Albao <[email protected]>
Luke Zarko <[email protected]>
Ma Aiguo <[email protected]>
Maciej Małecki <[email protected]>
Expand Down
7 changes: 2 additions & 5 deletions graal-nodejs/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 graal-nodejs/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 eb1ea8e

Please sign in to comment.