<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
From what I remember (trying to recall something written five years
ago) system_profile used to respect this policy but from looking at
the code it seems like it doesn't now. The tracing and scheduler
queues has been rewritten several times since then and it is
possible that something has been lost.<br>
<br>
I will have a look at it. Thank you for reporting this.<br>
<br>
Regards,<br>
Björn-Egil<br>
<br>
On 2012-01-03 01:37, Magnus Klaar wrote:
<blockquote
cite="mid:CAHxXoHiiMoZL+N7jS22SpOxPGwtgOzQFnaO_Oj4psrr5sWdLiQ@mail.gmail.com"
type="cite">Hi!
<div><br>
</div>
<div>I'm seeing a strange behavior when using erlang:system_info/2
to trace the running processes on an erlang node. I know it's
flagged as experimental so I will assume it's actually a feature
even if the documentation does not agree. When a process is used
to receive the profile messages from erlang:system_info/2 the
receiving process is also profiled. The effect of this is that
the process receiving the profile messages will receive an
infinite sequence of 'inactive' ... 'active' ... 'inactive' ....
messages from the runtime system. The manpage states that the "<span
class="Apple-style-span"
style="color:rgb(34,34,34);font-family:verdana,Arial,sans-serif;font-size:13px;line-height:17px">The
receiver is excluded from all profiling.". I've compared this
with using the erlang:trace/3 function to trace running
processes, when this function is used the tracer processes
never receives a message when the tracer process scheduled.</span></div>
<div><span class="Apple-style-span"
style="color:rgb(34,34,34);font-family:verdana,Arial,sans-serif;font-size:13px;line-height:17px"><br>
</span></div>
<div><font class="Apple-style-span" color="#222222" face="verdana,
Arial, sans-serif"><span class="Apple-style-span"
style="line-height:17px">Two eunit tests for showing the
difference: </span></font><a moz-do-not-send="true"
href="https://gist.github.com/1552673">https://gist.github.com/1552673</a></div>
<div><br>
</div>
<div>Running "erl -noshell -s system_profile test -s init stop" on
my system yields the following result:</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>system_profile.erl:30:<0.35.0>: Total: 525169, For
tracer: 524824, For others: 345</div>
<div><br>
</div>
<div>system_profile:13: system_profile_test_...*failed*</div>
<div>::{assertion_failed,[{module,system_profile},</div>
<div> {line,32},</div>
<div> {expression,"SelfCount =:= 0"},</div>
<div> {expected,true},</div>
<div> {value,false}]}</div>
<div><br>
</div>
<div><br>
</div>
<div>system_profile.erl:58:<0.123.0>: Total: 338, For
tracer: 0, For others: 338</div>
<div><br>
</div>
<div>=======================================================</div>
<div> Failed: 1. Skipped: 0. Passed: 1.</div>
</div>
<div><span class="Apple-style-span"
style="color:rgb(34,34,34);font-family:verdana,Arial,sans-serif;font-size:13px;line-height:17px"><br>
</span></div>
<div><span class="Apple-style-span"
style="color:rgb(34,34,34);font-family:verdana,Arial,sans-serif;font-size:13px;line-height:17px"><br>
</span></div>
<div><span class="Apple-style-span"
style="color:rgb(34,34,34);font-family:verdana,Arial,sans-serif;font-size:13px;line-height:17px">My
questions are: Am I using it wrong? If so, how should it be
used? If not, Is it a bug?</span></div>
<div><span class="Apple-style-span"
style="color:rgb(34,34,34);font-family:verdana,Arial,sans-serif;font-size:13px;line-height:17px"><br>
</span></div>
<div><span class="Apple-style-span"
style="color:rgb(34,34,34);font-family:verdana,Arial,sans-serif;font-size:13px;line-height:17px">MVH
Magnus</span></div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
erlang-questions mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
</blockquote>
<br>
</body>
</html>