Skip to content

Conversation

@hysw
Copy link
Contributor

@hysw hysw commented Aug 24, 2018

No description provided.

@hysw
Copy link
Contributor Author

hysw commented Aug 24, 2018

I can't see any build results, local linux build seems to be fine.

return log.Errf(ctx, nil, "Unknown device %v", pDevice.ID.ID())
}

// executeCounter.Increment()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented out code

for (int i = 1; i < argc; i++) {
if (strcmp(argv[i], "--auth-token-file") == 0) {
if (strcmp(argv[i], "--replay-archive") == 0) {
replayArchive = argv[++i];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (i + 1 >= argc) {
GAPID_FATAL(....
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I think 'using archive' and 'connecting to gapis' are mutual exclusive, using both at the same time might be invalid (at least for this CL, and same to options like: port, idle-timeout-sec), so probably we should document this somewhere.


namespace gapir {

std::unique_ptr<ReplayArchive::Payload> ReplayArchive::getPayload() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReplayConnection::Payload? Not sure which one is better.

core::Debugger::waitForAttach();
}

if (replayArchive) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that we have a big mode-switch at the start of the replay, I would split this out into 2 methods. One that starts an "archived replay" and one that opens a connection.

It is a bit weird to have a "start the program in an entirely different way" early-out in the middle of main().

return nullptr;
}
bool ReplayArchive::sendReplayFinished() { return true; }
bool ReplayArchive::sendCrashDump(const std::string& filepath,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be writing out the crash dump here. (And logging it's location).

uint32_t api_index, uint64_t label,
const std::string& msg, const void* data,
uint32_t data_size) {
return true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should log any notifications that we got here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GAPIR already write those to log.

return C.archive_create(cstr)
}

// Dispose flush and close the underlying archive.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flushes and closes


// ExportReplayRequest returns request type for standalone replay.
func (a API) ExportReplayRequest() replay.Request {
return issuesRequest{}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We really should have a new type of request, instead of using issuesRequest, eventually. And using issuesRequest won't have any framebuffer data postback, so can be hard to tell if the replay is correct or not.

@AWoloszyn
Copy link
Contributor

Build failure is a flake, merging.

@AWoloszyn AWoloszyn merged commit 5400804 into google:master Aug 31, 2018
Intent{pDevice, pCapture},
Config(&struct{}{}),
[]RequestAndResult{{
Request: Request(generator.(interface{ ExportReplayRequest() Request }).ExportReplayRequest()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of (ab)using the requests, could we not just add a ForExport bool field to the Intent struct? That way it is clearly documented, and not using magic interfaces.

@hysw hysw deleted the export-replay branch October 9, 2018 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants