Skip to content

Alamvic/icsampler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Inline Cache Sampling Tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published