Skip to content

Commit

Permalink
566917: Occasional poor performance with GZip HPROF
Browse files Browse the repository at this point in the history
Fix newly introduced marking bug and performance tune.

Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=566917

Change-Id: I9e8bd9b9e3199cee8708193da171f485bfc59393
  • Loading branch information
ajohnson1 committed Sep 18, 2020
1 parent 73d20a1 commit 33c7214
Showing 1 changed file with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ static class MultiThreadedRootStack extends IntStack
private int totalThreads;
private int waits; // Debug
private long waitsduration; // Debug
static final int RESERVED_WAITING = 20;
static final int RESERVED_RUNNING = 5;
static final int RESERVED_WAITING = 50;
static final int RESERVED_RUNNING = 15;
int totalWork;
int worked; // ticks done so far
int pushed; // items pushed to the stack
Expand Down Expand Up @@ -675,13 +675,12 @@ public void run()
* Other threads might still need more,
* so transfer more from the queue which is non-local
*/
while (check && (queue.size() > 0 && queue.size() + size > RESERVED))
{
check = rootsStack.pushIfWaiting(queue.get());
}
}
if (check)
{
check = fillRootsStack();
continue;
}
}
if (size == 0)
{
Expand Down Expand Up @@ -785,9 +784,13 @@ else if (size > RESERVED)
{
do
{
check = rootsStack.pushIfWaiting(current);
if (check)
current = data[--size];
/* Leave current unaffected */
/* start stack.pop() */
int item = data[--size];
check = rootsStack.pushIfWaiting(item);
if (!check)
/* start stack.push() */
data[size++] = item;
}
while (check && size > RESERVED);
}
Expand Down

0 comments on commit 33c7214

Please sign in to comment.