Post

Replies

Boosts

Views

Activity

What does the number key means in log-power-timestamp.session
I get a log-power session from my iPhone analyze, I want to know the power consuming of my app, power_metrics as below: "power_metrics" : { "network_io" : { "cellular" : { "totalUpload" : 4478468, "totalDownload" : 223284091 }, "wifi" : { "totalUpload" : 195605789, "totalDownload" : 1233202961 } }, "display_apl" : { "totalFrameCount" : 209019, "averagePixelLuminance" : 38 }, "app_energy" : { "bg_audio" : { "10" : 563, "6" : 70, "4" : 25, "2" : 26, "7" : 236, "11" : 577 }, "bg" : { "10" : 15501, "6" : 1931, "4" : 689, "2" : 725, "7" : 6504, "11" : 15878 }, "fg" : { "7" : 137056, "3" : 3069, "11" : 334589, "4" : 14555, "1" : 505774, "6" : 40718, "2" : 15294, "10" : 326637 }, "total" : { "7" : 143797, "3" : 3069, "11" : 351045, "4" : 15270, "1" : 505774, "6" : 42720, "2" : 16046, "10" : 342702 } }, "app_time" : { "GPU" : 503, "CPU" : 2479, "bg_unplugged" : { "audio" : 6, "location_audio" : 0, "total" : 171, "location" : 0 }, "fg_total" : 3492, "fg_unplugged" : 3492, "cellular_condition" : { "signalBarUnknown" : 0, "signalBar1" : 91, "signalBar0" : 0, "signalBar4" : 2282, "signalBar3" : 1060, "signalBar2" : 341 }, "bg_total" : { "audio" : 6, "location_audio" : 0, "total" : 171, "location" : 0 } } }, The key 10, 6, 4, 2, 7, 11 means what? "10" : 563, "6" : 70, "4" : 25, "2" : 26, "7" : 236, "11" : 577
1
0
1.3k
Feb ’23
-[MPVolumeView initWithFrame:style:] block main thread
MediaPlayer -[MPVolumeView initWithFrame:style:] + 80 MediaPlayer -[MPVolumeView _initWithStyle:] + 124 MediaPlayer -[MPAVLightweightRoutingController initWithName:] + 140 AVFCore -[AVOutputDeviceDiscoverySession initWithDeviceFeatures:] + 84 I get an application Not Responding problem by capturing function call stack every runloop(1/60s frequency) and get same call stack at about 5 second. MediaPlayer -[MPVolumeView initWithFrame:style:] + 80 MediaPlayer -[MPVolumeView _initWithStyle:] + 124 MediaPlayer -[MPAVLightweightRoutingController initWithName:] + 140 AVFCore -[AVOutputDeviceDiscoverySession initWithDeviceFeatures:] + 84 AVFCore -[AVFigRouteDiscovererOutputDeviceDiscoverySessionFactory outputDeviceDiscoverySessionOfClass:withDeviceFeatures:] + 216 AVFCore -[AVFigRouteDiscovererOutputDeviceDiscoverySessionImpl initWithFigRouteDiscovererCreator:syncController:] + 156 AVFCore _AVFigRouteDiscovererFactoryCreateRouteDiscovererWithType + 132 AVFCore -[AVFigRemoteRouteDiscovererFactory createRouteDiscovererWithAllocator:options:] + 40 MediaExperience _FigRouteDiscovererXPCRemoteCreate + 912 CoreMedia _FigXPCRemoteClientSendSyncMessageCreatingReply + 40 libxpc.dylib _xpc_connection_send_message_with_reply_sync + 228 libdispatch.dylib _dispatch_mach_send_with_result_and_wait_for_reply + 60 libdispatch.dylib __dispatch_mach_send_and_wait_for_reply + 532 libsystem_kernel.dylib _mach_msg + 72 libsystem_kernel.dylib _mach_msg_trap + 8``` It seems that sync waiting for a xpc reply, I want to solve this by call `-[MPAVLightweightRoutingController initWithName:]` on a background thread, but it's call from `-[MPVolumeView initWithFrame:style:]`, I can not create UIView object from background thread. I have no idea about how to solve this.
2
0
975
Oct ’22