-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Support hiding specific stackframes from backtrace by marking on the original functions. #68336
Comments
@rustbot modify labels to +A-runtime +C-feature-request +T-lang |
@ehuss #58554 talks about removing some frames at the start and end of the backtrace. That's quite limited and error-prone to me. In the above example, i think it will be great if we filter out 0-3, 6, 8-10, 13-17, 19, 21-22. I agree that's #58554 is talking about solving exactly the same problem, but i don't really like that approach that issue is suggesting. |
@crlf0710 I don't understand why you would want to see anything above 12, it's all predictable panic machinery (which happens to be on the stack when the backtrace is produced, and I believe that's what #58554 is focusing on). There's also not much interesting below 12, either, in that case it's predictable (maybe |
@eddyb I'm not insisting on seeing any specific frame. In the above very simple example, i think it's very fine to omit most of the frames. Actually what i'm trying to say is that, we want to filter these out not because they're at the start and end of the frame, but they're actually implementation details of the rust runtime. Other people, when writing rust framework or runtime system, will likely want to hide their implementation details, too. People will not only want to hide implementation detail of "main" and "panic"(which correspond to the start of stack and end of stack), but also async runtime executors, iterator combinator forwardings, trait object shim functions, drop functions and so on. I am seeking for something more extensible than #58554 here, but it doesn't have to rush to be opened to surface users. |
Recently
#[track_caller]
usages has landed on nightly channel, which is really great! However i want to request a little more here. Currentlyoutput is:
However, of the 22 stack frames, only 3 or 4 is meaningful to user. It would be great if rest of the functions can be marked with a special attribute, and maybe marked somehow in the mangled symbol, then be excluded from the default display of backtrace.
The text was updated successfully, but these errors were encountered: