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 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>