Skip to content
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

Improve decode block error logging #1353

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

MarkY-LunarG
Copy link
Contributor

When a decode block error occurs, indicate which frame and block are responsible. This should help at least diagnose if a block is at the begining or end of a trace.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 83942.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3498 running.

@bradgrantham-lunarg
Copy link
Contributor

This is a great addition!

What do you think about adding the "frame %lu, block %lu" to the end of the error messages? I'm not sure if Bob's scripts or any scripts in the wild expect to find these existing error messages by searching for "[gfxrecon] WARNING - Failed" or "[gfxrecon] WARNING - Missing". I also think you could omit the square brackets in that case; parsing out those frame numbers and block numbers should be pretty straightforward.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 83983.

@MarkY-LunarG MarkY-LunarG force-pushed the marky_improve_unrecog_message branch from 79d9d8f to 900aac0 Compare November 15, 2023 17:55
@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 84039.

@MarkY-LunarG
Copy link
Contributor Author

This is a great addition!

What do you think about adding the "frame %lu, block %lu" to the end of the error messages? I'm not sure if Bob's scripts or any scripts in the wild expect to find these existing error messages by searching for "[gfxrecon] WARNING - Failed" or "[gfxrecon] WARNING - Missing". I also think you could omit the square brackets in that case; parsing out those frame numbers and block numbers should be pretty straightforward.

I talked to Bob and he said his scripts will handle square brackets or parentheses or whatever. In fact, he would only look at this manually if an issue arose, he has no plans to automate a script on this. Although he says he could simply using regular expressions if he needed to. Therefore, I moved it to the end as you suggested and put them in parentheses instead. Additionally, I lower-cased "frame" and "block" based on his suggestion.

@MarkY-LunarG
Copy link
Contributor Author

Adding @lunarpapillo just so he can sit in and see his name being thrown around so Cavalierly.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3503 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3503 passed.

Copy link
Contributor

@andrew-lunarg andrew-lunarg left a comment

Choose a reason for hiding this comment

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

Late here but I don't think I'm confused. See the comments.
I really like the idea of the PR. I think we should have this!

framework/decode/file_processor.cpp Outdated Show resolved Hide resolved
framework/decode/file_processor.cpp Outdated Show resolved Hide resolved
framework/decode/file_processor.cpp Show resolved Hide resolved
When a decode block error occurs, indicate which frame and block
are responsible.  This should help at least diagnose if a block
is at the begining or end of a trace.
@MarkY-LunarG MarkY-LunarG force-pushed the marky_improve_unrecog_message branch from 900aac0 to 8bca77a Compare November 16, 2023 15:26
@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 84977.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3517 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3517 passed.

@andrew-lunarg
Copy link
Contributor

Oh cool, I didn't actually know about those format specifiers. They do exactly what we want (https://www.phind.com/search?cache=llnuuji1691dcyfheuxw3lvs, https://en.cppreference.com/w/cpp/header/cinttypes).

As long as nobody changes the types of these members later, the casts I suggested will never be needed.

@MarkY-LunarG MarkY-LunarG merged commit 491e85a into LunarG:dev Nov 16, 2023
5 checks passed
@MarkY-LunarG MarkY-LunarG deleted the marky_improve_unrecog_message branch November 16, 2023 20:48
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