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

P0881 A Proposal to add stacktrace library #119

Closed
jensmaurer opened this issue Jan 26, 2019 · 17 comments · Fixed by cplusplus/draft#4375
Closed

P0881 A Proposal to add stacktrace library #119

jensmaurer opened this issue Jan 26, 2019 · 17 comments · Fixed by cplusplus/draft#4375

Comments

@jensmaurer
Copy link
Member

@jensmaurer jensmaurer commented Jan 26, 2019

P0881R3 A Proposal to add stacktrace library (Alexey Gorgurov, Antony Polukhin)

https://issues.isocpp.org/show_bug.cgi?id=423

@jensmaurer jensmaurer added this to the 2019-02 milestone Jan 26, 2019
@jensmaurer jensmaurer added this to Approved for plenary vote in CWG Jan 26, 2019
@jensmaurer jensmaurer moved this from Approved for plenary vote to Ready for review in CWG Jan 26, 2019
@jensmaurer jensmaurer added this to Wednesday in LWG in Kona 2019 Feb 5, 2019
@jensmaurer jensmaurer moved this from Ready for review to Discussing in CWG Feb 19, 2019
@jensmaurer jensmaurer moved this from Discussing to Awaiting updated wording in CWG Feb 19, 2019
@jensmaurer
Copy link
Member Author

@jensmaurer jensmaurer commented Feb 19, 2019

CWG in Kona: Defer to LEWG with the following concerns (consensus in CWG):

  • Rename stack_frame to invocation_info. (A stack frame would also contain the values of the local variables.)
  • Divorce the specification of all invocation_info member functions from the address function, and define a native_handle instead of address (cf. std::thread).
  • LEWG should consider the difference between physical and logical invocation records (the latter containing inlined calls, such information possibly obtained from debug info). Consider extending the API to allow to expand physical records to logical records? Was LEWG even aware of the issue when designing the interface?
  • Weak feeling: basic_stack_trace might be the wrong name, since stack_frame is the wrong name. Both mention "stack". "stack_trace" does not have strong opposition (as a name) in CWG, but a different / better one would be preferred.
  • LEWG should consider making the query functions non-member functions, because they are expensive (similar to the filesystem library, where expensive functions are non-members).

@jensmaurer jensmaurer closed this Feb 19, 2019
@jensmaurer jensmaurer reopened this Feb 19, 2019
@tituswinters
Copy link
Collaborator

@tituswinters tituswinters commented Feb 23, 2019

LEWG in Kona:

Rename stacktrace to backtrace or back_trace.

Naming for stacktrace:
10 stacktrace
8 backtrace
1 back_trace
1 stack_trace
5 traceback
3 call_stack
4 call_trace
1 call_history

stacktrace vs. backtrace
SS S N B SB
1 4 2 3 3

Naming for stack_frame
2 stack_frame
3 invocation_info
9 stacktrace::entry
3 stacktrace::frame
5 stacktrace_entry
1 stacktrace_frame
2 frame_descriptor
4 call_info
2 call_descriptor
2 frame_info

Prefer stacktraceentry (or backtraceentry).
Nest the stack_frame class inside stacktrace (instead of as a class in std).
SF F N A SA
4 3 1 3 1
(Not consensus, status quo is against, either is OK to get it through CWG).

Leave the expensive operations as member functions.
Unanimous consent

We are OK with the fact that N physical entries can become N+X logical entries after decoding (because of expanding inline functions).
Unanimous consent

Forward back to CWG for C++20.
Unanimous consent

@jensmaurer
Copy link
Member Author

@jensmaurer jensmaurer commented Feb 26, 2019

@tituswinters: "We are OK with the fact that N physical entries can become N+X logical entries after decoding": The API as presented doesn't seem to allow that.

@apolukhin
Copy link

@apolukhin apolukhin commented Feb 27, 2019

@tituswinters: "We are OK with the fact that N physical entries can become N+X logical entries after decoding": The API as presented doesn't seem to allow that.

