[turbofan] Fix tracing with perfetto.

Building with v8_use_perfetto requires that the categories passed to
TRACE_EVENT* be a constexpr.

Change-Id: Iee4b713d8fe0b3f52f6e5cfe5baef0ced87f9855
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3135575
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/main@{#76620}
This commit is contained in:
Pierre Langlois 2021-09-01 11:24:24 +01:00 committed by V8 LUCI CQ
parent 11cd2317ac
commit 97e7dc3dea
2 changed files with 7 additions and 7 deletions

View File

@ -10,17 +10,12 @@
#include "src/compiler/zone-stats.h"
#include "src/objects/shared-function-info.h"
#include "src/objects/string.h"
#include "src/tracing/trace-event.h"
namespace v8 {
namespace internal {
namespace compiler {
// We log detailed phase information about the pipeline
// in both the v8.turbofan and the v8.wasm.turbofan categories.
const char PipelineStatistics::kTraceCategory[] =
TRACE_DISABLED_BY_DEFAULT("v8.turbofan") "," // --
TRACE_DISABLED_BY_DEFAULT("v8.wasm.turbofan");
constexpr char PipelineStatistics::kTraceCategory[];
void PipelineStatistics::CommonStats::Begin(
PipelineStatistics* pipeline_stats) {

View File

@ -11,6 +11,7 @@
#include "src/base/platform/elapsed-timer.h"
#include "src/compiler/zone-stats.h"
#include "src/diagnostics/compilation-statistics.h"
#include "src/tracing/trace-event.h"
namespace v8 {
namespace internal {
@ -29,7 +30,11 @@ class PipelineStatistics : public Malloced {
void BeginPhaseKind(const char* phase_kind_name);
void EndPhaseKind();
static const char kTraceCategory[];
// We log detailed phase information about the pipeline
// in both the v8.turbofan and the v8.wasm.turbofan categories.
static constexpr char kTraceCategory[] =
TRACE_DISABLED_BY_DEFAULT("v8.turbofan") "," // --
TRACE_DISABLED_BY_DEFAULT("v8.wasm.turbofan");
private:
size_t OuterZoneSize() {