profile-manual-intro.xml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  2. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
  3. [<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
  4. <chapter id='profile-manual-intro'>
  5. <title>Yocto Project Profiling and Tracing Manual</title>
  6. <section id='intro'>
  7. <title>Introduction</title>
  8. <para>
  9. Yocto bundles a number of tracing and profiling tools - this 'HOWTO'
  10. describes their basic usage and shows by example how to make use
  11. of them to examine application and system behavior.
  12. </para>
  13. <para>
  14. The tools presented are for the most part completely open-ended and
  15. have quite good and/or extensive documentation of their own which
  16. can be used to solve just about any problem you might come across
  17. in Linux.
  18. Each section that describes a particular tool has links to that
  19. tool's documentation and website.
  20. </para>
  21. <para>
  22. The purpose of this 'HOWTO' is to present a set of common and
  23. generally useful tracing and profiling idioms along with their
  24. application (as appropriate) to each tool, in the context of a
  25. general-purpose 'drill-down' methodology that can be applied
  26. to solving a large number (90%?) of problems.
  27. For help with more advanced usages and problems, please see
  28. the documentation and/or websites listed for each tool.
  29. </para>
  30. <para>
  31. The final section of this 'HOWTO' is a collection of real-world
  32. examples which we'll be continually adding to as we solve more
  33. problems using the tools - feel free to add your own examples
  34. to the list!
  35. </para>
  36. </section>
  37. <section id='profile-manual-general-setup'>
  38. <title>General Setup</title>
  39. <para>
  40. Most of the tools are available only in 'sdk' images or in images
  41. built after adding 'tools-profile' to your local.conf.
  42. So, in order to be able to access all of the tools described here,
  43. please first build and boot an 'sdk' image e.g.
  44. <literallayout class='monospaced'>
  45. $ bitbake core-image-sato-sdk
  46. </literallayout>
  47. or alternatively by adding 'tools-profile' to the
  48. EXTRA_IMAGE_FEATURES line in your local.conf:
  49. <literallayout class='monospaced'>
  50. EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile"
  51. </literallayout>
  52. If you use the 'tools-profile' method, you don't need to build an
  53. sdk image - the tracing and profiling tools will be included in
  54. non-sdk images as well e.g.:
  55. <literallayout class='monospaced'>
  56. $ bitbake core-image-sato
  57. </literallayout>
  58. <note><para>
  59. By default, the Yocto build system strips symbols from the
  60. binaries it packages, which makes it difficult to use some
  61. of the tools.
  62. </para><para>You can prevent that by putting the following
  63. in your local.conf when you build the image:
  64. </para>
  65. </note>
  66. <literallayout class='monospaced'>
  67. INHIBIT_PACKAGE_STRIP = "1"
  68. </literallayout>
  69. The above setting will noticeably increase the size of your image.
  70. </para>
  71. <para>
  72. If you've already built a stripped image, you can generate
  73. debug packages (xxx-dbg) which you can manually install as
  74. needed.
  75. </para>
  76. <para>
  77. To generate debug info for packages, you can add dbg-pkgs to
  78. EXTRA_IMAGE_FEATURES in local.conf. For example:
  79. <literallayout class='monospaced'>
  80. EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile dbg-pkgs"
  81. </literallayout>
  82. Additionally, in order to generate the right type of
  83. debuginfo, we also need to add the following to local.conf:
  84. <literallayout class='monospaced'>
  85. PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'
  86. </literallayout>
  87. </para>
  88. </section>
  89. </chapter>
  90. <!--
  91. vim: expandtab tw=80 ts=4
  92. -->