citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit d0230d706e370f17717c4f4e5377d6d0d3bd6e86
parent e199113a22a8a7dff08809d5e7f7e098d84c723a
Author: Kyle Milz <kyle@0x30.net>
Date:   Thu,  4 Aug 2016 19:49:54 -0600

www: start keeping track of generated html man pages

Diffstat:
Abin/www_man.sh | 8++++++++
Mwww/citrun.css | 8++------
Mwww/index.html | 3++-
Awww/man/citrun-check.1.html | 81+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awww/man/citrun-gl.1.html | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awww/man/citrun-term.1.html | 82+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awww/man/citrun-wrap.1.html | 120+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 359 insertions(+), 7 deletions(-)

diff --git a/bin/www_man.sh b/bin/www_man.sh @@ -0,0 +1,8 @@ +#!/bin/sh -e + +mkdir -p www/man + +mandoc_cmd="mandoc -Thtml -Ostyle=/citrun.css -Oman=%N.%S.html" +for man in man/*.1; do + $mandoc_cmd $man > www/man/`basename $man`.html +done diff --git a/www/citrun.css b/www/citrun.css @@ -6,8 +6,8 @@ li { line-height: 1.5em; } body { max-width: 80ch; margin: auto; - font-size: 1.5em ; - font-family: monospace; + font-size: 1em ; + font-family: sans-serif; } .inline_logo { @@ -20,7 +20,3 @@ body { float: right; border: 1px dotted black; } - -h1, h2 { - font-weight: normal; -} diff --git a/www/index.html b/www/index.html @@ -65,10 +65,11 @@ </ul> <h2>Documentation</h2> - <p>Start with citrun-wrap(1): + <p>Start with citrun-wrap: </p> <ul> <li><a href="man/citrun-wrap.1.html">citrun-wrap(1)</a> + <li><a href="man/citrun-check.1.html">citrun-check(1)</a> <li><a href="man/citrun-gl.1.html">citrun-gl(1)</a> <li><a href="man/citrun-term.1.html">citrun-term(1)</a> </ul> diff --git a/www/man/citrun-check.1.html b/www/man/citrun-check.1.html @@ -0,0 +1,81 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<style> +table.head, table.foot { width: 100%; } +td.head-rtitle, td.foot-os { text-align: right; } +td.head-vol { text-align: center; } +table.foot td { width: 50%; } +table.head td { width: 33%; } +div.spacer { margin: 1em 0; } +</style> +<link rel="stylesheet" href="/citrun.css" type="text/css" media="all"/> +<title> +CITRUN-CHECK(1)</title> +</head> +<body> +<div class="mandoc"> +<table class="head"> +<tbody> +<tr> +<td class="head-ltitle"> +CITRUN-CHECK(1)</td> +<td class="head-vol"> +General Commands Manual</td> +<td class="head-rtitle"> +CITRUN-CHECK(1)</td> +</tr> +</tbody> +</table> +<div class="section"> +<h1 id="NAME">NAME</h1> <b class="name">citrun-check</b> &#8212; <span class="desc">check directories for instrumentation artifacts</span></div> +<div class="section"> +<h1 id="SYNOPSIS">SYNOPSIS</h1><table class="synopsis"> +<col style="width: 12.00ex;"/> +<col/> +<tbody> +<tr> +<td> +<b class="name">citrun-check</b></td> +<td> +[<span class="opt"><i class="arg">dir</i></span>]</td> +</tr> +</tbody> +</table> +</div> +<div class="section"> +<h1 id="DESCRIPTION">DESCRIPTION</h1> The <b class="name">citrun-check</b> script recursively checks either <i class="arg">dir</i> or the current working directory for instrumentation artifacts.<div class="spacer"> +</div> +A summary is printed showing detailed counts of important events. The following is an example of what the output looks like:<div class="spacer"> +</div> +<pre style="margin-left: 5.00ex;" class="lit display"> +Checking '/usr/ports/pobj/spidermonkey-24.2.0/'... + 3 Log files found + 185 Calls to the instrumentation tool + 117 Forked compilers + 97 Instrumentation successes + 19 Instrumentation failures (false positive) + 1 Instrumentation failures (true positive) + 60 Application link commands</pre> +<div class="spacer"> +</div> +The value of &#8220;Instrumentation failures (true positives)&#8221; is important. If this value is ever more than 0 it means that instrumentation failed but a native compile of the same source succeeded.</div> +<div class="section"> +<h1 id="EXIT_STATUS">EXIT STATUS</h1> The <b class="utility">citrun-check</b> utility exits&#160;0 on success, and&#160;&gt;0 if an error occurs.</div> +<div class="section"> +<h1 id="SEE_ALSO">SEE ALSO</h1> <a class="link-man" href="citrun-wrap.1.html">citrun-wrap(1)</a></div> +<table class="foot"> +<tbody> +<tr> +<td class="foot-date"> +August 3, 2016</td> +<td class="foot-os"> +OpenBSD 6.0</td> +</tr> +</tbody> +</table> +</div> +</body> +</html> + diff --git a/www/man/citrun-gl.1.html b/www/man/citrun-gl.1.html @@ -0,0 +1,64 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<style> +table.head, table.foot { width: 100%; } +td.head-rtitle, td.foot-os { text-align: right; } +td.head-vol { text-align: center; } +table.foot td { width: 50%; } +table.head td { width: 33%; } +div.spacer { margin: 1em 0; } +</style> +<link rel="stylesheet" href="/citrun.css" type="text/css" media="all"/> +<title> +CITRUN-GL(1)</title> +</head> +<body> +<div class="mandoc"> +<table class="head"> +<tbody> +<tr> +<td class="head-ltitle"> +CITRUN-GL(1)</td> +<td class="head-vol"> +General Commands Manual</td> +<td class="head-rtitle"> +CITRUN-GL(1)</td> +</tr> +</tbody> +</table> +<div class="section"> +<h1 id="NAME">NAME</h1> <b class="name">citrun-gl</b> &#8212; <span class="desc">OpenGL viewer</span></div> +<div class="section"> +<h1 id="DESCRIPTION">DESCRIPTION</h1> Multiplexes execution data from any running instrumented programs into an OpenGL window.<div class="spacer"> +</div> +Started instrumented programs will try connecting to <b class="name">citrun-gl</b> when it is running. When that succeeds execution data will appear in the viewer window.<div class="spacer"> +</div> +<b class="name">citrun-gl</b> uses process group information from connected programs to aggregate similar processes together.</div> +<div class="section"> +<h1 id="FILES">FILES</h1><dl style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-tag"> +<dt class="list-tag" style="margin-top: 1.00em;"> +<i class="file">/tmp/citrun.socket</i></dt> +<dd class="list-tag" style="margin-left: 6.00ex;"> +Listen socket.</dd> +</dl> +</div> +<div class="section"> +<h1 id="EXIT_STATUS">EXIT STATUS</h1> The <b class="utility">citrun-gl</b> utility exits&#160;0 on success, and&#160;&gt;0 if an error occurs.</div> +<div class="section"> +<h1 id="SEE_ALSO">SEE ALSO</h1> <a class="link-man" href="citrun-wrap.1.html">citrun-wrap(1)</a>, <a class="link-man" href="citrun-term.1.html">citrun-term(1)</a></div> +<table class="foot"> +<tbody> +<tr> +<td class="foot-date"> +April 9, 2016</td> +<td class="foot-os"> +OpenBSD 6.0</td> +</tr> +</tbody> +</table> +</div> +</body> +</html> + diff --git a/www/man/citrun-term.1.html b/www/man/citrun-term.1.html @@ -0,0 +1,82 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<style> +table.head, table.foot { width: 100%; } +td.head-rtitle, td.foot-os { text-align: right; } +td.head-vol { text-align: center; } +table.foot td { width: 50%; } +table.head td { width: 33%; } +div.spacer { margin: 1em 0; } +</style> +<link rel="stylesheet" href="/citrun.css" type="text/css" media="all"/> +<title> +CITRUN-TERM(1)</title> +</head> +<body> +<div class="mandoc"> +<table class="head"> +<tbody> +<tr> +<td class="head-ltitle"> +CITRUN-TERM(1)</td> +<td class="head-vol"> +General Commands Manual</td> +<td class="head-rtitle"> +CITRUN-TERM(1)</td> +</tr> +</tbody> +</table> +<div class="section"> +<h1 id="NAME">NAME</h1> <b class="name">citrun-term</b> &#8212; <span class="desc">terminal viewer</span></div> +<div class="section"> +<h1 id="DESCRIPTION">DESCRIPTION</h1> Listens for connections from running instrumented programs. Only supports one connection at a time.<div class="spacer"> +</div> +<b class="name">citrun-term</b> is controlled by the keys &#8220;hjkl&#8221;:<div class="spacer"> +</div> +<dl style="margin-top: 0.00em;margin-bottom: 0.00em;margin-left: 6.00ex;" class="list list-tag"> +<dt class="list-tag" style="margin-top: 0.00em;"> +&#8220;j&#8221;</dt> +<dd class="list-tag" style="margin-left: 10.00ex;"> +scrolls down</dd> +<dt class="list-tag" style="margin-top: 0.00em;"> +&#8220;k&#8221;</dt> +<dd class="list-tag" style="margin-left: 10.00ex;"> +scrolls up</dd> +<dt class="list-tag" style="margin-top: 0.00em;"> +&#8220;h&#8221;</dt> +<dd class="list-tag" style="margin-left: 10.00ex;"> +previous translation unit</dd> +<dt class="list-tag" style="margin-top: 0.00em;"> +&#8220;l&#8221;</dt> +<dd class="list-tag" style="margin-left: 10.00ex;"> +next translation unit</dd> +</dl> +</div> +<div class="section"> +<h1 id="FILES">FILES</h1><dl style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-tag"> +<dt class="list-tag" style="margin-top: 1.00em;"> +<i class="file">/tmp/citrun.socket</i></dt> +<dd class="list-tag" style="margin-left: 6.00ex;"> +Listen socket.</dd> +</dl> +</div> +<div class="section"> +<h1 id="EXIT_STATUS">EXIT STATUS</h1> The <b class="utility">citrun-term</b> utility exits&#160;0 on success, and&#160;&gt;0 if an error occurs.</div> +<div class="section"> +<h1 id="SEE_ALSO">SEE ALSO</h1> <a class="link-man" href="citrun-gl.1.html">citrun-gl(1)</a></div> +<table class="foot"> +<tbody> +<tr> +<td class="foot-date"> +July 19, 2016</td> +<td class="foot-os"> +OpenBSD 6.0</td> +</tr> +</tbody> +</table> +</div> +</body> +</html> + diff --git a/www/man/citrun-wrap.1.html b/www/man/citrun-wrap.1.html @@ -0,0 +1,120 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<style> +table.head, table.foot { width: 100%; } +td.head-rtitle, td.foot-os { text-align: right; } +td.head-vol { text-align: center; } +table.foot td { width: 50%; } +table.head td { width: 33%; } +div.spacer { margin: 1em 0; } +</style> +<link rel="stylesheet" href="/citrun.css" type="text/css" media="all"/> +<title> +CITRUN-WRAP(1)</title> +</head> +<body> +<div class="mandoc"> +<table class="head"> +<tbody> +<tr> +<td class="head-ltitle"> +CITRUN-WRAP(1)</td> +<td class="head-vol"> +General Commands Manual</td> +<td class="head-rtitle"> +CITRUN-WRAP(1)</td> +</tr> +</tbody> +</table> +<div class="section"> +<h1 id="NAME">NAME</h1> <b class="name">citrun-wrap</b> &#8212; <span class="desc">instrument a build command</span></div> +<div class="section"> +<h1 id="SYNOPSIS">SYNOPSIS</h1><table class="synopsis"> +<col style="width: 11.00ex;"/> +<col/> +<tbody> +<tr> +<td> +<b class="name">citrun-wrap</b></td> +<td> +<i class="arg">make</i> | <i class="arg">jam</i> | <i class="arg">gcc</i> | <i class="arg">cmake</i> | <i class="arg">...</i></td> +</tr> +</tbody> +</table> +</div> +<div class="section"> +<h1 id="DESCRIPTION">DESCRIPTION</h1> Add instrumentation to any C/C++ source files compiled during a build command.<div class="spacer"> +</div> +The build command must search <span class="env">PATH</span> when finding compiler executables, which must be one of the following:<div class="spacer"> +</div> +<ul style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-bul"> +<li class="list-bul" style="margin-top: 0.00em;"> +clang / clang++</li> +<li class="list-bul" style="margin-top: 0.00em;"> +egcc / eg++</li> +<li class="list-bul" style="margin-top: 0.00em;"> +gcc / g++</li> +<li class="list-bul" style="margin-top: 0.00em;"> +cc / c++</li> +</ul> +<div class="spacer"> +</div> +Because instrumentation is silent any activity is logged to the <i class="file">citrun.log</i> file. Instrumentations summaries can be generated by the <a class="link-man" href="citrun-check.1.html">citrun-check(1)</a> script.<div class="spacer"> +</div> +Incremental building is supported. If the build command fails, fix the problem and then rerun the build command with <b class="name">citrun-wrap</b>.</div> +<div class="section"> +<h1 id="FILES">FILES</h1><dl style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-tag"> +<dt class="list-tag" style="margin-top: 1.00em;"> +<i class="file">citrun.log</i></dt> +<dd class="list-tag" style="margin-left: 6.00ex;"> +Instrumentation log.</dd> +</dl> +</div> +<div class="section"> +<h1 id="EXIT_STATUS">EXIT STATUS</h1> The <b class="name">citrun-wrap</b> utility exits with the build command exit code.</div> +<div class="section"> +<h1 id="EXAMPLES">EXAMPLES</h1> Let &#8220;program&#8221; exist. It is:<div class="spacer"> +</div> +<ul style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-bul"> +<li class="list-bul" style="margin-top: 0.00em;"> +written in C</li> +<li class="list-bul" style="margin-top: 0.00em;"> +compiled with gcc</li> +<li class="list-bul" style="margin-top: 0.00em;"> +built with make and make searches PATH for gcc</li> +</ul> +<div class="spacer"> +</div> +Prepending <b class="name">citrun-wrap</b> to the build command adds instrumentation:<div class="spacer"> +</div> +<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;"> +<div class="display"> +<code class="lit">$ citrun-wrap make</code></div> +</blockquote> +<div class="spacer"> +</div> +Now see &#8220;program&#8221; run:<div class="spacer"> +</div> +<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;"> +<div class="display"> +<code class="lit">$ ./program</code></div> +</blockquote> +</div> +<div class="section"> +<h1 id="SEE_ALSO">SEE ALSO</h1> <a class="link-man" href="citrun-check.1.html">citrun-check(1)</a>, <a class="link-man" href="citrun-gl.1.html">citrun-gl(1)</a>, <a class="link-man" href="citrun-term.1.html">citrun-term(1)</a></div> +<table class="foot"> +<tbody> +<tr> +<td class="foot-date"> +April 10, 2016</td> +<td class="foot-os"> +OpenBSD 6.0</td> +</tr> +</tbody> +</table> +</div> +</body> +</html> +