Create, Save, and Open Trace Documents

Create, Save, and Open Trace Documents

在仪器中,所有的工作都是在跟踪文档中完成的,其中包含一组工具、它们的配置设置和它们收集的数据。一旦您使用跟踪文档来配置应用程序,就可以保存文档以保存收集的跟踪数据,并稍后再打开以便查看和分析。In Instruments, all work is done in a trace document, which contains a set of instruments, their configured settings, and the data they have collected. Once you profile an app with a trace document, you can save the document to preserve the trace data you have gathered and open it again later for viewing and analysis.

关于仿形模板About Profiling Templates

当设备启动时,它提供了一个分析模板(见图6-1)。每个模板包含一组工具,这些工具通常用于分析应用程序并收集有用信息,以帮助识别问题或提高应用程序的效率。When Instruments first starts up, it provides a list of profiling templates (see Figure 6-1). Each template contains a collection of instruments that are commonly used together to analyze an app and gather useful information in order to help identify problems or make your app more efficient.

Figure 6-1The profiling template selection dialog

如果需要为特定目的收集数据,您应该计划使用分析模板作为起点。例如,如果要检查内存问题的应用程序,应该选择与内存相关的模板,如分配、泄漏或僵尸。在使用模板创建跟踪文档之后,您可以随时添加或删除单个工具或重新配置工具。You should plan to use a profiling template as a starting point whenever you need to collect data for a particular purpose. For example, if you want to check your app for memory problems, you should choose a memory-related template, such as Allocations, Leaks, or Zombies. After using a template to create a trace document, you can always add or remove individual instruments, or reconfigure instruments, as needed.

有关可用模板及其所包含的工具的完整列表,请参见分析模板。For a complete list of available templates and the instruments they contain, see Profiling Templates.

创建跟踪文档Create a Trace Document

您需要创建跟踪文档以开始使用工具进行分析。You need to create a trace document to begin profiling with Instruments.

创建跟踪文档To create a trace document

  1. 运载工具。Launch Instruments.
  2. 在出现的分析模板选择对话框中,选择目标设备和进程。In the profiling template selection dialog that appears, select a target device and process.

  3. 选择所需的分析模板。Select the desired profiling template.

  4. Click Choose.

创建一个新的文档与预先设定的工具由您所选择的模板。A new document is created with the preconfigured instruments from the template you chose.

TIP

要在创建跟踪文档后自动开始对应用程序进行即时分析,请在分析模板选择对话框中按住选项键。执行此操作时,“选择”按钮会更改为配置文件。单击概要文件创建文档并立即开始分析。To automatically begin profiling your app immediately after creating the trace document, hold down the Option key in the profiling template selection dialog. When you do this, the Choose button changes to Profile. Click Profile to create the document and initiate profiling right away.

如果您找不到满足您需要的模板,或者只想从头创建自己的模板,请在剖析模板选择对话框中选择空白模板。If you can’t find a template to meet your needs or you just want to create your own from scratch, select the Blank template in the profiling template selection dialog.

保存跟踪文档Save a Trace Document

创建跟踪文档后,可以保存它以备以后参考。仪器将跟踪文档保存为跟踪扩展的工具跟踪文件。Once you’ve created a trace document, you can save it for later reference. Instruments saves trace documents as Instruments trace files with the .trace extension.

To save a trace document

  1. Create a trace document. See To create a trace document.
  2. Choose File > Save. Or, choose File > Save As if you want to save a previously saved trace document as a new file.

  3. Enter a name for the file.

  4. Choose a destination for the file.
  5. Click Save.

保存跟踪文档作为分析模板Save a Trace Document as a Profiling Template

如果您创建了一个跟踪文档,您认为您可能需要再次分析其他应用程序,您可以将其保存为一个自定义模板,这样每次运行工具时不必重新创建它。If you create a trace document you think you might need again for profiling other apps, you can save it as a custom template so you don’t have to recreate it each time you run Instruments.

将跟踪文档保存为分析模板To save a trace document as a profiling template

  1. Create or open a trace document. See To create a trace document.
  2. Choose File > Save As Template.

  3. Enter a name for the template.

  4. Choose a destination for the template.

    将您的模板保存在用户/目录/应用程序支持/工具/模板目录中,以便在工具模板窗口的自定义部分中使用它。这是“保存为模板”对话框中的默认目录。Save your template in the /Users/<username>/Library/Application Support/Instruments/Templates directory to make it available in the custom section of the Instruments template window. This is the default directory in the Save As Template dialog.

  5. Select an icon for the template.
  6. Enter a description for the template.
  7. Click Save.

    保存模板后,它会自动出现在分析模板选择对话框中,并与自定义模板分组。下次创建跟踪文档时,可以选择它作为起始点。Once you save a template, it automatically appears in the profiling template selection dialog, grouped with the Custom templates. Next time you create a trace document, you can select it as your starting point.

