luv

Workshop wiki

tracy-capture.lisp

luft/render/tracy-capture.lisp

system luft/render · 17 definitions · on GitHub

in-package#:luft.render

luft owns only the application attachment and command vocabulary. The shared controller owns every subprocess and every concurrent transition.

defclassviewer-tracy-capture-instrument
controller:initarg:controller:readerviewer-tracy-capture-controller
canvas-thread-named-p:initformnil:accessorviewer-tracy-canvas-thread-named-p
defmethodviewer-instrument-priority
declare
ignoreinstrument
-1000
defmethodviewer-instrument-present-p
declare
ignoreviewer

Participate only during the short connection handshake. Once the canvas lane is named, this nonvisual attachment must not cause an empty overlay render pass that would itself pollute the capture being measured.

and
not
viewer-tracy-canvas-thread-named-pinstrument
luv.tracy.capture:tracy-capture-active-p
viewer-tracy-capture-controllerinstrument
defmethodrefresh-viewer-instrument
declare
ignoreviewer
when
and
not
viewer-tracy-canvas-thread-named-pinstrument
name-tracy-thread"LUFT canvas"
setf
viewer-tracy-canvas-thread-named-pinstrument
t
instrument
defunensure-viewer-tracy-capture-attachment
or
add-viewer-instrumentviewer
make-instance'viewer-tracy-capture-instrument:controller
luv.tracy.capture:make-tracy-capture-controller:application-name"luft":directory
merge-pathnames"build/tracy/"
asdf:system-source-directory"luft"
defunstart-viewer-tracy-capture

Start viewer's trace asynchronously and return its reserved pathname.

let
setf
viewer-tracy-canvas-thread-named-pinstrument
nil
luv.tracy.capture:start-tracy-capture
viewer-tracy-capture-controllerinstrument
defunstop-viewer-tracy-capture

Request viewer's graceful capture stop without waiting for finalization.

alexandria:when-let
luv.tracy.capture:stop-tracy-capture
viewer-tracy-capture-controllerinstrument
defuntoggle-viewer-tracy-capture

Atomically start or stop viewer's shared Tracy controller.

let
when
eq:idle
luv.tracy.capture:tracy-capture-state
viewer-tracy-capture-controllerinstrument
setf
viewer-tracy-canvas-thread-named-pinstrument
nil
luv.tracy.capture:toggle-tracy-capture
viewer-tracy-capture-controllerinstrument
defunopen-viewer-tracy-capture
viewer&optionalpathname

Open pathname or viewer's last trace without waiting for the Tracy GUI.

alexandria:when-let
luv.tracy.capture:open-tracy-capture
viewer-tracy-capture-controllerinstrument
pathname
defunreveal-viewer-tracy-capture
viewer&optionalpathname

Reveal pathname or viewer's last trace without waiting for Finder.

alexandria:when-let
luv.tracy.capture:reveal-tracy-capture
viewer-tracy-capture-controllerinstrument
pathname
clim:define-command
com-toggle-tracy-capture:command-tableluft-window:name"Toggle Tracy Capture":keystroke
:f9
clim:define-command
com-start-tracy-capture:command-tableluft-window:name"Start Tracy Capture"
clim:define-command
com-stop-tracy-capture:command-tableluft-window:name"Stop Tracy Capture"
clim:define-command
com-open-last-tracy-capture:command-tableluft-window:name"Open Last Tracy Capture"
clim:define-command
com-reveal-last-tracy-capture:command-tableluft-window:name"Reveal Last Tracy Capture"