-
Notifications
You must be signed in to change notification settings - Fork 4
/
INSTALL
45 lines (38 loc) · 2.76 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
1. Installation Prerequisites
a. Install Oracle/OpenJDK and Apache Maven.
b. cp set_env.template set_env
c. Modify set_env to make JXPerf_HOME, JAVA_HOME and MAVEN_HOME point to your JXPerf, Java and Maven home.
d. source set_env
2. Installation
a. make
3. Uninstallation
a. make clean
4. To run dead store detection
a. LD_PRELOAD=$JXPerf_HOME/build/libpreload.so java -agentpath:$JXPerf_HOME/build/libagent.so=DeadStore::MEM_UOPS_RETIRED:ALL_STORES:precise=2@<sampling rate> -cp <classpath> <java program>
b. python $JXPerf_HOME/script/process_raw_data.py
1) A dump file named "agent-data" would be generated
5. To run silent store detection
a. LD_PRELOAD=$JXPerf_HOME/build/libpreload.so java -agentpath:$JXPerf_HOME/build/libagent.so=SilentStore::MEM_UOPS_RETIRED:ALL_STORES:precise=2@<sampling rate> -cp <classpath> <java program>
b. python $JXPerf_HOME/script/process_raw_data.py
1) A dump file named "agent-data" would be generated
6. To run silent load detection
a. LD_PRELOAD=$JXPerf_HOME/build/libpreload.so java -agentpath:$JXPerf_HOME/build/libagent.so=SilentLoad::MEM_UOPS_RETIRED:ALL_LOADS:precise=2@<sampling rate> -cp <classpath> <java program>
b. python $JXPerf_HOME/script/process_raw_data.py
1) A dump file named "agent-data" would be generated
7. To run data centric analysis
a. LD_PRELOAD=$JXPerf_HOME/build/libpreload.so java -javaagent:$JAVA_AGENT -agentpath:$JXPerf_HOME/build/libagent.so=DataCentric::MEM_LOAD_UOPS_RETIRED:L1_MISS:precise=2@<sampling rate> -cp <classpath> <java program>
b. python $JXPerf_HOME/script/process_raw_data.py
1) A dump file named "agent-data" would be generated, which includes two metrics: "Allocation Times" and "L1 Cache Misses"
a) The metric "Allocation Times" reports allocation times for every object, which is represented with the object allocation site
b) The metric "L1 Cache Misses" reports a pair of calling context (i.e., <allocation site, access site>) for every object incurring L1 cache misses
c) To analyze memory bloat
(1) Identify the objects suffering from high L1 cache misses by looking into the metric "L1 Cache Misses"
(2) Check whether these objects have high allocation times by looking into the metric "Allocation Times"
(3) The objects having both high L1 cache misses and allocation times are primary optimization candidates
8. Attach to a running JVM
a. Open run_attach.sh and change MODE to one of below modes:
DataCentric::MEM_LOAD_UOPS_RETIRED:L1_MISS:precise=2@<sampling rate>
DeadStore::MEM_UOPS_RETIRED:ALL_STORES:precise=2@<sampling rate>
SilentStore::MEM_UOPS_RETIRED:ALL_STORES:precise=2@<sampling rate>
SilentLoad::MEM_UOPS_RETIRED:ALL_LOADS:precise=2@<sampling rate>
b. ./run_attach.sh <pid> <running time in seconds>