-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial Perfetto Support in GAPIS #2696
Conversation
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
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]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"
} | ||
|
||
func NewProcessor(ctx context.Context, data []byte) (*Processor, error) { | ||
p := C.new_processor(60 * 1000 * 1000 * 1000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we name this magic constant?
gapis/perfetto/trace.go
Outdated
) | ||
|
||
const ( | ||
perfettoTraceFile = "/data/misc/perfetto-traces/gapis-trace" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the path on the Android device where we are putting the trace?
@@ -68,6 +68,30 @@ message Devices { | |||
message Events { | |||
repeated Event list = 1; | |||
} | |||
// This needs to be binary compatible with perfetto.protos.RawQueryResult. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any way we can check this at build-time?
c38f638
to
b8271e5
Compare
b8271e5
to
2eb3c57
Compare
2eb3c57
to
124fb7c
Compare
- drop the magic window size constant and simply use Perfetto's default. - Remove a TODO comment
- drop the magic window size constant and simply use Perfetto's default. - Remove a TODO comment
- drop the magic window size constant and simply use Perfetto's default. - Remove a TODO comment