Close a Trace Document

To close an opened trace document

  1. Choose File > Close (or press Command-W).

  2. If your document contains unsaved data, select whether to save the updated document.

The document closes.

Open a Trace Document

To open a saved trace document

Do one of the following:

  • Double-click the .trace document file in the Finder.

  • Drag the .trace document file onto the Instruments app icon.

  • Open Instruments and perform the following steps:
    1. Choose File > Open (or press Command-O).

    2. Locate a saved .trace document file.

    3. Click Open.

The trace document opens in Instruments.

时间: 2024-08-02 11:10:35

Create, Save, and Open Trace Documents的相关文章

SP2-0110: Cannot create save file &quot;afiedt.buf&quot;

sp2-0110:无法创建保存文件"afiedt.buf" 出处:此问题是由于使用 define _editor=vim 时,用ed更改时报错 问题原因:Cannot create save file "afiedt.buf" 因为在执行 edit的时候 "afiedt.buf" 文件默认保存在你键入sqlplus命令时所在目录中 比如:你在 / 目录下进入sqlplus, 当你用edit时,"afiedt.buf"文件就会保

Instruments User Guide编程指南2-Common Tasks

Launch Instruments  Instruments app在Xcode app的内部,所以最直接的方式启动Instruments就是从Xcode中启动,当然也可以间接通过 Dock, Launchpad,  command line等工具启动. Launch Instruments from Xcode 1:Open Xcode. 2:Choose Xcode > Open Developer Tool > Instruments. 建议:也能够使用该方式启动更多有用的开发工具 T

Getting Around Instruments

Getting Around Instruments Instruments has several key windows and dialogs. Profiling Template Selection Dialog When Instruments launches, you're presented with a list of profiling templates-files containing sets of preconfigured instruments-from whi

Oracle 11g trace events

oracle的events,是我们在做自己的软件系统时可以借鉴的 Oracle 11g trace eventsORA-10001: control file crash event1ORA-10002: control file crash event2ORA-10003: control file crash event3ORA-10004: block recovery testing - internal errorORA-10005: trace latch operations fo

【练习】trace文本重建控制文件

这个小练习是针对控制文件全部丢失后怎么能快速的重建一个控制文件,快速的起库 1.备份控制文件到trace下 SQL> alter database backup controlfile to trace; Database altered. 2.trace文本放在user_dump_dest的路径下 SQL> show parameter dump; NAME TYPE VALUE ------------------------------------ ----------- -------

ios性能测试Instruments

Instruments 用户指南 Instruments用户指南介绍 Instruments 是应用程序用来动态跟踪和分析 Mac OS X 和 iOS 代码的实用工具.这是一个灵活而强大的工具,它让你可以跟踪一个或多个进程,并检查收集的数据.这样,Instruments 可以帮你更好的理解应用程序和操作系统的行为. 使用 Instruments 应用,你可以使用特殊的工具(即 instruments 工具)来跟踪同一进程不同方面的行为.你也可以使用该应用来记录一系列用户界面的动作并响应它们,同

SQL错误码

///////////////////////////////////////////////////////////////ORA-00001: 违反唯一约束条件 (.)ORA-00017: 请求会话以设置跟踪事件ORA-00018: 超出最大会话数ORA-00019: 超出最大会话许可数ORA-00020: 超出最大进程数 ()ORA-00021: 会话附属于其它某些进程:无法转换会话ORA-00022: 无效的会话 ID:访问被拒绝ORA-00023: 会话引用进程私用内存:无法分离会话O

mac 福利 快捷键(英文版)

官方原版:希望能用苹果电脑的同学能喜欢 OS X: Keyboard shortcuts You can use keyboard shortcuts to do things on your Mac by pressing a combination of keys on your keyboard. Using keyboard shortcuts To use a keyboard shortcut, press a modifier key at the same time as a c

SAP BAPI一览 史上最全

全BADI一览  List of BAPI's       BAPI WG Component Function module name Description Description Obj. Type Object name Method name Release Message type   1 RW TR BAPI_SECURITYPRICE_GETDETAIL Security price Import a single security price BUS1099 SecurityP