<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 1/26/20 10:41 AM, Vans S wrote:<br>
</div>
<blockquote type="cite"
cite="mid:1364287934.20043536.1580064079923@mail.yahoo.com">
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<div class="ydpee6aa264yahoo-style-wrap"
style="font-family:Helvetica Neue, Helvetica, Arial,
sans-serif;font-size:13px;">
<div dir="ltr" data-setdir="false">On this topic, is there a way
to attach instrumentation on the fly in a running system?
That can give you a callback onentry and onexit? To profile
wall time and perhap do conditional matching / stack trace
inspection. To see which calls trigger the slow path for
example.</div>
</div>
</blockquote>
<p>You could take a look at eprof to see how it works (
<a class="moz-txt-link-freetext" href="https://github.com/erlang/otp/blob/c15eb5fdf721afed280afdbe0fff37706eef979c/lib/tools/src/eprof.erl#L373">https://github.com/erlang/otp/blob/c15eb5fdf721afed280afdbe0fff37706eef979c/lib/tools/src/eprof.erl#L373</a>
). The eprof approach relies on tracing, which is mutating global
state, so it lacks referential transparency and seems best to
avoid in production source code (not saying tracing shouldn't be
used in production).<br>
</p>
Best Regards,<br>
Michael<br>
</body>
</html>