How to find out what mach_msg_trap waits for?

后端 未结 2 1179
时光取名叫无心
时光取名叫无心 2020-12-25 11:21

I a profiling my iPhone application on target, and according to Instruments 65% of the time is spent in mach_msg_trap.

I have a background thread that r

2条回答
  •  感情败类
    2020-12-25 11:36

    Turn out my app is not actually spending 65% of it's time in the mach_msg_trap function. It was a configuration error in Instruments on my part.

    The Sampler tool defaults to All Sample Counts, this will measure all threads regardless of their state.

    Instead switch to Running Sample Times that will reflect the current actual workload. Screenshot of Instruments http://developer.apple.com/library/mac/qa/qa2009/images/qa1619_running_sample_times.png

提交回复
热议问题