Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use case idea #1

Open
lukego opened this issue Mar 3, 2017 · 2 comments
Open

Use case idea #1

lukego opened this issue Mar 3, 2017 · 2 comments

Comments

@lukego
Copy link

lukego commented Mar 3, 2017

Just an idea for a use-case for LOOM.

I am often wanting to discuss LuaJIT behavior with other developers, e.g. on LuaJIT/LuaJIT#293 (comment), and a common problem is sharing the relevant parts of the JIT dump in a convenient way. I have to decide whether to excerpt the instructions that I think are most relevant, or copy-paste the whole traces that I want people to look at, or save the whole dump as a Github gist, or some combination of these things. This creates work for me and frankly I don't know how convenient it is for other people. It would be nice to have a standard solution.

Just thinking that LOOM could fill this niche somehow? For example with a one-liner that would both generate the HTML output and also automatically host it somewhere as gist does? Then I could just run that and copy-paste the URL and rely on it being easy enough to navigate that people will find the relevant parts themselves.

Relatedly:

I am often looking into LuaJIT compiler behaviour using small one-page examples. On the one hand this is convenient because they are easy to share and it forces me to minimize my test cases. On the other hand I am much more interested in analyzing, discussing, and improving the behaviour of Snabb which is a much larger application. So although LOOM seems to make the simple examples easier to analyze I do more broadly want to move towards analyzing whole applications and e.g. being able to reference or excerpt the parts that I want to share. Could be that it makes sense to build my own tools for Snabb and also to use LOOM to simplify discussions of test cases e.g. by having the tool show the trace structure instead of me explaining it each time.

Great work you are doing @javierguerragiraldez :) Just trying to fit it into my world view and accommodate my own NIH tendencies.

@javierguerragiraldez
Copy link

thanks for your ideas, the way i usually use loom is like this:

luajit -jloom=,>(bcat -) ../luketests/sinkffi2.lua

where bcat is a small ruby utility that opens a browser tab with its input. if there's a similar utility to push to gist or some paste-like host, it would just work like that.

on using loom for bigger programs, one idea that i'd like is to add a 'one shot' function that doesn't need the start/stop process like -jxxx. Just call it anywhere and get a dump. maybe specifying the trace number, or a function to be focused on.

@javierguerragiraldez
Copy link

ah, also note that there are section anchors at the trace boxes, so once you get a dump online, you can copy/paste the url to a specific trace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants