Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Per-thread profiling?



Hi,
I tried this on the cocoa-dev list, with not much luck, so am hoping this is a more appropriate forum. If there's a better place (appreciate this is multi-tasking / SMP, not threading as such), then sorry, and can you tell me where that better place is!


I have an app which I'm developing to test various image processing algorithms, and how much of a difference the AltiVec / SMP optimisations made to it. The idea being so that our research group can evaluate different ways of parallelising a certain task, to see which offered best results (on G4 processors and "Apple's next" family of processors, if they change soon).

Whilst actual performance of the algorithms isn't important (in terms of how quickly the kernel schedules them and the clock time when they started/stopped), I'm very interested in how long a given thread took to operate (i.e. active CPU time during it's life). In other words, I'm after per-thread profiling, built into the app itself (not using another app like Sampler, for instance), that's irrespective of how many other things you're running (as it only measures the active CPU time), and irrespective of the 'nice' value for the thread etc.

I've looked at using NSThreads, but, whilst the easiest route for multithreading, they don't seem to have much in the way of performance analysis; what's the best way of doing this in Obj-C / Cocoa / C? I'm guessing using pthreads would offer more in the way of performance analysis than NSThreads, but am open to suggestions.

All I need to have as results is:

Thread1 took X milliseconds to perform [self processImage]
Thread2 took Y milliseconds to perform [self processImage]
Thread3 took Z milliseconds to perform [self processImage]

Thanks in advance for any tips / leads,
Ken

- - - - - - - - - -
Ken Tabb
Mac & UNIX Technical bloke (C, C++, Obj-C, Java) - Health & Human Sciences
Machine Vision & Neural Network researcher bloke - Computer Science Dept
University of Hertfordshire, UK
http://www.health.herts.ac.uk/ken/

Certified non-Microsoft Solution Provider
_______________________________________________
mt-smp mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/mt-smp
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.