Initial Perfetto Support in GAPIS#2696
Merged
pmuetschard merged 6 commits intogoogle:masterfrom Apr 4, 2019
Merged
Conversation
Member
pmuetschard
commented
Mar 28, 2019
- adds the Perfetto repository, build rules to build the config proto and trace processor along with its dependency sqlite.
- adds some of the scaffolding for taking a Perfetto trace in GAPIS (not yet exposed to the GAPIS API, though)
- adds support for opening a Perfetto trace in GAPIS via the API
- adds a GAPIS API to run queries against a Perfetto trace
155a4bd to
8a7fd03
Compare
AWoloszyn
reviewed
Mar 29, 2019
| bool parse_data(processor processor, const void* data, size_t size) { | ||
| ptp::TraceProcessor* p = static_cast<ptp::TraceProcessor*>(processor); | ||
| // TODO: do we need this copy? | ||
| std::unique_ptr<uint8_t[]> buf(new uint8_t[size]); |
Contributor
There was a problem hiding this comment.
Eww this is an ugly API.
virtual bool Parse(std::unique_ptr<uint8_t[]>, size_t) = 0;
You will need the copy unless we can allocate the data with new but I think this is meant to be exported to go, so the data is coming from "magic place"
AWoloszyn
reviewed
Mar 29, 2019
| } | ||
|
|
||
| func NewProcessor(ctx context.Context, data []byte) (*Processor, error) { | ||
| p := C.new_processor(60 * 1000 * 1000 * 1000) |
Contributor
There was a problem hiding this comment.
Can we name this magic constant?
AWoloszyn
reviewed
Mar 29, 2019
gapis/perfetto/trace.go
Outdated
| ) | ||
|
|
||
| const ( | ||
| perfettoTraceFile = "/data/misc/perfetto-traces/gapis-trace" |
Contributor
There was a problem hiding this comment.
Is this the path on the Android device where we are putting the trace?
AWoloszyn
reviewed
Mar 29, 2019
| message Events { | ||
| repeated Event list = 1; | ||
| } | ||
| // This needs to be binary compatible with perfetto.protos.RawQueryResult. |
Contributor
There was a problem hiding this comment.
Any way we can check this at build-time?
pau-baiget
approved these changes
Apr 1, 2019
c38f638 to
b8271e5
Compare
b8271e5 to
2eb3c57
Compare
2eb3c57 to
124fb7c
Compare
pmuetschard
added a commit
to pmuetschard/gapid
that referenced
this pull request
Apr 5, 2019
- drop the magic window size constant and simply use Perfetto's default. - Remove a TODO comment
pmuetschard
added a commit
to pmuetschard/gapid
that referenced
this pull request
Apr 5, 2019
- drop the magic window size constant and simply use Perfetto's default. - Remove a TODO comment
pmuetschard
added a commit
that referenced
this pull request
Apr 10, 2019
- drop the magic window size constant and simply use Perfetto's default. - Remove a TODO comment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.