The API has to_string(const stacktrace&) function that does the decoding. It may output N+X lines, while the stacktrace has size() == N. Added a note to wording to describe that behavior.

@wg21bot
Copy link
Collaborator

@wg21bot wg21bot commented Mar 20, 2019

P0881R4 A Proposal to add stacktrace library (Alexey Gorgurov, Antony Polukhin)

@wg21bot wg21bot removed this from the 2019-02 milestone Mar 20, 2019
@wg21bot wg21bot added this to the 2019-07 milestone Mar 20, 2019
@jensmaurer jensmaurer moved this from Awaiting updated wording to Ready for review in CWG Mar 25, 2019
@wg21bot
Copy link
Collaborator

@wg21bot wg21bot commented Jun 23, 2019

P0881R5 A Proposal to add stacktrace library (Antony Polukhin, Antony Polukhin)

@mclow mclow added the C++20 label Jul 8, 2019
@jensmaurer jensmaurer moved this from Ready for review to Discussing in CWG Jul 15, 2019
@jensmaurer jensmaurer moved this from Discussing to Approved for plenary vote in CWG Jul 15, 2019
@jensmaurer jensmaurer removed this from the 2019-07 milestone Aug 23, 2019
@jensmaurer jensmaurer added this to the 2019-11 milestone Aug 23, 2019
@mclow mclow removed the C++20 label Nov 3, 2019
@mclow
Copy link

@mclow mclow commented Nov 3, 2019

This was not adopted for C++20. Removing the "C++20" label.

@jensmaurer jensmaurer added IS and removed C++23 labels Feb 18, 2020
@JeffGarland
Copy link
Member

@JeffGarland JeffGarland commented Mar 25, 2020

@jensmaurer is the core label still relevant here? My understanding is that we are down to lwg now?

@jensmaurer
Copy link
Member Author

@jensmaurer jensmaurer commented Mar 25, 2020

@JeffGarland: Correct, CWG is done with it. Is LWG going to move it? Otherwise, we should keep the CWG label.

@JeffGarland
Copy link
Member

@JeffGarland JeffGarland commented Mar 25, 2020

I can't say when, but trying to triage our queue and presumed this would be on it since it dropped due to time. I thought normally when CWG was done that tag gets removed, so didn't want to put it on our list if CWG was still doing something. Thanks.

@jensmaurer jensmaurer removed this from the 2020-02 milestone Jul 6, 2020
@jensmaurer jensmaurer added this to the 2020-telecon milestone Jul 6, 2020
@wg21bot
Copy link
Collaborator

@wg21bot wg21bot commented Aug 23, 2020

P0881R6 A Proposal to add stacktrace library (Antony Polukhin, Alexey Gorgurov)

@JeffGarland
Copy link
Member

@JeffGarland JeffGarland commented Aug 29, 2020

Catching up the status here -- LWG did an initial review of this which has lead to the R6 updates.

https://wiki.edg.com/bin/view/Wg21summer2020/P0881R5:Stack_trace

@JeffGarland
Copy link
Member

@JeffGarland JeffGarland commented Sep 16, 2020

LWG has completed further reviews on 9/04

https://wiki.edg.com/bin/view/Wg21summer2020/Telecon-20200904

and a final review on 9/11
https://wiki.edg.com/bin/view/Wg21summer2020/Telecon-20200911

--> with a vote to move into c++23 working paper

Everybody in favor of moving P0881R7 into the C++23 working paper

Favor Oppose Neutral
10 0 1

@wg21bot
Copy link
Collaborator

@wg21bot wg21bot commented Sep 23, 2020

P0881R7 A Proposal to add stacktrace library (Antony Polukhin, Alexey Gorgurov)

@wg21bot
Copy link
Collaborator

@wg21bot wg21bot commented Oct 26, 2021

Adopted 2020-11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Linked pull requests

Successfully merging a pull request may close this issue.

10 participants