New Profiler
Svengali Profiler Package
Profilers
Contact David Jones

The New Profiler is a type of activating profiler which records the creation of new instances.

Mechanics

The New Profiler patches the basicNew[:[max:]] methods of Behaviour, so when a new instance is created through the following code:

	Array new: 10

An entry will be recorded indicating that a new Array was created, with an indexed size of 10. The profiler will additionally try and record the user method which made this call. This simply searches back on the current stack, and currently will often simply point to a system method which may not elucidate the context sufficiently.

Restrictions

Objects can be created within Dolphin through the actions of primitives other from that which is called by the basicNew methods. Some examples include Number>>@, the core Float and LargeInteger methods, Object>>shallowCopy. Presently these objects will not be registered, though it could be possible to extend the profiler to also patch those methods which interest you.

A further point is that it may be possible to modify the size of an objects indexed variables after it has been created with the Object>>resize: method. This can be reflected in inaccurate statistics results.

Browsers

The raw collected details are visible in the Profile Browser. A statistical view is provided by the New Statistics view.