openjdk-mirror / jdk Goto Github PK
View Code? Open in Web Editor NEWSingle git repo mirroring a myriad of mercurial jdk repos
Single git repo mirroring a myriad of mercurial jdk repos
Is this project stalled? Need any help with this?
I got a lot of this kind of thread dump during a load test:
"catalina-exec-458" #26857 daemon prio=5 os_prio=0 tid=0x00007f56a01ab800 nid=0x2517 waiting for monitor entry [0x00007f53d38f7000]
java.lang.Thread.State: BLOCKED (on object monitor)
at java.nio.charset.CoderResult$Cache.get(CoderResult.java:201)
- waiting to lock <0x00000005c0e89b58> (a java.nio.charset.CoderResult$1)
at java.nio.charset.CoderResult$Cache.access$200(CoderResult.java:194)
at java.nio.charset.CoderResult.malformedForLength(CoderResult.java:236)
at sun.nio.cs.UTF_8$Decoder.malformedN(UTF_8.java:147)
at sun.nio.cs.UTF_8$Decoder.decode(UTF_8.java:473)
at java.lang.StringCoding$StringDecoder.decode(StringCoding.java:153)
at java.lang.StringCoding.decode(StringCoding.java:193)
at java.lang.StringCoding.decode(StringCoding.java:254)
at java.lang.String.<init>(String.java:546)
at java.lang.String.<init>(String.java:566)
The cache has a synchronized method get(int len). Can we optimize this? Replace this with a lock-free cache?
private static abstract class Cache {
private Map<Integer,WeakReference<CoderResult>> cache = null;
protected abstract CoderResult create(int len);
private synchronized CoderResult get(int len) {
if (len <= 0)
throw new IllegalArgumentException("Non-positive length");
Integer k = new Integer(len);
WeakReference<CoderResult> w;
CoderResult e = null;
if (cache == null) {
cache = new HashMap<Integer,WeakReference<CoderResult>>();
} else if ((w = cache.get(k)) != null) {
e = w.get();
}
if (e == null) {
e = create(len);
cache.put(k, new WeakReference<CoderResult>(e));
}
return e;
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.