diff options
Diffstat (limited to 'SystemTap_Beginners_Guide/cross-compiling.html')
| -rw-r--r-- | SystemTap_Beginners_Guide/cross-compiling.html | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/SystemTap_Beginners_Guide/cross-compiling.html b/SystemTap_Beginners_Guide/cross-compiling.html index 7060015e..ce865e5b 100644 --- a/SystemTap_Beginners_Guide/cross-compiling.html +++ b/SystemTap_Beginners_Guide/cross-compiling.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">2.2. Generating Instrumentation for Other Computers</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="not publican" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="using-systemtap.html" title="Chapter 2. Using SystemTap" /><link rel="prev" href="using-systemtap.html" title="Chapter 2. Using SystemTap" /><link rel="next" href="using-usage.html" title="2.3. Running SystemTap Scripts" /></head><body><p id="title"></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="using-systemtap.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="using-usage.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="cross-compiling"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">2.2. Generating Instrumentation for Other Computers</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="not publican" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="using-systemtap.html" title="Chapter 2. Using SystemTap" /><link rel="prev" href="using-systemtap.html" title="Chapter 2. Using SystemTap" /><link rel="next" href="using-usage.html" title="2.3. Running SystemTap Scripts" /></head><body><p id="title"></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="using-systemtap.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="using-usage.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="cross-compiling"> |
| 3 | </a>2.2. Generating Instrumentation for Other Computers</h2></div></div></div><a id="idm47006123618640" class="indexterm"></a><a id="idm47006118670464" class="indexterm"></a><a id="idm47006119400016" class="indexterm"></a><a id="idm47006120065392" class="indexterm"></a><a id="idm47006122747024" class="indexterm"></a><a id="idm47006123558544" class="indexterm"></a><a id="idm47006128880240" class="indexterm"></a><a id="idm47006123352640" class="indexterm"></a><div class="para"> | 3 | </a>2.2. Generating Instrumentation for Other Computers</h2></div></div></div><a id="idp71890965174880" class="indexterm"></a><a id="idp71890966591968" class="indexterm"></a><a id="idp71890966716096" class="indexterm"></a><a id="idp71890966395856" class="indexterm"></a><a id="idp71890965877888" class="indexterm"></a><a id="idp71890967157184" class="indexterm"></a><a id="idp71890967116400" class="indexterm"></a><a id="idp71890962366656" class="indexterm"></a><div class="para"> |
| 4 | When users run a SystemTap script, SystemTap builds a kernel module out of | 4 | When users run a SystemTap script, SystemTap builds a kernel module out of |
| 5 | that script. SystemTap then loads the module into the kernel, allowing it to | 5 | that script. SystemTap then loads the module into the kernel, allowing it to |
| 6 | extract the specified data directly from the kernel (refer to | 6 | extract the specified data directly from the kernel (refer to |
| @@ -10,7 +10,7 @@ | |||
| 10 | Normally, however, SystemTap scripts can only be run on systems where SystemTap is deployed (as in <a class="xref" href="using-systemtap.html#using-setup">Section 2.1, “Installation and Setup”</a>). This could mean that if you want to run SystemTap on ten systems, you would need to deploy SystemTap on <span class="emphasis"><em>all</em></span> those systems. In some cases, this may be neither feasible nor desired. For instance, corporate policy may prohibit an administrator from installing RPM packages that provide compilers or debug information on specific machines, and thus prevent the deployment of SystemTap. To work around this problem, SystemTap allows you to use <em class="firstterm">cross-instrumentation</em>. | 10 | Normally, however, SystemTap scripts can only be run on systems where SystemTap is deployed (as in <a class="xref" href="using-systemtap.html#using-setup">Section 2.1, “Installation and Setup”</a>). This could mean that if you want to run SystemTap on ten systems, you would need to deploy SystemTap on <span class="emphasis"><em>all</em></span> those systems. In some cases, this may be neither feasible nor desired. For instance, corporate policy may prohibit an administrator from installing RPM packages that provide compilers or debug information on specific machines, and thus prevent the deployment of SystemTap. To work around this problem, SystemTap allows you to use <em class="firstterm">cross-instrumentation</em>. |
| 11 | </div><div class="para"> | 11 | </div><div class="para"> |
| 12 | Cross-instrumentation is the process of generating SystemTap instrumentation module from a SystemTap script on one computer to be used on another computer. This process offers the following benefits: | 12 | Cross-instrumentation is the process of generating SystemTap instrumentation module from a SystemTap script on one computer to be used on another computer. This process offers the following benefits: |
| 13 | </div><a id="idm47006129195760" class="indexterm"></a><a id="idm47006129078672" class="indexterm"></a><div xmlns:d="http://docbook.org/ns/docbook" class="itemizedlist"><ul><li class="listitem"><div class="para"> | 13 | </div><a id="idp71890968331728" class="indexterm"></a><a id="idp71890962862912" class="indexterm"></a><div xmlns:d="http://docbook.org/ns/docbook" class="itemizedlist"><ul><li class="listitem"><div class="para"> |
| 14 | The kernel information packages for various machines can be installed on a single <span class="emphasis"><em>host machine</em></span>. | 14 | The kernel information packages for various machines can be installed on a single <span class="emphasis"><em>host machine</em></span>. |
| 15 | </div></li><li class="listitem"><div class="para"> | 15 | </div></li><li class="listitem"><div class="para"> |
| 16 | Each <span class="emphasis"><em>target machine</em></span> only needs one RPM package to be installed in order to use the generated SystemTap instrumentation module: the <span class="package">systemtap-runtime</span> package. | 16 | Each <span class="emphasis"><em>target machine</em></span> only needs one RPM package to be installed in order to use the generated SystemTap instrumentation module: the <span class="package">systemtap-runtime</span> package. |
| @@ -18,9 +18,9 @@ | |||
| 18 | For the sake of simplicity, the following terms are used | 18 | For the sake of simplicity, the following terms are used |
| 19 | throughout this section: | 19 | throughout this section: |
| 20 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="itemizedlist"><ul><li class="listitem"><div class="para"> | 20 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="itemizedlist"><ul><li class="listitem"><div class="para"> |
| 21 | <a id="idm47006123341328" class="indexterm"></a> | 21 | <a id="idp71890961878560" class="indexterm"></a> |
| 22 | 22 | ||
| 23 | <a id="idm47006123101312" class="indexterm"></a> | 23 | <a id="idp71890960495840" class="indexterm"></a> |
| 24 | <span class="emphasis"><em>Instrumentation module</em></span> — the | 24 | <span class="emphasis"><em>Instrumentation module</em></span> — the |
| 25 | kernel module built from a SystemTap script. The | 25 | kernel module built from a SystemTap script. The |
| 26 | <span class="emphasis"><em>SystemTap module</em></span> is built on the <span class="emphasis"><em>host | 26 | <span class="emphasis"><em>SystemTap module</em></span> is built on the <span class="emphasis"><em>host |
| @@ -28,25 +28,25 @@ | |||
| 28 | kernel</em></span> of <span class="emphasis"><em>target | 28 | kernel</em></span> of <span class="emphasis"><em>target |
| 29 | system</em></span>. | 29 | system</em></span>. |
| 30 | </div></li><li class="listitem"><div class="para"> | 30 | </div></li><li class="listitem"><div class="para"> |
| 31 | <a id="idm47006123618352" class="indexterm"></a> | 31 | <a id="idp71890950390480" class="indexterm"></a> |
| 32 | 32 | ||
| 33 | <a id="idm47006123979584" class="indexterm"></a> | 33 | <a id="idp71890966970944" class="indexterm"></a> |
| 34 | <span class="emphasis"><em>Host system</em></span> — the system on | 34 | <span class="emphasis"><em>Host system</em></span> — the system on |
| 35 | which you compile the <span class="emphasis"><em>instrumentation modules</em></span> from SystemTap | 35 | which you compile the <span class="emphasis"><em>instrumentation modules</em></span> from SystemTap |
| 36 | scripts in order to load them on <span class="emphasis"><em>target | 36 | scripts in order to load them on <span class="emphasis"><em>target |
| 37 | systems</em></span>. | 37 | systems</em></span>. |
| 38 | </div></li><li class="listitem"><div class="para"> | 38 | </div></li><li class="listitem"><div class="para"> |
| 39 | <a id="idm47006122720928" class="indexterm"></a> | 39 | <a id="idp71890966427024" class="indexterm"></a> |
| 40 | 40 | ||
| 41 | <a id="idm47006120265056" class="indexterm"></a> | 41 | <a id="idp71890968252576" class="indexterm"></a> |
| 42 | 42 | ||
| 43 | <span class="emphasis"><em>Target system</em></span> — the system for which you | 43 | <span class="emphasis"><em>Target system</em></span> — the system for which you |
| 44 | are building the <span class="emphasis"><em>instrumentation modules</em></span> from | 44 | are building the <span class="emphasis"><em>instrumentation modules</em></span> from |
| 45 | SystemTap scripts. | 45 | SystemTap scripts. |
| 46 | </div></li><li class="listitem"><div class="para"> | 46 | </div></li><li class="listitem"><div class="para"> |
| 47 | <a id="idm47006130033904" class="indexterm"></a> | 47 | <a id="idp71890959977232" class="indexterm"></a> |
| 48 | 48 | ||
| 49 | <a id="idm47006129738800" class="indexterm"></a> | 49 | <a id="idp71890971878736" class="indexterm"></a> |
| 50 | <span class="emphasis"><em>Target kernel</em></span> — the kernel of | 50 | <span class="emphasis"><em>Target kernel</em></span> — the kernel of |
| 51 | the <span class="emphasis"><em>target system</em></span>. This is the kernel on which | 51 | the <span class="emphasis"><em>target system</em></span>. This is the kernel on which |
| 52 | you intend to load or run the <span class="emphasis"><em>instrumentation | 52 | you intend to load or run the <span class="emphasis"><em>instrumentation |
| @@ -54,7 +54,7 @@ | |||
| 54 | </div></li></ul></div><div class="para"> | 54 | </div></li></ul></div><div class="para"> |
| 55 | To configure a host system and target systems, complete the following steps: | 55 | To configure a host system and target systems, complete the following steps: |
| 56 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="procedure"><a id="preppingxcompile"> | 56 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="procedure"><a id="preppingxcompile"> |
| 57 | </a><a id="idm47006120238640" class="indexterm"></a><a id="idm47006118359200" class="indexterm"></a><a id="idm47006123616688" class="indexterm"></a><ol class="1"><li class="step"><div class="para"> | 57 | </a><a id="idp71890960605840" class="indexterm"></a><a id="idp71890969489904" class="indexterm"></a><a id="idp71890960981568" class="indexterm"></a><ol class="1"><li class="step"><div class="para"> |
| 58 | Install the <span class="package">systemtap-runtime</span> package on each | 58 | Install the <span class="package">systemtap-runtime</span> package on each |
| 59 | <span class="emphasis"><em>target system</em></span>. | 59 | <span class="emphasis"><em>target system</em></span>. |
| 60 | </div></li><li class="step"><div class="para"> | 60 | </div></li><li class="step"><div class="para"> |
| @@ -82,7 +82,7 @@ | |||
| 82 | To build the <span class="emphasis"><em>instrumentation module</em></span>, run the following | 82 | To build the <span class="emphasis"><em>instrumentation module</em></span>, run the following |
| 83 | command on the <span class="emphasis"><em>host system</em></span> (be sure to specify the | 83 | command on the <span class="emphasis"><em>host system</em></span> (be sure to specify the |
| 84 | appropriate values): | 84 | appropriate values): |
| 85 | </div><pre class="screen"><code class="command">stap -r <em class="replaceable">kernel_version</em> <em class="replaceable">script</em> -m <em class="replaceable">module_name</em></code></pre><div class="para"> | 85 | </div><pre class="screen"><code class="command">stap -p4 -r <em class="replaceable">kernel_version</em> <em class="replaceable">script</em> -m <em class="replaceable">module_name</em></code></pre><div class="para"> |
| 86 | Here, <em class="replaceable">kernel_version</em> refers to | 86 | Here, <em class="replaceable">kernel_version</em> refers to |
| 87 | the version of the <span class="emphasis"><em>target kernel</em></span> (the output of | 87 | the version of the <span class="emphasis"><em>target kernel</em></span> (the output of |
| 88 | the <code class="command">uname -r</code> command on the target machine), | 88 | the <code class="command">uname -r</code> command on the target machine), |
| @@ -90,7 +90,7 @@ | |||
| 90 | be converted into the <span class="emphasis"><em>instrumentation module</em></span>, and | 90 | be converted into the <span class="emphasis"><em>instrumentation module</em></span>, and |
| 91 | <em class="replaceable">module_name</em> is the desired | 91 | <em class="replaceable">module_name</em> is the desired |
| 92 | name of the <span class="emphasis"><em>instrumentation module</em></span>. | 92 | name of the <span class="emphasis"><em>instrumentation module</em></span>. |
| 93 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><a id="idm47006127446512" class="indexterm"></a><a id="idm47006124724048" class="indexterm"></a><a id="idm47006129791248" class="indexterm"></a><div class="para"> | 93 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><a id="idp71890966824800" class="indexterm"></a><a id="idp71890966979104" class="indexterm"></a><a id="idp71890963099856" class="indexterm"></a><div class="para"> |
| 94 | To determine the architecture notation of a running kernel, you can run the following command: | 94 | To determine the architecture notation of a running kernel, you can run the following command: |
| 95 | </div><pre class="screen"><code class="command">uname -m</code></pre></div></div><div class="para"> | 95 | </div><pre class="screen"><code class="command">uname -m</code></pre></div></div><div class="para"> |
| 96 | Once the <span class="emphasis"><em>instrumentation module</em></span> is compiled, copy | 96 | Once the <span class="emphasis"><em>instrumentation module</em></span> is compiled, copy |
