-
Notifications
You must be signed in to change notification settings - Fork 256
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
Disable branches #518
Disable branches #518
Conversation
LGTM in general. What do you think about the idea to have the jumps in a separate "column"? If you don't want to follow that route, then I think it would be useful to (additionally?) have a toggle to be able to switch this directly on the disassembly page to re-read with visualization and update. |
The more I think about it, the better it sounds. In the current version I completely reload the model which will reset the view if I would add a checkbox to toggle this feature. I originally didn't want to go that route since it involves a lot of dark magic (regexes) but it seems to be the better solution in the long run. |
41bda57
to
b2494e1
Compare
The current resulting AppImage is much faster, instead of 24 seconds it only needs 8-9 seconds for opening. Disabling the branch column "on demand" works fine. Note: the visible columns are not saved, if you disable it, then go back to the callee view, then use Disassemble on the same function the column is enabled again; same if the setting is of and the column is manually enabled. |
Just to recheck as it wasn't obvious from inspecting only the changes: is the new branches column "monospace text" only, or is it "syntax-highlighted", too? I think it may also work with non-monospace (then looking better and saving space - but I'm not sure...) |
Interesting seem like qt has a problem with layouting if there are a lots of whitespaces
I see this as an on demand feature for quick stuff. It is only saved, if you change it in the settings.
it is monospace only |
b2494e1
to
cb8083e
Compare
Can you give it a short try to see how it looks with the default font? If that looks better (or at least not worse and saves space), then this would be possibly a reasonable switch. |
That is way too long. It should only take a few milliseconds. I will ask some KDE People about this, since they wrote their own Layout Engine which they use in Kate. Kate can layout 2 million lines in like 10ms. |
cb8083e
to
356119e
Compare
Thank you. Note that these functions are quite huge, so I wouldn't blame it all to the syntax-highlighting / layouting... but then the layouting seems to be an issue, let's go on with this at #505. |
692e5b7
to
1e74256
Compare
c2a4a84
to
e7c1411
Compare
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.
With the new logic of keeping the branches in a separate column, I think we could simplify the split.
Reasoning (please recheck if that's correct):
- we have one big disassembly from objdump
- at least currently the start of the assembly is always at the same line position (that would change if we have colored input because of terminal sequences)
In this case we can check the start of the assembly exactly one time on the first line of the assembly, then use that offset for each record.
That would drop the distance-call from each line, calculating it only once. preferably outside.
e7c1411
to
1999318
Compare
I will have a look at coloured output soonish, so I would keep it as is. Especially since it is a cheap calculation. |
This is now much better than before, I hope this gets pulled in and afterwards we may get a finished #494 (looks like 98% done) pulled in, too. Thank you for the work on this! |
Note that escape sequences would again match the hex-check :-) |
This will still take some time. We want to move the logic to the |
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.
I'm fine with this as an incremental step, but I dislike that toggling the visibility of the branch column directly is detached from the settings - can you please synchronize that to make it more obvious?
furthermore, I'm surprised to see that this patch has no test changes. That means this feature is currently completely untested? Can you please work on adding test coverage @lievenhey ?
If you prefer, you can merge this right away and work on both of the above in separate merge requests.
Thanks!
I will add a test and then merge this |
a6dd6ba
to
5eb7a57
Compare
I originaly named these seetings source path settings since they only influenced the source code search path so it didn't feel right to call them disassembly settings. But since this patch series introduces an option to turn of branches it now feels right to correct the name
If only one event was recorded it points to end. In this case end->time will be access which is undefined behavior
Since the introduction of the stack in the disasembler there is no longer a need to call showDisassembly since it will be called whenever the stack changes.
5eb7a57
to
b68e608
Compare
99d0f1a
to
825d48b
Compare
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.
I'll fix the small nits myself now
sometimes there are too many branches, this patch allows the user to disable them fixes: #516
Skip whole test if it isn't found
Prefer VERIFY_OR_THROW to ensure the checks are also done in release builds without assertions enabled.
825d48b
to
78f0642
Compare
No description provided.