On Fri, Jun 24, 2016 at 3:07 PM, Antti Kantee <[email protected]> wrote: > > We should come up with a recipe for profiling. However, the class of cases > that your problem falls under, at least from what I can guess from your > mail, is easiest to debug with gdb. Just single-step the instance and you > should be able to find what it's looping around before hitting main. Note: > don't use kvm when single-stepping, in my experience it doesn't work very > well. >
I guess so yes, although I'd be tempted to have some quick poc work for the tracing. In the past I have built custom binary logging format for personal projects only to realize that being non-standard is not so much fun. For short term a custom solution can give the kick of an ultra compact solution but I found going to the Common Trace Format (CTF - http://diamon.org/ctf/) was a good approach later. There is an interesting project which auto-generates c99 code based on configuration file (barectf - https://github.com/efficios/barectf) and worth looking at. I did use it but mainly for some private fun projects and even added custom backend (one of them being writing to socket instead of memory or disk) very easily. The idea of reusing already available CTF tools does make the move justifiable. Although Erlang 19.0 adds a lot of cool features, but there are no immediate takers so looking at tracing interests me more and I am game for a proof of concept with the above mentioned approach or any other better alternatives. -Neeraj
