Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removal of ThreadHints #55

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package uk.co.real_logic.benchmarks.aeron.ipc;

import org.agrona.concurrent.OneToOneConcurrentArrayQueue;
import org.agrona.hints.ThreadHints;
import org.openjdk.jmh.annotations.*;

import java.util.Arrays;
Expand Down Expand Up @@ -72,7 +71,7 @@ public synchronized void setup()
break;
}

ThreadHints.onSpinWait();
Thread.onSpinWait();
}
else
{
Expand All @@ -82,7 +81,7 @@ public synchronized void setup()
final Queue<Integer> responseQueue = responseQueues[value];
while (!responseQueue.offer(value))
{
ThreadHints.onSpinWait();
Thread.onSpinWait();
}
}
}
Expand Down Expand Up @@ -146,7 +145,7 @@ private Integer sendBurst(final PerThreadState state)
{
while (!sendQueue.offer(value))
{
ThreadHints.onSpinWait();
Thread.onSpinWait();
}
}

Expand All @@ -159,7 +158,7 @@ private Integer sendBurst(final PerThreadState state)
break;
}

ThreadHints.onSpinWait();
Thread.onSpinWait();
}

return value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.agrona.concurrent.IdleStrategy;
import org.agrona.concurrent.OneToOneConcurrentArrayQueue;
import org.agrona.concurrent.UnsafeBuffer;
import org.agrona.hints.ThreadHints;
import org.openjdk.jmh.annotations.*;

import java.util.Arrays;
Expand Down Expand Up @@ -175,7 +174,7 @@ public void onFragment(final DirectBuffer buffer, final int offset, final int le
final Queue<Integer> responseQueue = responseQueues[value];
while (!responseQueue.offer(SENTINEL))
{
ThreadHints.onSpinWait();
Thread.onSpinWait();
}
}
}
Expand All @@ -199,7 +198,7 @@ private Integer sendBurst(final PerThreadState state)
buffer.putInt(0, value);
while (publication.offer(buffer, 0, SIZE_OF_INT) < 0)
{
ThreadHints.onSpinWait();
Thread.onSpinWait();
}
}

Expand All @@ -212,7 +211,7 @@ private Integer sendBurst(final PerThreadState state)
break;
}

ThreadHints.onSpinWait();
Thread.onSpinWait();
}

return value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.agrona.concurrent.IdleStrategy;
import org.agrona.concurrent.OneToOneConcurrentArrayQueue;
import org.agrona.concurrent.UnsafeBuffer;
import org.agrona.hints.ThreadHints;
import org.openjdk.jmh.annotations.*;

import java.util.Arrays;
Expand Down Expand Up @@ -175,7 +174,7 @@ public void onFragment(final DirectBuffer buffer, final int offset, final int le
final Queue<Integer> responseQueue = responseQueues[value];
while (!responseQueue.offer(SENTINEL))
{
ThreadHints.onSpinWait();
Thread.onSpinWait();
}
}
}
Expand Down Expand Up @@ -215,7 +214,7 @@ private Integer sendBurst(final PerThreadState state)
buffer.putInt(0, value);
while (publication.offer(buffer, 0, SIZE_OF_INT) < 0)
{
ThreadHints.onSpinWait();
Thread.onSpinWait();
}
}

Expand All @@ -228,7 +227,7 @@ private Integer sendBurst(final PerThreadState state)
break;
}

ThreadHints.onSpinWait();
Thread.onSpinWait();
}

return value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package uk.co.real_logic.benchmarks.aeron.ipc;

import org.agrona.concurrent.OneToOneConcurrentArrayQueue;
import org.agrona.hints.ThreadHints;
import org.openjdk.jmh.annotations.*;

import java.util.Arrays;
Expand Down Expand Up @@ -73,7 +72,7 @@ public synchronized void setup()
break;
}

ThreadHints.onSpinWait();
Thread.onSpinWait();
}
else
{
Expand All @@ -83,7 +82,7 @@ public synchronized void setup()
final Queue<Integer> responseQueue = responseQueues[value];
while (!responseQueue.offer(value))
{
ThreadHints.onSpinWait();
Thread.onSpinWait();
}
}
}
Expand Down Expand Up @@ -155,7 +154,7 @@ private Integer sendBurst(final PerThreadState state)
{
while (!sendQueue.offer(value))
{
ThreadHints.onSpinWait();
Thread.onSpinWait();
}
}

Expand All @@ -168,7 +167,7 @@ private Integer sendBurst(final PerThreadState state)
break;
}

ThreadHints.onSpinWait();
Thread.onSpinWait();
}

return value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package uk.co.real_logic.benchmarks.aeron.ipc;

import org.agrona.concurrent.OneToOneConcurrentArrayQueue;
import org.agrona.hints.ThreadHints;
import org.openjdk.jmh.annotations.*;

import java.util.Arrays;
Expand Down Expand Up @@ -73,7 +72,7 @@ public synchronized void setup()
break;
}

ThreadHints.onSpinWait();
Thread.onSpinWait();
}
else
{
Expand All @@ -83,7 +82,7 @@ public synchronized void setup()
final Queue<Integer> responseQueue = responseQueues[value];
while (!responseQueue.offer(value))
{
ThreadHints.onSpinWait();
Thread.onSpinWait();
}
}
}
Expand Down Expand Up @@ -155,7 +154,7 @@ private Integer sendBurst(final PerThreadState state)
{
while (!sendQueue.offer(value))
{
ThreadHints.onSpinWait();
Thread.onSpinWait();
}
}

Expand All @@ -168,7 +167,7 @@ private Integer sendBurst(final PerThreadState state)
break;
}

