Skip to content

Commit

Permalink
services/tracing: Implement new UpdateDataSource producer method
Browse files Browse the repository at this point in the history
Implement the UpdateDataSource producer port method which was recently
added to Perfetto and roll Perfetto to a matching revision. This method
isn't currently used in Chrome, so the implementation is a no-op.

Cq-Include-Trybots: luci.chromium.try:linux-perfetto-rel
Change-Id: I0c8090928975cd1f6d1c2225c6d0e89721e0ee37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3263056
Commit-Queue: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Primiano Tucci <primiano@chromium.org>
Auto-Submit: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Cr-Commit-Position: refs/heads/main@{#938590}
  • Loading branch information
skyostil authored and Chromium LUCI CQ committed Nov 4, 2021
1 parent 86cb9d3 commit 38a7ae6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,7 @@ deps = {
},

'src/third_party/perfetto':
Var('android_git') + '/platform/external/perfetto.git' + '@' + 'a24d98f3d80a064bced287eca8431202cff9d3a9',
Var('android_git') + '/platform/external/perfetto.git' + '@' + 'cf8cab259a859ecbbeb235a4e90a30803cc13b6a',

'src/third_party/perl': {
'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '6f3e5028eb65d0b4c5fdd792106ac4c84eee1eb3',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ class ProducerEndpoint : public perfetto::ProducerEndpoint,
producer_host_->RegisterDataSource(descriptor);
}

void UpdateDataSource(
const perfetto::DataSourceDescriptor& descriptor) override {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
NOTREACHED();
}

void UnregisterDataSource(const std::string& name) override {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
// TODO(skyostil): Implement data source unregistering. Data sources are
Expand Down
4 changes: 4 additions & 0 deletions services/tracing/public/cpp/perfetto/producer_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,10 @@ void ProducerClient::RegisterDataSource(const perfetto::DataSourceDescriptor&) {
NOTREACHED();
}

void ProducerClient::UpdateDataSource(const perfetto::DataSourceDescriptor&) {
NOTREACHED();
}

void ProducerClient::UnregisterDataSource(const std::string& name) {
NOTREACHED();
}
Expand Down
1 change: 1 addition & 0 deletions services/tracing/public/cpp/perfetto/producer_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ class COMPONENT_EXPORT(TRACING_CPP) ProducerClient
perfetto::SharedMemory* shared_memory() const override;
void NotifyFlushComplete(perfetto::FlushRequestID) override;
void RegisterDataSource(const perfetto::DataSourceDescriptor&) override;
void UpdateDataSource(const perfetto::DataSourceDescriptor&) override;
void UnregisterDataSource(const std::string& name) override;
void NotifyDataSourceStopped(perfetto::DataSourceInstanceID) override;
void NotifyDataSourceStarted(perfetto::DataSourceInstanceID) override;
Expand Down

0 comments on commit 38a7ae6

Please sign in to comment.