Commit 03a1a3e4 authored by Florian Mayer's avatar Florian Mayer Committed by Commit Bot

Roll third_party/perfetto b73eba8.

This includes a rename perfetto::Service to perfetto::TracingService.
Do the corresponding changes in Chrome.

Bug: 74331089
Change-Id: I73bb3a15a66ad494a3796cdf9f5e4fd275d8c57d
Reviewed-on: https://chromium-review.googlesource.com/1107698
Commit-Queue: Florian Mayer <fmayer@google.com>
Commit-Queue: Primiano Tucci <primiano@chromium.org>
Reviewed-by: default avatarHector Dearman <hjd@chromium.org>
Reviewed-by: default avatarPrimiano Tucci <primiano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568823}
parent decb4754
......@@ -891,7 +891,7 @@ deps = {
},
'src/third_party/perfetto':
Var('android_git') + '/platform/external/perfetto.git' + '@' + '0ff6498e4181c3e3589e59fa68bcbb5ba85672f3',
Var('android_git') + '/platform/external/perfetto.git' + '@' + 'b73eba8005741e2b7bc061dd29bafe86cc0f4864',
'src/third_party/perl': {
'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + 'ac0d98b5cee6c024b0cffeb4f8f45b6fc5ccdb78',
......
......@@ -177,7 +177,7 @@ void OutputJSONFromTraceEventProto(
namespace tracing {
JSONTraceExporter::JSONTraceExporter(const std::string& config,
perfetto::Service* service)
perfetto::TracingService* service)
: config_(config) {
consumer_endpoint_ = service->ConnectConsumer(this);
}
......
......@@ -13,7 +13,7 @@
#include "base/macros.h"
#include "third_party/perfetto/include/perfetto/tracing/core/consumer.h"
#include "third_party/perfetto/include/perfetto/tracing/core/service.h"
#include "third_party/perfetto/include/perfetto/tracing/core/tracing_service.h"
namespace tracing {
......@@ -25,7 +25,8 @@ class JSONTraceExporter : public perfetto::Consumer {
public:
// The owner of JSONTraceExporter should make sure to destroy
// |service| before destroying this.
JSONTraceExporter(const std::string& config, perfetto::Service* service);
JSONTraceExporter(const std::string& config,
perfetto::TracingService* service);
~JSONTraceExporter() override;
......@@ -49,7 +50,8 @@ class JSONTraceExporter : public perfetto::Consumer {
std::string config_;
// Keep last to avoid edge-cases where its callbacks come in mid-destruction.
std::unique_ptr<perfetto::Service::ConsumerEndpoint> consumer_endpoint_;
std::unique_ptr<perfetto::TracingService::ConsumerEndpoint>
consumer_endpoint_;
DISALLOW_COPY_AND_ASSIGN(JSONTraceExporter);
};
......
......@@ -22,7 +22,7 @@
namespace tracing {
class MockService : public perfetto::Service {
class MockService : public perfetto::TracingService {
public:
explicit MockService(base::MessageLoop* message_loop);
......@@ -36,7 +36,7 @@ class MockService : public perfetto::Service {
return tracing_enabled_with_config_;
}
// perfetto::Service implementation.
// perfetto::TracingService implementation.
std::unique_ptr<ProducerEndpoint> ConnectProducer(
perfetto::Producer*,
uid_t uid,
......@@ -54,7 +54,7 @@ class MockService : public perfetto::Service {
std::string tracing_enabled_with_config_;
};
class MockConsumerEndpoint : public perfetto::Service::ConsumerEndpoint {
class MockConsumerEndpoint : public perfetto::TracingService::ConsumerEndpoint {
public:
explicit MockConsumerEndpoint(MockService* mock_service)
: mock_service_(mock_service) {
......@@ -100,8 +100,8 @@ void MockService::WaitForTracingDisabled() {
wait_for_tracing_disabled_.Run();
}
// perfetto::Service implementation.
std::unique_ptr<perfetto::Service::ProducerEndpoint>
// perfetto::TracingService implementation.
std::unique_ptr<perfetto::TracingService::ProducerEndpoint>
MockService::ConnectProducer(perfetto::Producer*,
uid_t uid,
const std::string& name,
......@@ -110,7 +110,7 @@ MockService::ConnectProducer(perfetto::Producer*,
return nullptr;
}
std::unique_ptr<perfetto::Service::ConsumerEndpoint>
std::unique_ptr<perfetto::TracingService::ConsumerEndpoint>
MockService::ConnectConsumer(perfetto::Consumer* consumer) {
message_loop_->task_runner()->PostTask(
FROM_HERE, base::BindOnce(&perfetto::Consumer::OnConnect,
......
......@@ -16,10 +16,10 @@
#include "third_party/perfetto/include/perfetto/tracing/core/commit_data_request.h"
#include "third_party/perfetto/include/perfetto/tracing/core/consumer.h"
#include "third_party/perfetto/include/perfetto/tracing/core/data_source_descriptor.h"
#include "third_party/perfetto/include/perfetto/tracing/core/service.h"
#include "third_party/perfetto/include/perfetto/tracing/core/trace_config.h"
#include "third_party/perfetto/include/perfetto/tracing/core/trace_packet.h"
#include "third_party/perfetto/include/perfetto/tracing/core/trace_writer.h"
#include "third_party/perfetto/include/perfetto/tracing/core/tracing_service.h"
#include "third_party/perfetto/protos/perfetto/common/commit_data_request.pb.h"
#include "third_party/perfetto/protos/perfetto/trace/test_event.pbzero.h"
#include "third_party/perfetto/protos/perfetto/trace/trace_packet.pb.h"
......@@ -170,7 +170,7 @@ class MockProducerClient : public ProducerClient {
class MockConsumer : public perfetto::Consumer {
public:
using PacketReceivedCallback = std::function<void(bool)>;
MockConsumer(perfetto::Service* service,
MockConsumer(perfetto::TracingService* service,
std::string data_source_name,
PacketReceivedCallback packet_received_callback)
: packet_received_callback_(packet_received_callback),
......@@ -218,7 +218,8 @@ class MockConsumer : public perfetto::Consumer {
}
private:
std::unique_ptr<perfetto::Service::ConsumerEndpoint> consumer_endpoint_;
std::unique_ptr<perfetto::TracingService::ConsumerEndpoint>
consumer_endpoint_;
size_t received_packets_ = 0;
PacketReceivedCallback packet_received_callback_;
std::string data_source_name_;
......@@ -260,7 +261,7 @@ class MockProducer : public ProducerHost {
}
void OnMessagepipesReadyCallback(
perfetto::Service* perfetto_service,
perfetto::TracingService* perfetto_service,
mojom::ProducerClientPtr producer_client_pipe,
mojom::ProducerHostRequest producer_host_pipe) {
Initialize(std::move(producer_client_pipe), std::move(producer_host_pipe),
......
......@@ -11,7 +11,7 @@
#include "services/tracing/perfetto/producer_host.h"
#include "services/tracing/public/cpp/perfetto/shared_memory.h"
#include "third_party/perfetto/include/perfetto/tracing/core/service.h"
#include "third_party/perfetto/include/perfetto/tracing/core/tracing_service.h"
namespace tracing {
......@@ -82,12 +82,12 @@ void PerfettoService::DestroyOnSequence(
void PerfettoService::CreateServiceOnSequence() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
service_ = perfetto::Service::CreateInstance(
service_ = perfetto::TracingService::CreateInstance(
std::make_unique<MojoSharedMemory::Factory>(), &perfetto_task_runner_);
DCHECK(service_);
}
perfetto::Service* PerfettoService::GetService() const {
perfetto::TracingService* PerfettoService::GetService() const {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
return service_.get();
}
......
......@@ -21,13 +21,13 @@ struct BindSourceInfo;
} // namespace service_manager
namespace perfetto {
class Service;
class TracingService;
} // namespace perfetto
namespace tracing {
// This class serves two purposes: It wraps the use of the system-wide
// perfetto::Service instance, and serves as the main Mojo interface for
// perfetto::TracingService instance, and serves as the main Mojo interface for
// connecting per-process ProducerClient with corresponding service-side
// ProducerHost.
class PerfettoService : public mojom::PerfettoService {
......@@ -46,7 +46,7 @@ class PerfettoService : public mojom::PerfettoService {
void ConnectToProducerHost(mojom::ProducerClientPtr producer_client,
mojom::ProducerHostRequest producer_host) override;
perfetto::Service* GetService() const;
perfetto::TracingService* GetService() const;
scoped_refptr<base::SequencedTaskRunner> task_runner() {
return perfetto_task_runner_.task_runner();
}
......@@ -57,7 +57,7 @@ class PerfettoService : public mojom::PerfettoService {
void CreateServiceOnSequence();
PerfettoTaskRunner perfetto_task_runner_;
std::unique_ptr<perfetto::Service> service_;
std::unique_ptr<perfetto::TracingService> service_;
mojo::BindingSet<mojom::PerfettoService, service_manager::Identity> bindings_;
SEQUENCE_CHECKER(sequence_checker_);
......
......@@ -18,7 +18,7 @@ ProducerHost::~ProducerHost() = default;
void ProducerHost::Initialize(mojom::ProducerClientPtr producer_client,
mojom::ProducerHostRequest producer_host,
perfetto::Service* service,
perfetto::TracingService* service,
const std::string& name) {
DCHECK(service);
DCHECK(!producer_endpoint_);
......
......@@ -18,7 +18,7 @@
#include "mojo/public/cpp/bindings/binding.h"
#include "third_party/perfetto/include/perfetto/tracing/core/producer.h"
#include "third_party/perfetto/include/perfetto/tracing/core/service.h"
#include "third_party/perfetto/include/perfetto/tracing/core/tracing_service.h"
namespace perfetto {
class CommitDataRequest;
......@@ -51,11 +51,11 @@ class ProducerHost : public tracing::mojom::ProducerHost,
// corresponding remote ProducerClient.
void Initialize(mojom::ProducerClientPtr producer_client,
mojom::ProducerHostRequest producer_host,
perfetto::Service* service,
perfetto::TracingService* service,
const std::string& name);
// perfetto::Producer implementation.
// Gets called by perfetto::Service to toggle specific data sources
// Gets called by perfetto::TracingService to toggle specific data sources
// when requested by a Perfetto Consumer.
void OnConnect() override;
void OnDisconnect() override;
......@@ -89,7 +89,8 @@ class ProducerHost : public tracing::mojom::ProducerHost,
protected:
// Perfetto guarantees that no OnXX callbacks are invoked on |this|
// immediately after |producer_endpoint_| is destroyed.
std::unique_ptr<perfetto::Service::ProducerEndpoint> producer_endpoint_;
std::unique_ptr<perfetto::TracingService::ProducerEndpoint>
producer_endpoint_;
DISALLOW_COPY_AND_ASSIGN(ProducerHost);
};
......
......@@ -16,7 +16,7 @@
#include "mojo/public/cpp/bindings/binding.h"
#include "services/tracing/public/cpp/perfetto/task_runner.h"
#include "services/tracing/public/mojom/perfetto_service.mojom.h"
#include "third_party/perfetto/include/perfetto/tracing/core/service.h"
#include "third_party/perfetto/include/perfetto/tracing/core/tracing_service.h"
namespace perfetto {
class SharedMemoryArbiter;
......@@ -39,7 +39,7 @@ class MojoSharedMemory;
// in ProducerClient::CreateDataSourceInstance.
class COMPONENT_EXPORT(TRACING_CPP) ProducerClient
: public mojom::ProducerClient,
public perfetto::Service::ProducerEndpoint {
public perfetto::TracingService::ProducerEndpoint {
public:
ProducerClient();
~ProducerClient() override;
......@@ -70,7 +70,7 @@ class COMPONENT_EXPORT(TRACING_CPP) ProducerClient
void Flush(uint64_t flush_request_id,
const std::vector<uint64_t>& data_source_ids) override;
// perfetto::Service::ProducerEndpoint implementation.
// perfetto::TracingService::ProducerEndpoint implementation.
// Used by the TraceWriters
// to signal Perfetto that shared memory chunks are ready
// for consumption.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment