0

arc: Add GFX info into metrics IPC.

This adds interface to request new metrics
Example of usage: crrev.com/c/2426728
Payload implementation: ag/12668933

BUG=b:169211158
TEST=Locally in prototype

Change-Id: If89cb8ba6e136ac0e1bb7f60b3e078b8624b3639
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2424587
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Yury Khmel <khmel@google.com>
Auto-Submit: Yury Khmel <khmel@google.com>
Cr-Commit-Position: refs/heads/master@{#810356}
This commit is contained in:
Yury Khmel
2020-09-24 23:51:19 +00:00
committed by Commit Bot
parent f8310907ad
commit 951f12080c

@ -1,7 +1,7 @@
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Next MinVersion: 5
// Next MinVersion: 6
module arc.mojom;
@ -39,6 +39,17 @@ struct BootProgressEvent {
int64 uptimeMillis;
};
// Describes a GFX metrics.
struct GfxMetrics {
// Total frames rendered, it includes janky frames below.
uint64 framesTotal;
// Janky frames.
uint64 framesJanky;
// Maximum frame time in milliseconds of 95% of frames sorted from the
// shortest to longest.
uint32 frameTimePercentile95;
};
[Extensible]
enum NativeBridgeType {
// Native bridge is not used.
@ -105,11 +116,15 @@ interface MetricsHost {
[MinVersion=4] ReportCompanionLibApiUsage@2(CompanionLibApiId api_id);
};
// Next method ID: 2
// Next method ID: 3
interface MetricsInstance {
// DEPRECATED: Please use Init@1 instead.
InitDeprecated@0(pending_remote<MetricsHost> host_remote);
// Establishes full-duplex communication with the host.
[MinVersion=2] Init@1(pending_remote<MetricsHost> host_remote) => ();
// Requests GFX metrics for the specified package. In case of error, null is
// returned.
[MinVersion=5] GetGfxMetrics@2(string packageName) => (GfxMetrics? metrics);
};