Skip to content

Commit f7d000a

Browse files
lukealbaoV8 LUCI CQ
authored andcommitted
[logging] Bugfix: LinuxPerfBasicLogger should log JS functions
This patch fixes a typo that was introduced in commit c51041f / 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}
1 parent 8dc1f58 commit f7d000a

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ Loo Rong Jie <[email protected]>
181181
182182
Ludovic Mermod <[email protected]>
183183
Luis Reis <[email protected]>
184+
Luke Albao <[email protected]>
184185
Luke Zarko <[email protected]>
185186
186187
Maciej Małecki <[email protected]>

src/diagnostics/perf-jit.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include "src/codegen/assembler.h"
4444
#include "src/codegen/source-position-table.h"
4545
#include "src/diagnostics/eh-frame.h"
46+
#include "src/objects/code-kind.h"
4647
#include "src/objects/objects-inl.h"
4748
#include "src/objects/shared-function-info.h"
4849
#include "src/snapshot/embedded/embedded-data.h"
@@ -225,9 +226,7 @@ void LinuxPerfJitLogger::LogRecordedBuffer(
225226
DisallowGarbageCollection no_gc;
226227
if (v8_flags.perf_basic_prof_only_functions) {
227228
CodeKind code_kind = abstract_code->kind(isolate_);
228-
if (code_kind != CodeKind::INTERPRETED_FUNCTION &&
229-
code_kind != CodeKind::TURBOFAN && code_kind != CodeKind::MAGLEV &&
230-
code_kind != CodeKind::BASELINE) {
229+
if (!CodeKindIsJSFunction(code_kind)) {
231230
return;
232231
}
233232
}

src/logging/log.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ void LinuxPerfBasicLogger::LogRecordedBuffer(Tagged<AbstractCode> code,
446446
DisallowGarbageCollection no_gc;
447447
PtrComprCageBase cage_base(isolate_);
448448
if (v8_flags.perf_basic_prof_only_functions &&
449-
CodeKindIsBuiltinOrJSFunction(code->kind(cage_base))) {
449+
!CodeKindIsBuiltinOrJSFunction(code->kind(cage_base))) {
450450
return;
451451
}
452452

0 commit comments

Comments
 (0)