Re: [rvm-research] ask a question about the replay mode

Michael Bond <[email protected]>
Newsgroups gmane.comp.java.jikes.rvm.devel
Message-ID <[email protected]>
Hi Chenxi,

You can also add -X:opt:verbose=true to the command line to see which 
methods the opt compiler is compiling (to cross-check that your printlns 
are executing at all of the expected times).

Which config are you building -- I guess it's FullAdaptive or 
FastAdaptive since BC2HIRCounter is already large when Jikes RVM starts 
running?

Have you made any other changes to Jikes RVM? It's possible the opt 
compiler thread is getting stuck when compiling some method, so it never 
gets to compile any other methods after that.

Cheers,
Mike

On 08/31/2015 10:24 AM, 王晨曦 wrote:
> hi,everyone
>
> I have some doubts about the AOS and opt Compiler.
>
> according to the masterPlan’s initializer:
>
>    private static void initializeMasterPlan() {
>      ArrayList<OptimizationPlanElement> temp = new ArrayList<OptimizationPlanElement>();
>      BC2HIR(temp);
>      HIROptimizations(temp);
>      HIR2LIR(temp);
>      LIROptimizations(temp);
>      MIROptimizationPlanner.intializeMasterPlan(temp);
>      masterPlan = toArray(temp);
>    }
>
>
> the BC2HIR is a basic composite plan and has an optimizing Plan element: new ConvertBCtoHIR(),
> This optPlanElement will be invoked in any opt level. (0 1 2 3)
> I have inserted some print functions in the ConvertBCtoHIR’s perform() function, and run the rvm on dacapo:
> rvm  -Xmx1024M   -jar dacapo-9.12-bach.jar   -n 5  $bench
>
> insert VM.sysWrite in ConvertBCtoHIR’s perform():
>
>    public void perform(IR ir) {
>      // Generate the cfg into gc
>      GenerationContext gc = new GenerationContext(ir.method, ir.params, ir.compiledMethod, ir.options, ir.inlinePlan);
>      BC2IR.generateHIR(gc);
>      // Transfer HIR and misc state from gc to the ir object
>      ir.gc = gc;
>      ir.cfg = gc.getCfg();
>      ir.regpool = gc.getTemps();
>      if (gc.requiresStackFrame()) {
>        ir.stackManager.forceFrameAllocation();
>      }
>
>      ir.IRStage = IR.HIR;
>      ir.HIRInfo = new HIRInfo(ir);
>      
>      //debug
>      BC2HIRCounter++;
>      VM.sysWrite("In ConvertBCtoHIR:perform() :BC2HIRCounter:");
>      VM.sysWriteln(BC2HIRCounter);
>      VM.sysWrite("optLevel:");
>      VM.sysWriteln(ir.options.getOptLevel());
>      
>    }
>
>
> but only in few warmups(such the sunflowers first warmup) the print functions run ,and the ir.options.getOptLevel always 0.
> In my opinion, as long as the opt compiler run, the ConvertBC2toHIR’s perform() will run.
> if any warmup's performance promotes, the inserted VM.sysWrite will print the compiled methods’ opt level.
>
>    6 ===== DaCapo bloat starting warmup =====
>    7 In ConvertBCtoHIR:perform() :BC2HIRCounter:21949
>    8 optLevel:0
>    9 Optimized with: EDU.purdue.cs.bloat.optimize.Main -only EDU.purdue.cs.bloat.trans -pre -dce -diva -prop -stack-alloc -peel-loops all -f EDU.purdue.cs.bloat    .trans.CompactArrayInitializer ./scratch/optimizedcode
>   10 ===== DaCapo bloat completed warmup in 9497 msec =====
>   11 ===== DaCapo bloat starting warmup =====
>   12 Optimized with: EDU.purdue.cs.bloat.optimize.Main -only EDU.purdue.cs.bloat.trans -pre -dce -diva -prop -stack-alloc -peel-loops all -f EDU.purdue.cs.bloat    .trans.CompactArrayInitializer ./scratch/optimizedcode
>   13 ===== DaCapo bloat completed warmup in 9706 msec =====
>   14 ===== DaCapo bloat starting warmup =====
>   15 Optimized with: EDU.purdue.cs.bloat.optimize.Main -only EDU.purdue.cs.bloat.trans -pre -dce -diva -prop -stack-alloc -peel-loops all -f EDU.purdue.cs.bloat    .trans.CompactArrayInitializer ./scratch/optimizedcode
>   16 ===== DaCapo bloat completed warmup in 8634 msec =====
>   17 ===== DaCapo bloat starting warmup =====
>   18 Optimized with: EDU.purdue.cs.bloat.optimize.Main -only EDU.purdue.cs.bloat.trans -pre -dce -diva -prop -stack-alloc -peel-loops all -f EDU.purdue.cs.bloat    .trans.CompactArrayInitializer ./scratch/optimizedcode
>   19 ===== DaCapo bloat completed warmup in 9640 msec =====
>   20 ===== DaCapo bloat starting =====
>   21 Optimized with: EDU.purdue.cs.bloat.optimize.Main -only EDU.purdue.cs.bloat.trans -pre -dce -diva -prop -stack-alloc -peel-loops all -f EDU.purdue.cs.bloat    .trans.CompactArrayInitializer ./scratch/optimizedcode
>   22 ===== DaCapo bloat PASSED in 8365 msec =====
>
>
> 113 dacapo-9.12-bach
> 114 ===== DaCapo 9.12 luindex starting warmup 1 =====
> 115 ===== DaCapo 9.12 luindex completed warmup 1 in 3655 msec =====
> 116 ===== DaCapo 9.12 luindex starting warmup 2 =====
> 117 ===== DaCapo 9.12 luindex completed warmup 2 in 3394 msec =====
> 118 ===== DaCapo 9.12 luindex starting warmup 3 =====
> 119 ===== DaCapo 9.12 luindex completed warmup 3 in 3467 msec =====
> 120 ===== DaCapo 9.12 luindex starting warmup 4 =====
> 121 ===== DaCapo 9.12 luindex completed warmup 4 in 3468 msec =====
> 122 ===== DaCapo 9.12 luindex starting =====
> 123 ===== DaCapo 9.12 luindex PASSED in 3383 msec =====
> 124 Using scaled threading model. 24 processors detected, 24 threads used to drive the workload, in a possible range of [1,256]
> 125 Header Chunk. Image width:256 height:256 depth:8 color type:2 compression type:0 filter type:0 interlace:0
> 126 ===== DaCapo 9.12 sunflow starting warmup 1 =====
> 127 In ConvertBCtoHIR:perform() :BC2HIRCounter:21949
> 128 optLevel:0
> 129 In ConvertBCtoHIR:perform() :BC2HIRCounter:21950
> 130 optLevel:0
> 131 In ConvertBCtoHIR:perform() :BC2HIRCounter:21951
> 132 optLevel:0
> 133 ===== DaCapo 9.12 sunflow completed warmup 1 in 23058 msec =====
> 134 Header Chunk. Image width:256 height:256 depth:8 color type:2 compression type:0 filter type:0 interlace:0
> 135 ===== DaCapo 9.12 sunflow starting warmup 2 =====
> 136 ===== DaCapo 9.12 sunflow completed warmup 2 in 22284 msec =====
> 137 Header Chunk. Image width:256 height:256 depth:8 color type:2 compression type:0 filter type:0 interlace:0
> 138 ===== DaCapo 9.12 sunflow starting warmup 3 =====
> 139 ===== DaCapo 9.12 sunflow completed warmup 3 in 22401 msec =====
> 140 Header Chunk. Image width:256 height:256 depth:8 color type:2 compression type:0 filter type:0 interlace:0
> 141 ===== DaCapo 9.12 sunflow starting warmup 4 =====
> 142 ===== DaCapo 9.12 sunflow completed warmup 4 in 22678 msec =====
> 143 Header Chunk. Image width:256 height:256 depth:8 color type:2 compression type:0 filter type:0 interlace:0
> 144 ===== DaCapo 9.12 sunflow starting =====
> 145 ===== DaCapo 9.12 sunflow PASSED in 21277 msec =====
> 146 Using scaled threading model. 24 processors detected, 24 threads used to drive the workload, in a possible range of [1,100]
> 147 In ConvertBCtoHIR:perform() :BC2HIRCounter:21949
> 148 optLevel:0
> 149 ===== DaCapo 9.12 xalan starting warmup 1 =====
> 150 Normal completion.
> 151 ===== DaCapo 9.12 xalan completed warmup 1 in 4354 msec =====
> 152 ===== DaCapo 9.12 xalan starting warmup 2 =====
> 153 Normal completion.
> 154 ===== DaCapo 9.12 xalan completed warmup 2 in 3891 msec =====
> 155 ===== DaCapo 9.12 xalan starting warmup 3 =====
> 156 Normal completion.
> 157 ===== DaCapo 9.12 xalan completed warmup 3 in 3862 msec =====
> 158 ===== DaCapo 9.12 xalan starting warmup 4 =====
> 159 Normal completion.
> 160 ===== DaCapo 9.12 xalan completed warmup 4 in 3867 msec =====
> 161 ===== DaCapo 9.12 xalan starting =====
> 162 Normal completion.
> 163 ===== DaCapo 9.12 xalan PASSED in 3812 msec =====
>
> Why bloat,luindex, xalan almost has nothing to print ?
> what’s wrong in my idea?
>
> Chenxi Wang
>
>
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Jikesrvm-researchers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers


------------------------------------------------------------------------------
_______________________________________________
Jikesrvm-researchers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.