OSX stackshot格式

时间:2015-12-15 00:05:20

标签: macos stack

我有一个stackshot文件,我正在试图弄清楚它里面发生了什么。这是来自其中一个进程的线程(来自WindowServer):

  Thread 0xf09            1000 samples (1-1000)   priority 79 (base 79)   cpu time 0.044s
  1000  thread_start + 13 (libsystem_pthread.dylib + 4981) [0x7fff952b3375]
    1000  _pthread_start + 168 (libsystem_pthread.dylib + 15248) [0x7fff952b5b90]
      1000  _pthread_body + 131 (libsystem_pthread.dylib + 15379) [0x7fff952b5c13]
        1000  thread_fun + 25 (QuartzCore + 129849) [0x7fff816e1b39]
          993  CA::Render::Server::server_thread(void*) + 257 (QuartzCore + 130113) [0x7fff816e1c41]
            993  mach_msg_trap + 10 (libsystem_kernel.dylib + 70534) [0x7fff8f639386]
             *992  ipc_mqueue_receive_continue + 0 (kernel + 828992) [0xffffff80002ca640]
             *1    Thread_continue + 8 (kernel + 1879576) [0xffffff80003cae18]
               *1    thread_continue + 67 (kernel + 1001955) [0xffffff80002f49e3] (running)
          7    CA::Render::Server::server_thread(void*) + 563 (QuartzCore + 130419) [0x7fff816e1d73]
            7    CA::Render::Server::ReceivedMessage::dispatch() + 31 (QuartzCore + 1031139) [0x7fff817bdbe3]
              6    CA::Render::Server::ReceivedMessage::run_command_stream() + 567 (QuartzCore + 1032931) [0x7fff817be2e3]
                5    CA::Render::decode_commands(CA::Render::Decoder*) + 2276 (QuartzCore + 1030108) [0x7fff817bd7dc]
                  3    CA::Render::Context::did_commit(bool, bool) + 76 (QuartzCore + 750372) [0x7fff81779324]
                    2    CA::Render::post_notification(CA::Render::NotificationName, CA::Render::Object*, void*, bool) + 249 (QuartzCore + 104465) [0x7fff816db811]
                      2    contextChanged + 127 (CoreGraphics + 5099842) [0x7fff91bf3142]
                        2    mach_msg_trap + 10 (libsystem_kernel.dylib + 70534) [0x7fff8f639386]
                         *2    hndl_mach_scall64 + 22 (kernel + 2030166) [0xffffff80003efa56]
                           *2    mach_call_munger64 + 410 (kernel + 1817898) [0xffffff80003bbd2a]
                             *2    mach_msg_overwrite_trap + 197 (kernel + 877285) [0xffffff80002d62e5]
                               *2    ipc_kmsg_send + 307 (kernel + 813363) [0xffffff80002c6933]
                                 *2    ipc_mqueue_send + 599 (kernel + 827767) [0xffffff80002ca177]
                                   *2    ipc_mqueue_post + 932 (kernel + 828756) [0xffffff80002ca554] (running)
                    1    CA::Render::post_notification(CA::Render::NotificationName, CA::Render::Object*, void*, bool) + 99 (QuartzCore + 104315) [0x7fff816db77b] (running)
                  1    CA::Render::post_notification(CA::Render::NotificationName, CA::Render::Object*, void*, bool) + 94 (QuartzCore + 104310) [0x7fff816db776] (running)
                  1    CA::Render::post_notification(CA::Render::NotificationName, CA::Render::Object*, void*, bool) + 249 (QuartzCore + 104465) [0x7fff816db811]
                    1    contextDidCommit + 125 (CoreGraphics + 5100116) [0x7fff91bf3254] (running)
                1    CA::Render::decode_commands(CA::Render::Decoder*) + 61 (QuartzCore + 1027893) [0x7fff817bcf35]
                  1    CA::Render::Context::will_commit() + 30 (QuartzCore + 163728) [0x7fff816e9f90]
                    1    CA::Render::post_notification(CA::Render::NotificationName, CA::Render::Object*, void*, bool) + 94 (QuartzCore + 104310) [0x7fff816db776] (running)
              1    CA::Render::Server::ReceivedMessage::run_command_stream() + 683 (QuartzCore + 1033047) [0x7fff817be357]
                1    x_mem_dealloc_chain + 35 (QuartzCore + 54163) [0x7fff816cf393] (running)

标题行声明1000 samples,所以我猜猜堆栈帧前面的数字是采样器在快照中找到该帧的次数的计数?这也可以解释缩进。样本号旁边的*是什么意思?例如,hndle_mach_scall64旁边有*2。这是什么意思?

1 个答案:

答案 0 :(得分:1)

再看一遍,似乎*表示系统调用另一端的代码。