Jed, About marionnette... There is something wrong deep inside its transport layer. It has been originally using Devtools protocol as-is. But at some point, because of regressions and breakage introduced by new devtools features, marionette stripped down its usage of devtools protocol to only a very old subset of it. During the b2g coordination workweek I highlighted this and suggested to tune the client to be closer to be a real devtools protocol client. It is matter of patching the following file:
https://mxr.mozilla.org/mozilla-central/source/testing/marionette/transport/marionette_transport/transport.py I got positive feedback about such improvement from jgriffin and opened bug 1014516. But, for (new) tools, I would suggest using devtools protocol directly. If your data appear to be useful for gaia/app developers, it would be easy to then display it in the App manager within a new tool. You just need a client. There is a stable and full featured client for nodejs, https://github.com/harthur/firefox-client The downside compared to marionette is that this isn't a REPL API, so that it isn't an API to evaluate arbitrary piece of code on device. The idea is to write/tweak an actor in gecko, all hosted here: http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/ And then call your actors methods from the client. I can easily agree that's not as handy for prototyping... For example, I would like to see firewatch using the memory actor, and pull many more information from the nsIMemoryReporterManager, instead of polling frenetically from "adb shell"! See https://github.com/harthur/firefox-client/pull/5 I also heard that devtools team may ship a new panel in the app manager, so that we can easily pull and display any such information. I whish it could be done in such way that any gecko hacker can add any new probe in it and experiment to see what useful information we can pull from our codebase. Devtools team would mostly be here to implement the framework and let all experts in each field, find and expose all valuable probe in platform code. 2014-05-22 4:37 GMT+02:00 Jed Davis <[email protected]>: > On Wed, Apr 09, 2014 at 11:26:08AM -0700, Dave Huseby wrote: > > 3. It's painfully obvious that we have multiple solutions for the same > > problems. It's also painfully obvious that it isn't easy for developers > > to find out about existing tools (I know, I've been digging for days) > > and therefore build their own solution under the false pretense that a > > tool doesn't already exist. (I'm guilty of this myself, see #2). > > There's also some unfortunate duplication with respect to sending > information in the opposite direction. > > For example, the B2G about:memory support claims three realtime signals > (one each for "dump report", "dump report after minimizing usage", > and "dump GC/CC logs"), which are sent by a special utility we build > because the existing kill(1) can't deal with numbers >= 32, and then the > pipe-to-self trick is used to get out of signal handler context, etc. > Followed by the previously mentioned polling for files to appear, which > results in hacks like MOZ_IGNORE_NUWA_PROCESS that annoy people and > reduce their productivity. > > Except we already have Marionette and XPConnect, which (now that bug > 973090 landed) can replace all of that. I think. The only inelegance > is that I'd like JS callbacks to call up into Python on the host, but > execute_script can only return a value; this is workaroundable, but it'd > be nice if there already were some way to yield a stream of events.... > > The situation with the profiler is similar, except the reinvented wheel > is IMHO a bit more angular. There might be some interest in removing > the overt async signal unsafety, the custom sort-of-CSV parser, etc. > > --Jed > > _______________________________________________ > dev-b2g mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-b2g >
_______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
