-
Notifications
You must be signed in to change notification settings - Fork 634
tp: only allow missing clocks when full sort is enabled #3778
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
base: main
Are you sure you want to change the base?
Conversation
This allows us to continue to generate errors for missing timestamps in the default case shen partial sorting is used and defer the errors until EOF when full sorting is used. Also don't flush and force event extraction before EOF as that prevents deferred packages from being processed.
|
Nope sorry this change is definitely not the right fix. please tell me the problem not provide a solution :) |
|
The reaosn for the above: Perfetto supports lots of other trace types, this will break many of them. It will also likely break many sub-category of proto traces as well |
🎨 Perfetto UI Build✅ UI build is ready: https://storage.googleapis.com/perfetto-ci-artifacts/gh-19556771571-ui/ui/index.html |
|
@LalitMaganti with improved support for full sort I think limiting eof deferred packets makes sense but there's other parts of this that I'm less sure about. e.g. I need to replace the |
|
The whole eof deferred packets was not fully implemented and should just be removed from the codebase. It was only done partially and has a bunch of edge cases. I would really want to just pull that out. |
|
Being able to resolve clocks late is critical for our simulator workloads and we'd have to look elsewhere if perfetto can't support that. Seems like it's close to supporting it but maybe that's just us not understanding some details? Maybe there's some alternative approach we could take to solve this problem instead of abusing the existing clock system? |
|
Can you explain more on your problem? Why do you "need to resolve clocks late"? The more I understand, the better I can come up with some solution. I'm not opposed to supporting your usecase but I need to understand it better. This fix is not in the right direction. One potential fix is to have a field in the TracePacket which tells us "this sequence requires late clock resolution" which means Perfetto can know to not do windowed sort (i.e. it will fall back to full sorting always). |
sorry, I should have linked to the original issue: #1000 originally we released deferred packets when clock snapshots came in and that allowed them to be released as needed instead of at eof and that avoided all the changes in this PR. maybe we can go back to that? |
Ahhhhh I remember this now. So you were the one who added the original code! right sorry I didn't put that together I thought it was someone else 😓 I started looking into separating flushes into multiple stages as I suggested in https://android-review.git.corp.google.com/c/platform/external/perfetto/+/3505773 but I thought it wasn't worth because it wasn't followed up on. I can resurrect that work if necessary. I also really think is that we allow marking events as "processed late" though which will turn on a speical mode of processing where we defer packets for processing. |
|
Yes, sorry for not following up on this until now. It's been less urgent for us as we've been using this patch internally without any issues since. I can continue the work on "separating flushes into multiple stages" if you think that's a decent approach? I'm not against marking packets as "processed late" but the flushing issue would still have to be resolved, right? Or are you thinking we we have another event to indicate that "processed late" packets can be processed? |
Yes that would be ideal.
I think the idea would be that these packets which are "processed late" would not be pushed through the queue until NotifyEndOfFile. |
This allows us to continue to generate errors for missing timestamps in the default case shen partial sorting is used and defer the errors until EOF when full sorting is used.
Also don't flush and force event extraction before EOF as that prevents deferred packages from being processed.