Dtrace Probe for Global Collector Promotion 2009/12/09

I’m working through my list of Radars to file, can you tell?

In 10.6 we have the snazzy new thread-local collector, which promises to increase the performance of threaded & collected apps. Part of this is machinery in libauto/CF to promote blocks out of the thread-local collector to the global collector when a write barrier detects a reference from global memory to something that was previously thread-local.

Faster apps sound great, but so far it is hard for me to tell how much thread-local collection buys or even how well I’m using it. This would be easier to check if there was a dtrace probe to detect the local→global promotion and an Instruments tool to show hot spots of objects escaping from thread-local collection.

In the source to autozone, we can see an inline in AutoSubzone:

inline void make_global(usword_t q) {
    unsigned char data = _side_data[q];
    data &= ~(refcount_mask | age_mask);
    data |= global_bit | (youngest_age << age_mask_log2);
    _side_data[q] = data;
    AUTO_PROBE(auto_probe_make_global(quantum_address(q), youngest_age));

Sadly, AUTO_PROBE here is for the testing infrastructure within autozone and isn’t exposed as a dtrace probe.

Feel free to reference Radar #7459539 if you’d also like to see this in Instruments!

blog comments powered by Disqus