[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] Mirage tracing



On 15 October 2014 10:40, Thomas Gazagnaire <thomas@xxxxxxxxxxxxxx> wrote:
>>>>>>>>> ( trace file: http://test.roscidus.com/static/log-x86.sexp )
>>>>>>>
>>>>>>> That's pretty cool! That would be even cooler to have a 
>>>>>>> HTML/CSS/javascript output on a "debug" port for any unikernel :-)
>
> To continue on this, how do you generate the sexp currently? Is there a way 
> to have a continuous profiling trace? Would be very cool to profile running 
> unikernels ...

Currently, I have a modified Lwt that lets you register a tracing
handler. My unikernel registers one, adds every event it gets to a
list, and dumps the list to the console at the end.

But this is just a temporary hack. My current plan is to make a
Profile module and have Lwt call that directly. By default, the
profile module will just be stubs and the compiler will optimise out
all the profiling. Other Mirage libraries can then depend on the
profile library and add extra debugging information in the same way,
without any cost when profiling isn't used.

It should be possible to view a trace at any time (it's an append-only
log), although the layout algorithm may need to adjust earlier threads
as new information arrives (layout is done right-to-left).

[1] https://github.com/talex5/lwt/commits/tracing

> Thomas
>
>
>
>>>>>>
>>>>>> It's using cairo for rendering, so producing png or svg output should
>>>>>> be easy. My javascript skills aren't up to making it zoom smoothly in
>>>>>> a browser though...
>>>>>
>>>>> Regarding rendering, Daniel Buenzli's Vz library does have a js_of_ocaml
>>>>> backend, so this may be a good place to get started on a browser backend
>>>>> without the trouble of learning HTML/CSS:
>>>>>
>>>>> http://erratique.ch/software/vg
>>>>
>>>> I almost had it working with Vg, but there seemed to be no way to
>>>> measure the text, which is needed to place the labels, so I ended up
>>>> using HTML canvas directly. As it turned out, that API was a better
>>>> fit for me anyway (being more similar to Cairo's API).
>>>>
>>>> You can test it here:
>>>>
>>>> http://test.roscidus.com/static/html_viewer.html?t_min=8249.530963&t_max=8249.534574
>>>>
>>>> Scroll to zoom and drag to scroll as usual. Tested on Linux with
>>>> Firefox and Chromium; let me know if it works elsewhere.
>>>>
>>>> It doesn't support touch, so won't work on tablets (also, would
>>>> probably be very slow).
>>>>
>>>>> I'll send an update on Conduit soon, but Dave Scott has added sufficient
>>>>> Cohttp support that we could expose a Cohttp/Vchan from a unikernel and
>>>>> access it via Linux userspace.  In other words: you can use Chrome or 
>>>>> Firefox
>>>>> to access the debugging port without going through TCP, which is pretty
>>>>> cool :-)
>>>>
>>>>> -anil
>>>>
>>>>
>>>>
>>>> --
>>>> Dr Thomas Leonard        http://0install.net/
>>>> GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
>>>> GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA
>>>
>>
>>
>>
>> --
>> Dr Thomas Leonard        http://0install.net/
>> GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
>> GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA
>



-- 
Dr Thomas Leonard        http://0install.net/
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.