Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 1.46 KB

README.md

File metadata and controls

51 lines (38 loc) · 1.46 KB

ICSampler: Inline Cache Sampling Tool

Preparation/Installation

  1. Launch the image with large code size and a large eden size to avoid code compactions and garbage collections. They add noise to the measurements.
$ vm --codeSize=20M --edenSize=100M Pharo.image --interactive
  1. Load the code using Iceberg
  2. Tune the GC to minimize noise
Metacello new
	baseline: 'VMTunning';
	repository: 'github://pharo-project/pharo-vm-tunning';
	load.
	
GCConfiguration readFromVM
	growthHeadroom: 100 * 1024 * 1024;
   fullGCRatio: 1;
	shrinkThreadshold: 1024;
   writeToVM.

Usage

ICSampler new
	sample: [ 'Microdown-Tests' asPackage testSuite run ]
	period: 20 milliSeconds.

ICSampler new
	sample: [ 
		'Roassal3-Global-Tests' asPackage testSuite run.
		'Roassal3-Global-Tests' asPackage testSuite run ]
	period: 200 milliSeconds.

Inspecting the results

The ICSampler class contains several useful methods for querying and plotting.

  • chartSampleCount plots the number of methods that are JIT compiled per sample

imagen

  • chartCallsiteTypeCount charts the the number of mono/poly/mega-morphic callsits per sample

imagen

Other useful methods are in the query protocol.