258 points · by curtis · 10y ago · 103 comments
Does anyone knows of similar tools for Python and in-browser Javascript?
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/We...
https://bugzilla.mozilla.org/show_bug.cgi?id=1207696
It looks like Microsoft is implementing a similar time-travel feature in Chakra:
https://github.com/Microsoft/ChakraCore/commits/TimeTravelDe...
Basically it's an extension of pdb that allows you to jump back and forth in time.
It's an interesting different approach because it allows you to rewind the entire machine, so you can interact with interactions between different processes, etc (happy to answer questions, I am a dev on it)
[1] http://caml.inria.fr/pub/docs/manual-ocaml/debugger.html
The feature here is more like software emulation, and it will really allow you to take the instruction pointer in reverse direction. Unlike TimeMachine which records in real time and let's you browse the recorded data as you wish, but after execution has occurred.
The ICE would be connected to a bonded out version of the 8051 and I was almost able to capture every single clock cycle of 8051's execution. When I hit a failure, I would just replay the trace and see what went wrong.
It looks like the folks on the big machines have caught up :-)
That HMI was a brilliant machine.
It's really the last debug tool I ever used besides AVR, PIC and one ARM JTAG for doing BSP work.
This is fixable, however, and on my agenda.
I often do my initial runs under rr, just in case I might want to debug, because it's useful most of the time and it's not enough overhead to worry about.
gdb's reverse debugging works after you narrow the range of interest down to a very small region, because otherwise its buffer will repeatedly overflow and it'll take ages.
> One of Mozilla's most senior engineers who has worked on Mozilla projects as a contributor and employee for well over a decade particularly working in the graphics code and helping make native audio and video in the browser a reality.
http://www.reddit.com/r/firefox/comments/48ix55/robert_ocall...
"Why?"
I suppose it's nice to know that he is a big deal but as someone who doesn't follow mozilla religiously a little more background is always appreciated.
So no, he is not leaving for "rest and relaxation"
I wish him the best of luck. rr is really awesome and deserves even more attention.
> we probably need to capture some of the value of this technology via a for-profit company
I hope this doesn't mean making it proprietary. I mean obviously a person gets to decide how to best compensate themselves for the fruits of their labor. But I've seen too many compelling technologies fail to achieve the impact they could have because they were proprietary.
I mean, DTrace languishes despite being open-source, because it wasn't open-source enough
You can definitely be a for-profit company AND work in the open.
This is a technology that received an innovation award from the Wall Street Journal in 2006. Whatever impact DTrace is having today, it should have been much larger.
DTrace is used extensively in FreeBSD development these days.
It's being used to bring up new generations of Systems Programmers: http://teachbsd.org/
My team uses DTrace to develop TCP, which ensures open standards and a copyfree implementation that ends up in Apple products, Juniper, NetApp, and who knows where else. Of course, also Netflix and the large CDN I work for which run at least 1/3 of North American Internet volume.
We also use DTrace to fix the reference copyfree Intel drivers, which may in a small way pay back Illumos for the awesome tech they share. I think those end up in some popular embedded microkernels too.
I grin thinking about people that emphasize "GNU/Linux", but I will empathize with FSF for a moment to show that low level software is not particularly exciting to most. GCC and GDB are hugely influential tools for the whole open source ecosystem, especially the high growth during the 80s and 90s that led to "Enterprise" acceptance. It's hard to imagine where everyone else would be, including the BSDs and many chip companies, were it not for the GNU toolchain. Nonetheless, most people just begrudgingly use these and hope they don't give them any trouble because of course they are usually trying to do something else.
For example, at $job recently found that some of our Python code was doing 25k open64 calls but only 5k close calls during a scheduled job - this led us to find/fix a bug that would have been a disaster later.
It never has really managed to catch on as a standalone tool by itself, though. Part of that's the licensing situation on Linux, but I'd hypothesize that part of it is also that it's a pretty complicated tool to use, interpret, and act on-- you don't hear a lot about SystemTap (same concept, GPLed for Linux-friendliness) these days, either.
Then you haven't been looking:
http://dtrace.org/blogs/brendan/2012/08/09/10-performance-wi...
http://dtrace.org/blogs/brendan/2014/02/11/another-10-perfor...
https://www.joyent.com/blog/node-js-in-production-runtime-lo...
https://twitter.com/b0rk/status/681536144362848257
https://speakerdeck.com/sartak/dtrace-war-stories
https://www.bignerdranch.com/blog/hooked-on-dtrace-part-1/
https://medium.com/@jlouis666/erlang-dirty-scheduler-overhea...
Seriously, it wasn't that hard to find this stuff. I found the last one by searching HN: https://hn.algolia.com/?q=dtrace
Like others who replied to you, I use DTrace every day. Very often, it solves in seconds what would have taken hours without it. Frequently, it's helped solve problems I'd never have been able to understand without it. My colleagues use it all the time as well. Sometimes, I write about the general techniques (I wrote the "runtime log snooping" blog post above), and most of our bug reports in recent years are public, but we don't write about individual bugs all that often. (Seems like you wouldn't have run into them if we had, though.)
Does rr make reverse debugging much easier than it's previously been in gdb or something? :)
The second part of a magic trick is to connect it to your audience. Making time-travel style debugging is... not easy, but possible. Making it relevant to people, across languages and other conceptual domains, is hard.
If your next work is tackling this, good luck and godspeed :)
Why?
[0] https://www.propublica.org/article/the-worlds-email-encrypti...
[1] http://arstechnica.com/information-technology/2014/04/tech-g...
And now there's rr. People think it's amazing, and it is, but we're only scratching the surface of what could be done. I'm bursting with ideas, and realizing them will require a lot of resources, resources that Mozilla cannot and should not provide --- we probably need to capture some of the value of this technology via a for-profit company. We can change the way people debug software, and in its own way that may be as important as my Web platform work, and it's work I desperately want to do.