Skip to content

abchau/java-perv

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Perversions

Various java-related perversions. Do not try this in production. Unless you absolutely have to, or just feel like it, in which case totally do!

labs-time

A tool that tries to empirically estimate the precision of various ways to bide your time in java.

Usage:

cd labs-8/
gradle clean shadow
java -XX:-UseBiasedLocking -cp build/libs/perverted-labs-0.1.jar ru.gvsmirnov.perv.labs.time.PrecisionTest

To make sure that you are not getting rubbish results due to internal VM activity, run it with

java -XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions -verbose:gc -XX:+PrintInlining -XX:+PrintSafepointStatistics -XX:PrintSafepointStatisticsCount=1 -cp build/libs/perverted-labs-0.1.jar ru.gvsmirnov.perv.labs.time.PrecisionTest -v

The precision may be affected by both resolution and by invocation cost. Use this command to estimate the invocation cost:

java -cp build/libs/perverted-labs-0.1.jar org.openjdk.jmh.Main "ru.gvsmirnov.perv.labs.time.*" -f -tu us -bm sample

labs-concurrency

Various investigations related to concurrency (e.g. http://gvsmirnov.ru/blog/tech/2014/02/10/jmm-under-the-hood.html)

labs-jit

Messing with JIT, see here:

About

Don't try this in production

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 98.1%
  • C 1.9%