Questions about how to use persistent code cache correctly in JDK-8u40
kcholera at linkedin.com
Wed Mar 11 01:32:01 UTC 2015
Hello Nahsorn dev team,
I have three questions around persistent code cache usage -
1. Am I using the persistent code cache feature correctly by just specifying the -pcc=true parameter ?
2. Can these compiled scripts under nashorn_code_cache be used across different machines or different nashorn instances on the same machine? if so how can we specify to Nashorn to reuse an existing code cache folder when it starts up? There is a flag -Dnashorn.persistent.code.cache to specify where the code cache should be generated, but I could not find a way to specify to Nashorn where to pick up existing code cache.
3. Does the compiled code change after many executions because of any optimization? If so how can we reuse this compiled code cache across different machines ?
Steps to reproduce these performance numbers -
Download this zip https://drive.google.com/file/d/0B5PpdCJ7YycqMWlVQ0FsNlozcTA/view?usp=sharing which has the following four files
1. bench.js - the benchmarking script
3. hp.json - the data we want to use while executing our script hp.js
4. dust-full.js - library needed to execute hp.js script
I am using "1.8.0_40-ea" Java(TM) SE Runtime Environment (build 1.8.0_40-ea-b25 on 8 core redhat linux machine ).
More information about the nashorn-dev