Skip to content

Commit 5f852cc

Browse files
lukealbaotargos
authored andcommitted
deps: V8: cherry-pick f7d000a7ae7b
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>
1 parent c1bc811 commit 5f852cc

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.26',
39+
'v8_embedder_string': '-node.27',
4040

4141
##### V8 defaults for Node.js #####
4242

deps/v8/AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ Kyounga Ra <kyounga@alticast.com>
159159
Loo Rong Jie <loorongjie@gmail.com>
160160
Lu Yahan <yahan@iscas.ac.cn>
161161
Luis Reis <luis.m.reis@gmail.com>
162+
Luke Albao <lukealbao@gmail.com>
162163
Luke Zarko <lukezarko@gmail.com>
163164
Ma Aiguo <maaiguo@uniontech.com>
164165
Maciej Małecki <me@mmalecki.com>

deps/v8/src/diagnostics/perf-jit.cc

+2-5
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include "src/codegen/assembler.h"
4343
#include "src/codegen/source-position-table.h"
4444
#include "src/diagnostics/eh-frame.h"
45+
#include "src/objects/code-kind.h"
4546
#include "src/objects/objects-inl.h"
4647
#include "src/objects/shared-function-info.h"
4748
#include "src/snapshot/embedded/embedded-data.h"
@@ -214,11 +215,7 @@ void PerfJitLogger::LogRecordedBuffer(
214215
Handle<AbstractCode> abstract_code,
215216
MaybeHandle<SharedFunctionInfo> maybe_shared, const char* name,
216217
int length) {
217-
if (FLAG_perf_basic_prof_only_functions &&
218-
(abstract_code->kind() != CodeKind::INTERPRETED_FUNCTION &&
219-
abstract_code->kind() != CodeKind::TURBOFAN &&
220-
abstract_code->kind() != CodeKind::MAGLEV &&
221-
abstract_code->kind() != CodeKind::BASELINE)) {
218+
if (FLAG_perf_basic_prof_only_functions && !CodeKindIsJSFunction(abstract_code->kind())) {
222219
return;
223220
}
224221

deps/v8/src/logging/log.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ void PerfBasicLogger::LogRecordedBuffer(Handle<AbstractCode> code,
364364
MaybeHandle<SharedFunctionInfo>,
365365
const char* name, int length) {
366366
if (FLAG_perf_basic_prof_only_functions &&
367-
CodeKindIsBuiltinOrJSFunction(code->kind())) {
367+
!CodeKindIsBuiltinOrJSFunction(code->kind())) {
368368
return;
369369
}
370370

0 commit comments

Comments
 (0)