Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 990319d7982e
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 42a0ea377e3c
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Sep 11, 2016

  1. Copy the full SHA
    52c80b7 View commit details
  2. Unused import.

    headius committed Sep 11, 2016
    Copy the full SHA
    42a0ea3 View commit details
Showing with 4 additions and 4 deletions.
  1. +4 −3 core/src/main/java/org/jruby/runtime/profile/builtin/ProfiledMethods.java
  2. +0 −1 core/src/main/java/org/jruby/util/EmptyFileResource.java
Original file line number Diff line number Diff line change
@@ -30,20 +30,21 @@
import org.jruby.common.IRubyWarnings;
import org.jruby.common.RubyWarnings;
import org.jruby.internal.runtime.methods.DynamicMethod;
import org.jruby.util.collections.NonBlockingHashMapLong;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

/**
* This is a collection af all methods which will be profiled.
* Current it's just a wrapper for a {@link java.util.concurrent.ConcurrentMap},
* Current it's just a wrapper for a {@link NonBlockingHashMapLong},
* but the implementation can be changed in the future without changing the interface.
*
* @author Andre Kullmann
*/
public class ProfiledMethods {

private final ConcurrentMap<Long,ProfiledMethod> methods;
private final NonBlockingHashMapLong<ProfiledMethod> methods;

private final Ruby runtime;

@@ -54,7 +55,7 @@ public ProfiledMethods( final Ruby runtime ) {

this.runtime = runtime;
// TODO is 10000 a good value ?
this.methods = new ConcurrentHashMap<Long,ProfiledMethod>(10000);
this.methods = new NonBlockingHashMapLong<>(10000);
}

private Ruby getRuntime() {
1 change: 0 additions & 1 deletion core/src/main/java/org/jruby/util/EmptyFileResource.java
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@

import jnr.constants.platform.Errno;
import jnr.posix.FileStat;
import jnr.posix.POSIX;
import org.jruby.util.io.ModeFlags;
import java.io.InputStream;