diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/v8/src/compiler/js-heap-broker.h | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/v8/src/compiler/js-heap-broker.h')
-rw-r--r-- | chromium/v8/src/compiler/js-heap-broker.h | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/chromium/v8/src/compiler/js-heap-broker.h b/chromium/v8/src/compiler/js-heap-broker.h index 424da1df55b..b3e256d6864 100644 --- a/chromium/v8/src/compiler/js-heap-broker.h +++ b/chromium/v8/src/compiler/js-heap-broker.h @@ -33,20 +33,20 @@ std::ostream& operator<<(std::ostream& os, const ObjectRef& ref); #define TRACE_BROKER(broker, x) \ do { \ if (broker->tracing_enabled() && FLAG_trace_heap_broker_verbose) \ - broker->Trace() << x << '\n'; \ + StdoutStream{} << broker->Trace() << x << '\n'; \ } while (false) #define TRACE_BROKER_MEMORY(broker, x) \ do { \ if (broker->tracing_enabled() && FLAG_trace_heap_broker_memory) \ - broker->Trace() << x << std::endl; \ + StdoutStream{} << broker->Trace() << x << std::endl; \ } while (false) -#define TRACE_BROKER_MISSING(broker, x) \ - do { \ - if (broker->tracing_enabled()) \ - broker->Trace() << "Missing " << x << " (" << __FILE__ << ":" \ - << __LINE__ << ")" << std::endl; \ +#define TRACE_BROKER_MISSING(broker, x) \ + do { \ + if (broker->tracing_enabled()) \ + StdoutStream{} << broker->Trace() << "Missing " << x << " (" << __FILE__ \ + << ":" << __LINE__ << ")" << std::endl; \ } while (false) struct PropertyAccessTarget { @@ -74,7 +74,13 @@ struct PropertyAccessTarget { class V8_EXPORT_PRIVATE JSHeapBroker { public: JSHeapBroker(Isolate* isolate, Zone* broker_zone, bool tracing_enabled, - bool is_concurrent_inlining); + bool is_concurrent_inlining, bool is_native_context_independent); + + // For use only in tests, sets default values for some arguments. Avoids + // churn when new flags are added. + JSHeapBroker(Isolate* isolate, Zone* broker_zone) + : JSHeapBroker(isolate, broker_zone, FLAG_trace_heap_broker, false, + false) {} // The compilation target's native context. We need the setter because at // broker construction time we don't yet have the canonical handle. @@ -89,6 +95,9 @@ class V8_EXPORT_PRIVATE JSHeapBroker { Zone* zone() const { return zone_; } bool tracing_enabled() const { return tracing_enabled_; } bool is_concurrent_inlining() const { return is_concurrent_inlining_; } + bool is_native_context_independent() const { + return is_native_context_independent_; + } enum BrokerMode { kDisabled, kSerializing, kSerialized, kRetired }; BrokerMode mode() const { return mode_; } @@ -193,7 +202,7 @@ class V8_EXPORT_PRIVATE JSHeapBroker { bool IsSerializedForCompilation(const SharedFunctionInfoRef& shared, const FeedbackVectorRef& feedback) const; - std::ostream& Trace() const; + std::string Trace() const; void IncrementTracingIndentation(); void DecrementTracingIndentation(); @@ -242,7 +251,7 @@ class V8_EXPORT_PRIVATE JSHeapBroker { BrokerMode mode_ = kDisabled; bool const tracing_enabled_; bool const is_concurrent_inlining_; - mutable StdoutStream trace_out_; + bool const is_native_context_independent_; unsigned trace_indentation_ = 0; PerIsolateCompilerCache* compiler_cache_ = nullptr; ZoneUnorderedMap<FeedbackSource, ProcessedFeedback const*, |