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
cfi annotations are enabled even without -g #5681
Comments
Comment author: @lefessan Do you mean in the "Changes" file ? I can only find the line:
that is the name of a bug report, but does not say that .cfi directives are only generated with -g. The goal of r12665 was to allow CFI directives even without -g, so that the code can be correctly profiled (-g would disactivate some optimizations, so the profiled code would not be the production code). Do you think it is a bad decision ? (it might, I have read somewhere that CFI directives can generate additional instructions, I should search for that again) |
Comment author: @lefessan Maybe we should use ".cfi_startproc simple" instead of just ".cfi_startproc". |
Comment author: @ygrek Yes, in Changes, see :
|
Comment author: @lefessan Ok, I changed the Changes file. CFI annotations (.cfi_startproc/.cfi_endproc) are always generated (to get the correct names of functions in the backtrace, i.e. enough for basic profiling), but .line/.loc directives are still only generated if -g is provided (more important for debugging). Actually, I partially disagree with Xavier on PR 0005426, -g should influence code generation (register coalescing should be turned off, and other optimizations in simplif too), so that we can at some point implement more debugging support on assembly code. Currently, there is no way to recover the values of the arguments from inside a function call, if the registers have been used for partial results... |
Comment author: @damiendoligez The Changes file was updated in 4.00 (commits 12703 and 12704). |
Original bug ID: 5681
Reporter: @ygrek
Assigned to: @lefessan
Status: closed (set by @damiendoligez on 2012-07-18T15:20:38Z)
Resolution: fixed
Priority: normal
Severity: trivial
Target version: 4.00.0+dev
Category: documentation
Bug description
I do not think this is the problem per se, but changelog says that cfi and debug info are enabled in ocamlopt -g only. This is not true since r12665.
The text was updated successfully, but these errors were encountered: