-
Notifications
You must be signed in to change notification settings - Fork 472
Generic live trace facility #1288
base: master
Are you sure you want to change the base?
Conversation
|
IMHO you could've used #include "debugger.hpp"
String_Quoted* s = new ...
debug_ast(s, "message: ");Output might be a bit crypric for some state details. |
|
Well the problem is that I am more interested in tracing lifecycle of certain objects - when they are created and used. From the example dump (It also includes output from sass/node-sass#1007): It seems that |
|
@saper Not sure how good you're knowledge is about the CRTP pattern libsass uses. The reason why |
|
Thanks. Will look it up. So now we can get rid of this pretty confusing constructs like ? |
|
@mgreter Ok, I read a little on CRTP and frankly I don't see it applied there .... we just use plain old polymorphism (with virtual tables) and run time type information, both with their overhead. Can you elaborate a bit? |
|
There is an |
|
Thanks! With CRTP we could actually get rid of dynamic cast, and break output.cpp into output methods for respective types... that would be awesome |
Set LIBSASS_TRACE to any value in the environment to watch a very verbose output live. Conflicts: Makefile Makefile.am src/debug.hpp src/util.cpp win/libsass.vcxproj
|
Mini-documentation: https://github.com/sass/libsass/wiki/Live-trace-facility |
This patch series introduces a live tracing facility
(enabled by setting LIBSASS_TRACE environment
variable to any value) which enables detailed verbose
logging via TRACE() and TRACEINST() macros.
This facility is used here to troubleshoot issue
with casting of String_Quoted/String_Contant types.