从etm读出来的trace数据怎么解析?

arm的开发工具ds以及ds5,安装目录的examples目录下有个coresight access library目录,里面提供了配置coresight组件,以及从etb获取指令trace的接口,请问最后从etb data register读取出来的trace.bin二进制文件怎么解析呢?我看ds工具下的trace视图只能看调试运行时生成的trace,没法从外部导入解析!

Parents
  • Analyzing the collected trace in DS-5 (v5.21 onwards)
    ----------------------------------------------------

    The files created by `tracedemo`, after copying to the host, can be loaded into DS-5 Debugger to analyze the collected trace as follows:

    1. Launch Eclipse for DS-5.
    2. From the **Window** menu, select **Perspective** -> **Open Perspective** -> **DS-5 Debug**.
    3. From the **Run** menu, select **Debug Configurations...**.
    4. In the **Debug Configurations** dialog, open the **DS-5 Debugger** node.
    5. Create a new debug configuration and give it a name.
    6. In the **Debugger** tab click the **Connect only** radio button.
    7. In the **Connection** tab tree view, open the **Generic** platform, then select **SnapShot** -> **View Snapshot** -> **View Snapshot**.
    8. In the Connection field below, enter the path to the top-level snapshot contents file `snapshot.ini`.
    You can use the **File...** button to navigate to the file.

    To load the ready-made example files, specify e.g.

    `.../DS-5 Workspace/CoreSight_access/example_captures/Snowball/snapshot.ini`.
    9. To view the disassembly and trace augmented with symbols (e.g. function names), the `vmlinux` file for the kernel must be given.

    In the **Files** tab, select **Load symbols from file**, and use the **File System...** or **Workspace...** buttons to navigate to the `vmlinux` file.

    10. In cases where the kernel modifies itself, you can force DS-5 Debugger to use program code from `kernel_dump.bin` rather than `vmlinux`.

    In the **Debugger** tab, tick **Execute debugger commands**, and add `set trust-ro-sections-for-opcodes off` to its field

    11. Press **Debug**.

Reply
  • Analyzing the collected trace in DS-5 (v5.21 onwards)
    ----------------------------------------------------

    The files created by `tracedemo`, after copying to the host, can be loaded into DS-5 Debugger to analyze the collected trace as follows:

    1. Launch Eclipse for DS-5.
    2. From the **Window** menu, select **Perspective** -> **Open Perspective** -> **DS-5 Debug**.
    3. From the **Run** menu, select **Debug Configurations...**.
    4. In the **Debug Configurations** dialog, open the **DS-5 Debugger** node.
    5. Create a new debug configuration and give it a name.
    6. In the **Debugger** tab click the **Connect only** radio button.
    7. In the **Connection** tab tree view, open the **Generic** platform, then select **SnapShot** -> **View Snapshot** -> **View Snapshot**.
    8. In the Connection field below, enter the path to the top-level snapshot contents file `snapshot.ini`.
    You can use the **File...** button to navigate to the file.

    To load the ready-made example files, specify e.g.

    `.../DS-5 Workspace/CoreSight_access/example_captures/Snowball/snapshot.ini`.
    9. To view the disassembly and trace augmented with symbols (e.g. function names), the `vmlinux` file for the kernel must be given.

    In the **Files** tab, select **Load symbols from file**, and use the **File System...** or **Workspace...** buttons to navigate to the `vmlinux` file.

    10. In cases where the kernel modifies itself, you can force DS-5 Debugger to use program code from `kernel_dump.bin` rather than `vmlinux`.

    In the **Debugger** tab, tick **Execute debugger commands**, and add `set trust-ro-sections-for-opcodes off` to its field

    11. Press **Debug**.

Children
No data