<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 11/13/2011 09:01 AM, Jovi Zhang wrote:
<blockquote
cite="mid:CACV3sb+VgDdmK-6Y02aGi9gVGH+m_35cFvn0EQpR1aYTE1iRdg@mail.gmail.com"
type="cite">How about this patch?<br>
</blockquote>
<br>
I got the patch on the 14th, and this reminder on the 13th, and I
did not have time to response to them until today.<br>
<br>
<blockquote
cite="mid:CACV3sb+VgDdmK-6Y02aGi9gVGH+m_35cFvn0EQpR1aYTE1iRdg@mail.gmail.com"
type="cite"><br>
<div class="gmail_quote">On Wed, Nov 9, 2011 at 5:04 PM, Jovi
Zhang <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:bookjovi@gmail.com" target="_blank">bookjovi@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<div>
<div>variable processes_busy is not used in current code, it
don't have</div>
<div>any meaning still stay on there, so remove it.</div>
</div>
<div><br>
</div>
<div>Git Tree: git pull git://<a
moz-do-not-send="true"
href="http://github.com/bookjovi/otp.git" target="_blank">github.com/bookjovi/otp.git</a></div>
<div>Patch Review: <b> </b><a moz-do-not-send="true"
href="https://github.com/bookjovi/otp/commit/d428f18f1d03c133e2b59053978509bfae4d2c8c"
target="_blank">https://github.com/bookjovi/otp/commit/d428f18f1d03c133e2b59053978509bfae4d2c8c</a></div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>commit d428f18f1d03c133e2b59053978509bfae4d2c8c</div>
<div>Author: Jovi Zhang <<a moz-do-not-send="true"
href="mailto:bookjovi@gmail.com" target="_blank">bookjovi@gmail.com</a>></div>
<div>Date: Wed Nov 2 04:30:04 2011 +0800</div>
<div><br>
</div>
<div> erts: remove variable processes_busy</div>
<div> </div>
<div> variable processes_busy is not used in current
code, it don't have</div>
<div> any meaning still stay on there, so remove it.</div>
<div><br>
</div>
<div>diff --git a/erts/emulator/beam/benchmark.c
b/erts/emulator/beam/benchmark.c</div>
<div>index 7fbf44a..7382a0f 100644</div>
<div>--- a/erts/emulator/beam/benchmark.c</div>
<div>+++ b/erts/emulator/beam/benchmark.c</div>
<div>@@ -26,7 +26,6 @@</div>
<div> #include "benchmark.h"</div>
<div> </div>
<div> #ifdef BM_COUNTERS</div>
<div>-unsigned long long processes_busy;</div>
<div> unsigned long long processes_spawned;</div>
<div> unsigned long long messages_sent;</div>
<div> unsigned long long messages_copied;</div>
<div>@@ -184,7 +183,6 @@ void init_benchmarking()</div>
<div> #endif /* BM_TIMERS */</div>
<div> </div>
<div> #ifdef BM_COUNTERS</div>
<div>- processes_busy = 0;</div>
<div>
processes_spawned = 0;</div>
<div> messages_sent = 0;</div>
<div> messages_copied = 0;</div>
<div>diff --git a/erts/emulator/beam/benchmark.h
b/erts/emulator/beam/benchmark.h</div>
<div>index eedb06a..9c9d33c 100644</div>
<div>--- a/erts/emulator/beam/benchmark.h</div>
<div>+++ b/erts/emulator/beam/benchmark.h</div>
<div>@@ -92,7 +92,6 @@</div>
<div> * BM_COUNT(var) in the code where you want to
increase it.</div>
<div> *</div>
<div> */</div>
<div>-extern unsigned long long processes_busy;</div>
<div> extern unsigned long long processes_spawned;</div>
<div> extern unsigned long long messages_sent;</div>
<div> extern unsigned long long messages_copied;</div>
<div>
diff --git a/erts/emulator/beam/erl_process.c
b/erts/emulator/beam/erl_process.c</div>
<div>index 5ceb4ce..b36e100 100644</div>
<div>--- a/erts/emulator/beam/erl_process.c</div>
<div>+++ b/erts/emulator/beam/erl_process.c</div>
<div>@@ -224,10 +224,6 @@ static
ErtsAlignedSchedulerSleepInfo *aligned_sched_sleep_info;</div>
<div> </div>
<div> #endif</div>
<div> </div>
<div>-#ifndef BM_COUNTERS</div>
<div>-static int processes_busy;</div>
<div>-#endif</div>
<div>-</div>
<div> Process** process_tab;</div>
<div> static Uint last_reductions;</div>
<div>
static Uint last_exact_reductions;</div>
<div>@@ -435,9 +431,6 @@ erts_init_process(int ncpu)</div>
<div> p_serial_shift =
erts_fit_in_bits(erts_max_processes - 1);</div>
<div> p_serial_mask = ((~(~((Uint) 0) <<
proc_bits)) >> p_serial_shift);</div>
<div> erts_process_tab_index_mask = ~(~((Uint) 0)
<< p_serial_shift);</div>
<div>-#ifndef BM_COUNTERS</div>
<div>- processes_busy = 0;</div>
<div>-#endif</div>
<div> last_reductions = 0;</div>
<div> last_exact_reductions = 0;</div>
<div> erts_default_process_flags = 0;</div>
<div>@@ -6100,7 +6093,6 @@ erl_create_process(Process*
parent, /* Parent of process (default group leader).</div>
<div> goto error;</div>
<div> }</div>
<div> </div>
<div>
- processes_busy++;</div>
<div> BM_COUNT(processes_spawned);</div>
<div> </div>
<div> #ifndef HYBRID</div>
<div>@@ -7623,7 +7615,6 @@ continue_exit_process(Process *p</div>
<div> pbt = ERTS_PROC_SET_CALL_TIME(p,
ERTS_PROC_LOCKS_ALL, NULL);</div>
<div> </div>
<div> erts_smp_proc_unlock(p, ERTS_PROC_LOCKS_ALL);</div>
<div>- processes_busy--;</div>
<div> </div>
<div> if (dep) {</div>
<div> erts_do_net_exits(dep, reason);</div>
</div>
<div><br>
</div>
</blockquote>
</div>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
erlang-patches mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-patches@erlang.org">erlang-patches@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-patches">http://erlang.org/mailman/listinfo/erlang-patches</a>
</pre>
</blockquote>
<br>
I will include this in 'pu' <br>
<br>
Thank you for the contribution!<br>
<br>
<br>
<pre class="moz-signature" cols="72">--
/Henrik Nord Erlang/OTP</pre>
</body>
</html>