You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When profiling Chapel code, it would be useful to be able to map generated symbol names back to the original Chapel code, without looking at the generated code.
The generated code for this code snippet with have foo_chpl, foo_chpl2, and foo_chpl3, but without looking at the generated code there is no way to know which is which. With the C backend, before each function name we print a comment with the original filename and line number (compiler/codegen/cg-symbol.cpp:2764), like
/*MySourceFile.chpl:7 */voidfoo_chpl3(....) {
This information is harder to glean from the LLVM backend, and furthermore its unfortunate to require looking at the generated code to get this information
It would be useful to provide a flag like --munge-with-locations (similar to --munge-with-ids), which would embed the filename and line number in the function name, e.g. foo_chpl_MySourceFile_1
The text was updated successfully, but these errors were encountered:
Some related things that you migth already be aware of:
the stacktrace support has some function name tables
--cpp-lines and -g
--munge-with-ids embeds dyno's IDs into symbol names (and only works with the LLVM backend). It would be relatively straightforward to make a helper tool to go from such a munged name to a source location.
Ideally, with the LLVM backend, we would be generating sufficiently good debug information for debuggers and other tooling. Perhaps that would be enough for your use cases as well.
When profiling Chapel code, it would be useful to be able to map generated symbol names back to the original Chapel code, without looking at the generated code.
For example,
The generated code for this code snippet with have
foo_chpl
,foo_chpl2
, andfoo_chpl3
, but without looking at the generated code there is no way to know which is which. With the C backend, before each function name we print a comment with the original filename and line number (compiler/codegen/cg-symbol.cpp:2764), likeThis information is harder to glean from the LLVM backend, and furthermore its unfortunate to require looking at the generated code to get this information
It would be useful to provide a flag like
--munge-with-locations
(similar to--munge-with-ids
), which would embed the filename and line number in the function name, e.g.foo_chpl_MySourceFile_1
The text was updated successfully, but these errors were encountered: