Closed Pratyush closed 4 years ago
This doesn't actually work because the track_caller
only returns the location of one location in the call stack, and does not return the path in the namespace tree. TO fix this, I moved to a tracing
-based profiling infrastructure in #270 .
In the new refactor of the
ConstraintSystem
API, one doesn't have to thread&mut cs.ns(|| "new namespace")
everywhere. While this enables lots of improvements, such as overloading arithmetic operators for field and group variables, the lack of meaningful human annotated names does cause a regression in diagnostics, debugging, and profiling.The current approach would be to do manual annotations using the
cs.ns()
API, and this provides some high level information, but for most profiling/debugging use cases, but this doesn't suffice. A better way would be automatically annotate the relevant namespaces with file, line number and column information using theLocation
API in combination with#[track_caller]