summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2020-03-04 15:35:43 +0100
committerJüri Valdmann <juri.valdmann@qt.io>2020-03-06 11:17:48 +0000
commitb6fde543e118f3056b6bdca1c5ae6f36afbf8be2 (patch)
tree0389c3be9514383d6169e2ded2b800e02512613f
parent4a01d3a410354bc8fe2e6ef03d32cbe39a770204 (diff)
downloadqtwebengine-chromium-b6fde543e118f3056b6bdca1c5ae6f36afbf8be2.tar.gz
FIXUP: Fix build with gcc 5
Restore tracing service. Seems std::tuple in gcc 5 does not support direct construction of the elements, so instead the elements have to be convertible and movable. Task-number: QTBUG-81767 Change-Id: I6f700e0776c082cec82e1b1c8731d77a26f783d1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io> (cherry picked from commit 468c292d227f555b929911c533db2e465a1489a0)
-rw-r--r--chromium/base/containers/mru_cache.h4
-rw-r--r--chromium/services/tracing/public/cpp/BUILD.gn10
-rw-r--r--chromium/services/tracing/public/cpp/perfetto/interning_index.h2
-rw-r--r--chromium/services/tracing/public/cpp/perfetto/trace_event_data_source.cc6
-rw-r--r--chromium/services/tracing/public/cpp/trace_event_agent.cc7
5 files changed, 10 insertions, 19 deletions
diff --git a/chromium/base/containers/mru_cache.h b/chromium/base/containers/mru_cache.h
index 4a9f44e868e..8d88c8d5c93 100644
--- a/chromium/base/containers/mru_cache.h
+++ b/chromium/base/containers/mru_cache.h
@@ -81,6 +81,7 @@ class MRUCacheBase {
// example, maybe it has special work to do when something is evicted), it
// can pass NO_AUTO_EVICT to not restrict the cache size.
explicit MRUCacheBase(size_type max_size) : max_size_(max_size) {}
+ MRUCacheBase(MRUCacheBase&&) = default;
virtual ~MRUCacheBase() = default;
@@ -228,8 +229,9 @@ class MRUCache : public MRUCacheBase<KeyType, PayloadType, CompareType> {
public:
// See MRUCacheBase, noting the possibility of using NO_AUTO_EVICT.
- explicit MRUCache(typename ParentType::size_type max_size)
+ MRUCache(typename ParentType::size_type max_size)
: ParentType(max_size) {}
+ MRUCache(MRUCache&&) = default;
virtual ~MRUCache() = default;
private:
diff --git a/chromium/services/tracing/public/cpp/BUILD.gn b/chromium/services/tracing/public/cpp/BUILD.gn
index d9c1ad668ad..7abf5b8e290 100644
--- a/chromium/services/tracing/public/cpp/BUILD.gn
+++ b/chromium/services/tracing/public/cpp/BUILD.gn
@@ -33,7 +33,7 @@ if (!is_nacl && !is_ios) {
"base_agent.h",
"perfetto/dummy_producer.cc",
"perfetto/dummy_producer.h",
-# "perfetto/interning_index.h",
+ "perfetto/interning_index.h",
"perfetto/perfetto_config.cc",
"perfetto/perfetto_config.h",
"perfetto/perfetto_producer.cc",
@@ -54,10 +54,10 @@ if (!is_nacl && !is_ios) {
"perfetto/trace_event_data_source.h",
"perfetto/traced_value_proto_writer.cc",
"perfetto/traced_value_proto_writer.h",
-# "perfetto/track_event_thread_local_event_sink.cc",
-# "perfetto/track_event_thread_local_event_sink.h",
-# "stack_sampling/tracing_sampler_profiler.cc",
-# "stack_sampling/tracing_sampler_profiler.h",
+ "perfetto/track_event_thread_local_event_sink.cc",
+ "perfetto/track_event_thread_local_event_sink.h",
+ "stack_sampling/tracing_sampler_profiler.cc",
+ "stack_sampling/tracing_sampler_profiler.h",
"trace_event_agent.cc",
"trace_event_agent.h",
"trace_event_args_whitelist.cc",
diff --git a/chromium/services/tracing/public/cpp/perfetto/interning_index.h b/chromium/services/tracing/public/cpp/perfetto/interning_index.h
index c28edd6f7c1..525cdb61658 100644
--- a/chromium/services/tracing/public/cpp/perfetto/interning_index.h
+++ b/chromium/services/tracing/public/cpp/perfetto/interning_index.h
@@ -47,7 +47,7 @@ class COMPONENT_EXPORT(TRACING_CPP) InterningIndex {
// InterningIndex<char*, std::string> index(1000, 100);
template <typename... SizeType>
InterningIndex(SizeType... max_entry_counts)
- : entry_caches_(std::make_tuple<IndexCache<ValueTypes>...>(max_entry_counts...)) {}
+ : entry_caches_(max_entry_counts...) {}
// Returns the entry for the given interned |value|, adding it to the index if
// it didn't exist previously or was evicted from the index. Entries may be
diff --git a/chromium/services/tracing/public/cpp/perfetto/trace_event_data_source.cc b/chromium/services/tracing/public/cpp/perfetto/trace_event_data_source.cc
index 1cf6bcbc297..8afe51f82e8 100644
--- a/chromium/services/tracing/public/cpp/perfetto/trace_event_data_source.cc
+++ b/chromium/services/tracing/public/cpp/perfetto/trace_event_data_source.cc
@@ -522,14 +522,11 @@ void TraceEventDataSource::Flush(
}
void TraceEventDataSource::ClearIncrementalState() {
-#ifndef TOOLKIT_QT
TrackEventThreadLocalEventSink::ClearIncrementalState();
-#endif
}
ThreadLocalEventSink* TraceEventDataSource::CreateThreadLocalEventSink(
bool thread_will_flush) {
-#ifndef TOOLKIT_QT
// The call to CreateTraceWriter() below posts a task which is not allowed
// while holding |lock_|. Since we have to call it while holding |lock_|, we
// defer the task posting until after the lock is released.
@@ -555,9 +552,6 @@ ThreadLocalEventSink* TraceEventDataSource::CreateThreadLocalEventSink(
return new TrackEventThreadLocalEventSink(std::move(trace_writer), session_id,
disable_interning_,
privacy_filtering_enabled_);
-#else
- return nullptr;
-#endif
}
// static
diff --git a/chromium/services/tracing/public/cpp/trace_event_agent.cc b/chromium/services/tracing/public/cpp/trace_event_agent.cc
index 397381d3cc9..99aa2610ae5 100644
--- a/chromium/services/tracing/public/cpp/trace_event_agent.cc
+++ b/chromium/services/tracing/public/cpp/trace_event_agent.cc
@@ -20,13 +20,10 @@
#include "build/build_config.h"
#include "services/tracing/public/cpp/perfetto/perfetto_traced_process.h"
#include "services/tracing/public/cpp/perfetto/trace_event_data_source.h"
+#include "services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.h"
#include "services/tracing/public/cpp/trace_event_args_whitelist.h"
#include "services/tracing/public/cpp/tracing_features.h"
-#ifndef TOOLKIT_QT
-#include "services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.h"
-#endif
-
namespace {
const char kTraceEventLabel[] = "traceEvents";
@@ -62,9 +59,7 @@ TraceEventAgent::TraceEventAgent()
PerfettoTracedProcess::Get()->AddDataSource(
TraceEventDataSource::GetInstance());
-#ifndef TOOLKIT_QT
TracingSamplerProfiler::RegisterDataSource();
-#endif
}
TraceEventAgent::~TraceEventAgent() = default;