Restore original -fstack-usage format, add mangled name as field
The -fstack-usage option now includes the mangled function name in its output, minimizing backward compatibility breakage.
The -fstack-usage option’s output now includes the mangled function name as a second field, in addition to the filename and function name. This change aims to minimize backward compatibility breakage after recent modifications to the output format. Test cases and documentation have been updated to reflect this change.
In Details
The -fstack-usage option in GCC outputs stack usage information for each function. Recent changes altered the output format, potentially breaking existing tools that rely on it. This commit reverts the format to its original structure while adding the mangled name as a second field, balancing new information with compatibility. This affects toplev.cc where the output is generated.
For Context
The -fstack-usage option in GCC helps developers understand how much stack space each function in their program uses. This is useful for optimizing memory usage and preventing stack overflows. This commit modifies the output of -fstack-usage to include the internal function name (mangled name) used by the compiler, along with the original filename and function name. The goal is to provide more detailed information without breaking existing tools that parse the output.