ThreadHints.onSpinWait();
Thread.onSpinWait();
}

return value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import com.lmax.disruptor.dsl.Disruptor;
import com.lmax.disruptor.dsl.ProducerType;
import org.agrona.concurrent.OneToOneConcurrentArrayQueue;
import org.agrona.hints.ThreadHints;
import org.openjdk.jmh.annotations.*;

import java.util.Arrays;
Expand Down Expand Up @@ -131,7 +130,7 @@ public void onEvent(final Message event, final long sequence, final boolean endO
final Queue<Integer> responseQueue = responseQueues[value];
while (!responseQueue.offer(SENTINEL))
{
ThreadHints.onSpinWait();
Thread.onSpinWait();
}
}

Expand Down Expand Up @@ -206,7 +205,7 @@ private Integer sendBurst(final PerThreadState state)
break;
}

ThreadHints.onSpinWait();
Thread.onSpinWait();
}

return value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package uk.co.real_logic.benchmarks.aeron.ipc;

import org.agrona.concurrent.OneToOneConcurrentArrayQueue;
import org.agrona.hints.ThreadHints;
import org.openjdk.jmh.annotations.*;

import java.util.Arrays;
Expand Down Expand Up @@ -73,7 +72,7 @@ public synchronized void setup()
break;
}

ThreadHints.onSpinWait();
Thread.onSpinWait();
}
else
{
Expand All @@ -83,7 +82,7 @@ public synchronized void setup()
final Queue<Integer> responseQueue = responseQueues[value];
while (!responseQueue.offer(value))
{
ThreadHints.onSpinWait();
Thread.onSpinWait();
}
}
}
Expand Down Expand Up @@ -155,7 +154,7 @@ private Integer sendBurst(final PerThreadState state)
{
while (!sendQueue.offer(value))
{
ThreadHints.onSpinWait();
Thread.onSpinWait();
}
}

Expand All @@ -168,7 +167,7 @@ private Integer sendBurst(final PerThreadState state)
break;
}

ThreadHints.onSpinWait();
Thread.onSpinWait();
}

return value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import org.agrona.concurrent.ManyToOneConcurrentArrayQueue;
import org.agrona.concurrent.OneToOneConcurrentArrayQueue;
import org.agrona.hints.ThreadHints;
import org.openjdk.jmh.annotations.*;

import java.util.Arrays;
Expand Down Expand Up @@ -72,7 +71,7 @@ public synchronized void setup()
break;
}

ThreadHints.onSpinWait();
Thread.onSpinWait();
}
else
{
Expand All @@ -82,7 +81,7 @@ public synchronized void setup()
final Queue<Integer> responseQueue = responseQueues[value];
while (!responseQueue.offer(value))
{
ThreadHints.onSpinWait();
Thread.onSpinWait();
}
}
}
Expand Down Expand Up @@ -154,7 +153,7 @@ private Integer sendBurst(final PerThreadState state)
{
while (!sendQueue.offer(value))
{
ThreadHints.onSpinWait();
Thread.onSpinWait();
}
}

Expand All @@ -167,7 +166,7 @@ private Integer sendBurst(final PerThreadState state)
break;
}

ThreadHints.onSpinWait();
Thread.onSpinWait();
}

return value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import org.agrona.concurrent.ManyToOneConcurrentLinkedQueue;
import org.agrona.concurrent.OneToOneConcurrentArrayQueue;
import org.agrona.hints.ThreadHints;
import org.openjdk.jmh.annotations.*;

import java.util.Arrays;
Expand Down Expand Up @@ -73,7 +72,7 @@ public synchronized void setup()
break;
}

ThreadHints.onSpinWait();
Thread.onSpinWait();
}
else
{
Expand All @@ -83,7 +82,7 @@ public synchronized void setup()
final Queue<Integer> responseQueue = responseQueues[value];
while (!responseQueue.offer(value))
{
ThreadHints.onSpinWait();
Thread.onSpinWait();
}
}
}
Expand Down Expand Up @@ -155,7 +154,7 @@ private Integer sendBurst(final PerThreadState state)
{
while (!sendQueue.offer(value))
{
ThreadHints.onSpinWait();
Thread.onSpinWait();
}
}

Expand All @@ -168,7 +167,7 @@ private Integer sendBurst(final PerThreadState state)
break;
}

ThreadHints.onSpinWait();
Thread.onSpinWait();
}

return value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import org.agrona.concurrent.ringbuffer.ManyToOneRingBuffer;
import org.agrona.concurrent.ringbuffer.RingBuffer;
import org.agrona.concurrent.ringbuffer.RingBufferDescriptor;
import org.agrona.hints.ThreadHints;
import org.openjdk.jmh.annotations.*;

import java.nio.ByteBuffer;
Expand Down Expand Up @@ -141,7 +140,7 @@ public void onMessage(final int msgTypeId, final MutableDirectBuffer buffer, fin
final Queue<Integer> responseQueue = responseQueues[value];
while (!responseQueue.offer(SENTINEL))
{
ThreadHints.onSpinWait();
Thread.onSpinWait();
}
}
}
Expand Down Expand Up @@ -181,7 +180,7 @@ private Integer sendBurst(final PerThreadState state)
tempBuffer.putInt(0, value);
while (!ringBuffer.write(1, tempBuffer, 0, BitUtil.SIZE_OF_INT))
{
ThreadHints.onSpinWait();
Thread.onSpinWait();
}
}

Expand All @@ -194,7 +193,7 @@ private Integer sendBurst(final PerThreadState state)
break;
}

ThreadHints.onSpinWait();
Thread.onSpinWait();
}

return value;
Expand Down