blob: fc9d2a4de155c4e4d4248643203d3d1d7f1f0632 [file] [edit]
<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>iJIT_NotifyEvent &mdash; ITT/JIT APIs Documentation documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=9edc463e" />
<link rel="canonical" href="https://intel.github.io/ittapi/src/jitapi/ijit_notifyevent.html" />
<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../../_static/doctools.js?v=fd6eb6e6"></script>
<script src="../../_static/sphinx_highlight.js?v=6ffebe34"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="iJIT_IsProfilingActive" href="ijit_isprofilingactive.html" />
<link rel="prev" title="JIT API Reference" href="../jit-api-reference.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home">
ITT/JIT APIs Documentation
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../overview.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="../build.html">Build from Source Code</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../api-support.html">Use the ITT/JIT APIs</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="../api-support.html#c-c-api-usage-and-reference">C/C++ API Usage and Reference:</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../itt-api-support.html">Instrumentation and Tracing Technology (ITT) API</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../jit-api-support.html">Just-In-Time (JIT) API</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="../jit-api-support.html#environment-variables-in-the-jit-profiling-api">Environment Variables in the JIT Profiling API</a></li>
<li class="toctree-l4"><a class="reference internal" href="../jit-api-support.html#profile-trace-based-and-method-based-jit-compiled-code">Profile Trace-based and Method-based JIT-compiled Code</a></li>
<li class="toctree-l4"><a class="reference internal" href="../jit-api-support.html#analyze-split-functions">Analyze Split Functions</a></li>
<li class="toctree-l4"><a class="reference internal" href="../jit-api-support.html#explore-inline-functions">Explore Inline Functions</a></li>
<li class="toctree-l4 current"><a class="reference internal" href="../jit-api-support.html#learn-more">Learn More</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../api-support.html#other-language-api-bindings">Other Language API Bindings:</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../ref_collector.html">ITT API Reference Collector</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/intel/ittapi">GitHub Project</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">ITT/JIT APIs Documentation</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content style-external-links">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="../api-support.html">Use the ITT/JIT APIs</a></li>
<li class="breadcrumb-item"><a href="../jit-api-support.html">Just-In-Time (JIT) API</a></li>
<li class="breadcrumb-item"><a href="../jit-api-reference.html">JIT API Reference</a></li>
<li class="breadcrumb-item active">iJIT_NotifyEvent</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/src/jitapi/ijit_notifyevent.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="ijit-notifyevent">
<span id="id1"></span><h1>iJIT_NotifyEvent<a class="headerlink" href="#ijit-notifyevent" title="Link to this heading"></a></h1>
<p>Reports information about JIT-compiled code to the agent.</p>
<section id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Link to this heading"></a></h2>
<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">int</span><span class="w"> </span><span class="nf">iJIT_NotifyEvent</span><span class="p">(</span><span class="n">iJIT_JVM_EVENT</span><span class="w"> </span><span class="n">event_type</span><span class="p">,</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="n">EventSpecificData</span><span class="p">);</span>
</pre></div>
</div>
</section>
<section id="description">
<h2>Description<a class="headerlink" href="#description" title="Link to this heading"></a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">iJIT_NotifyEvent</span></code> function sends a notification of
<code class="docutils literal notranslate"><span class="pre">event_type</span></code> with the data pointed by <code class="docutils literal notranslate"><span class="pre">EventSpecificData</span></code> to the
agent. The reported information is used to attribute samples obtained
from any profiling tool collector. Make sure to call this API after
JIT compilation and before the first entry into the JIT-compiled code.</p>
</section>
<section id="input-parameters">
<h2>Input Parameters<a class="headerlink" href="#input-parameters" title="Link to this heading"></a></h2>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Parameter</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">iJIT_JVM_EVENT</span><span class="w"> </span><span class="n">event_type</span>
</pre></div>
</div>
</td>
<td><p>Notification code sent to the agent.
See a complete list of event types below.
See a complete list of event types below.</p></td>
</tr>
<tr class="row-odd"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="n">EventSpecificData</span>
</pre></div>
</div>
</td>
<td><p>Pointer to event specific data.</p></td>
</tr>
</tbody>
</table>
<p>The following values are acceptable for <code class="docutils literal notranslate"><span class="pre">event_type</span></code>:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Value</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED</span>
</pre></div>
</div>
</td>
<td><p>Send this notification after a JITted method has been loaded
into memory, and possibly JIT compiled, but before the code
is executed. Use the iJIT_Method_Load structure for
EventSpecificData. The return value of iJIT_NotifyEvent is
undefined.</p></td>
</tr>
<tr class="row-odd"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">iJVM_EVENT_TYPE_SHUTDOWN</span>
</pre></div>
</div>
</td>
<td><p>Send this notification to terminate profiling. Use NULL for
EventSpecificData. iJIT_NotifyEvent returns 1 on success.</p></td>
</tr>
<tr class="row-even"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">JVM_EVENT_TYPE_METHOD_UPDATE</span>
</pre></div>
</div>
</td>
<td><p>Send this notification to provide new content for a dynamic
code that was reported previously. The previous content is
invalidated, starting from the time of the notification.
Use the iJIT_Method_Load structure for EventSpecificData
with the following required fields:</p></td>
</tr>
<tr class="row-odd"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">JVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED</span>
</pre></div>
</div>
</td>
<td><p>Send this notification when an inline dynamic code is JIT
compiled and loaded into memory by the JIT engine, but before
the parent code region starts executing. Use the
iJIT_Method_Inline_Load structure for EventSpecificData.</p></td>
</tr>
<tr class="row-even"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2</span>
</pre></div>
</div>
</td>
<td><p>Send this notification when a dynamic code is JIT compiled
and loaded into memory by the JIT engine, but before the code
is executed. Use the iJIT_Method_Load_V2 structure for
EventSpecificData.</p></td>
</tr>
</tbody>
</table>
<p>You can use the following structures for <code class="docutils literal notranslate"><span class="pre">EventSpecificData</span></code>:</p>
<p><strong>iJIT_Method_Inline_Load Structure</strong></p>
<p>When you use the <code class="docutils literal notranslate"><span class="pre">iJIT_Method_Inline_Load</span></code> structure to describe the
JIT compiled method, use <code class="docutils literal notranslate"><span class="pre">iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED</span></code>
as an event type to report it. The<code class="docutils literal notranslate"><span class="pre">iJIT_Method_Inline_Load</span></code>
structure has the following fields:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Field</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">method_id</span>
</pre></div>
</div>
</td>
<td><p>Unique method ID.
The Method ID cannot be smaller than 999.
Use the API function
<code class="docutils literal notranslate"><span class="pre">iJIT_GetNewMethodID</span></code> to get a valid and
unique method ID, or choose to manage the
uniqueness and range of the ID.</p></td>
</tr>
<tr class="row-odd"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span>
<span class="n">parent_method_id</span>
</pre></div>
</div>
</td>
<td><p>Unique immediate parents method ID.
The Method ID cannot be smaller than 999.
Use the API function
<code class="docutils literal notranslate"><span class="pre">iJIT_GetNewMethodID</span></code> to get a valid and
unique method ID, or choose to manage the
uniqueness and range of the ID.</p></td>
</tr>
<tr class="row-even"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">method_name</span>
</pre></div>
</div>
</td>
<td><p>The name of the method, optionally prefixed
with its class name and appended with its
complete signature. This argument cannot be
set to NULL.</p></td>
</tr>
<tr class="row-odd"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="n">method_load_address</span>
</pre></div>
</div>
</td>
<td><p>The base address of the method code.
Can be NULL if the method is not JITted.</p></td>
</tr>
<tr class="row-even"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">method_size</span>
</pre></div>
</div>
</td>
<td><p>The virtual address on which the method is
inlined. If NULL, then data provided with
the event are not accepted.</p></td>
</tr>
<tr class="row-odd"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span>
<span class="n">line_number_size</span>
</pre></div>
</div>
</td>
<td><p>The number of entries in the line number
table. 0 if none.</p></td>
</tr>
<tr class="row-even"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">pLineNumberInfo</span>
<span class="n">line_number_table</span>
</pre></div>
</div>
</td>
<td><p>Pointer to the line numbers info array.
Can be NULL if <code class="docutils literal notranslate"><span class="pre">line_number_size</span></code> is 0.
See <code class="docutils literal notranslate"><span class="pre">LineNumberInfo</span></code> structure for a
description of a single entry in the line
number info array.</p></td>
</tr>
<tr class="row-odd"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">class_file_name</span>
</pre></div>
</div>
</td>
<td><p>Class name.
Can be NULL.</p></td>
</tr>
<tr class="row-even"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">source_file_name</span>
</pre></div>
</div>
</td>
<td><p>Source file name.
Can be NULL.</p></td>
</tr>
</tbody>
</table>
<p><strong>iJIT_Method_Load Structure</strong></p>
<p>When you use the<code class="docutils literal notranslate"><span class="pre">iJIT_Method_Load</span></code> structure to describe the JIT
compiled method, use <code class="docutils literal notranslate"><span class="pre">iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED</span></code> as an
event type to report it. The<code class="docutils literal notranslate"><span class="pre">iJIT_Method_Load</span></code> structure has the
following fields:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Field</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">method_id</span>
</pre></div>
</div>
</td>
<td><p>Unique method ID.
Method ID cannot be smaller than 999.
You must either use the API function
<code class="docutils literal notranslate"><span class="pre">iJIT_GetNewMethodID</span></code> to get a valid and
unique method ID, or else manage ID
uniqueness and correct range by yourself.</p></td>
</tr>
<tr class="row-odd"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">method_name</span>
</pre></div>
</div>
</td>
<td><p>The name of the method, optionally prefixed
with its class name and appended with its
complete signature. This argument cannot be
set to NULL.</p></td>
</tr>
<tr class="row-even"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="n">method_load_address</span>
</pre></div>
</div>
</td>
<td><p>The base address of the method code.
Can be NULL if the method is not JITted.</p></td>
</tr>
<tr class="row-odd"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">method_size</span>
</pre></div>
</div>
</td>
<td><p>The virtual address on which the method is
inlined. If NULL, then data provided with
the event are not accepted.</p></td>
</tr>
<tr class="row-even"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span>
<span class="n">line_number_size</span>
</pre></div>
</div>
</td>
<td><p>The number of entries in the line number
table. 0 if none.</p></td>
</tr>
<tr class="row-odd"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">pLineNumberInfo</span>
<span class="n">line_number_table</span>
</pre></div>
</div>
</td>
<td><p>Pointer to the line numbers info array.
Can be NULL if <code class="docutils literal notranslate"><span class="pre">line_number_size</span></code> is 0.
See <code class="docutils literal notranslate"><span class="pre">LineNumberInfo</span></code> structure for a
description of a single entry in the line
number info array.</p></td>
</tr>
<tr class="row-even"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">class_id</span>
</pre></div>
</div>
</td>
<td><p>This field is obsolete.</p></td>
</tr>
<tr class="row-odd"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">class_file_name</span>
</pre></div>
</div>
</td>
<td><p>Class name.
Can be NULL.</p></td>
</tr>
<tr class="row-even"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">source_file_name</span>
</pre></div>
</div>
</td>
<td><p>Source file name.
Can be NULL.</p></td>
</tr>
<tr class="row-odd"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="n">user_data</span>
</pre></div>
</div>
</td>
<td><p>This field is obsolete.</p></td>
</tr>
<tr class="row-even"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span>
<span class="n">user_data_size</span>
</pre></div>
</div>
</td>
<td><p>This field is obsolete.</p></td>
</tr>
<tr class="row-odd"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">iJDEnvironmentType</span><span class="w"> </span><span class="n">env</span>
</pre></div>
</div>
</td>
<td><p>This field is obsolete.</p></td>
</tr>
</tbody>
</table>
<p><strong>iJIT_Method_Load_V2 Structure</strong></p>
<p>When you use the <code class="docutils literal notranslate"><span class="pre">iJIT_Method_Load_V2</span></code> structure to describe the JIT
compiled method, use <code class="docutils literal notranslate"><span class="pre">iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2</span></code> as an
event type to report it. The<code class="docutils literal notranslate"><span class="pre">iJIT_Method_Load_V2</span></code> structure has the
following fields:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Field</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">method_id</span>
</pre></div>
</div>
</td>
<td><p>Unique method ID.
Method ID cannot be smaller than 999. You must
either use the API function
<code class="docutils literal notranslate"><span class="pre">iJIT_GetNewMethodID</span></code> to get a valid and
unique method ID, or else manage ID
uniqueness and correct range by yourself.</p></td>
</tr>
<tr class="row-odd"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">method_name</span>
</pre></div>
</div>
</td>
<td><p>The name of the method, optionally prefixed
with its class name and appended with its
complete signature. This argument cannot be
set to NULL.</p></td>
</tr>
<tr class="row-even"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="n">method_load_address</span>
</pre></div>
</div>
</td>
<td><p>The base address of the method code.
Can be NULL if the method is not JITted.</p></td>
</tr>
<tr class="row-odd"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">method_size</span>
</pre></div>
</div>
</td>
<td><p>The virtual address on which the method is
inlined. If NULL, then data provided with
the event are not accepted.</p></td>
</tr>
<tr class="row-even"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span>
<span class="n">line_number_size</span>
</pre></div>
</div>
</td>
<td><p>The number of entries in the line number
table. 0 if none.</p></td>
</tr>
<tr class="row-odd"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">pLineNumberInfo</span>
<span class="n">line_number_table</span>
</pre></div>
</div>
</td>
<td><p>Pointer to the line numbers info array.
Can be NULL if <code class="docutils literal notranslate"><span class="pre">line_number_size</span></code> is 0.
See <code class="docutils literal notranslate"><span class="pre">LineNumberInfo</span></code> structure for a
description of a single entry in the line
number info array.</p></td>
</tr>
<tr class="row-even"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">class_file_name</span>
</pre></div>
</div>
</td>
<td><p>Class name.
Can be NULL.</p></td>
</tr>
<tr class="row-odd"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">source_file_name</span>
</pre></div>
</div>
</td>
<td><p>Source file name.
Can be NULL.</p></td>
</tr>
<tr class="row-even"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">module_name</span>
</pre></div>
</div>
</td>
<td><p>Module name.
Can be NULL. The module name can be useful for
distinguishing among different JIT engines.</p></td>
</tr>
</tbody>
</table>
<p><strong>LineNumberInfo Structure</strong></p>
<p>Use the <code class="docutils literal notranslate"><span class="pre">LineNumberInfo</span></code> structure to describe a single entry in the
line number information of a code region. A table of line number entries
provides information about how the reported code region is mapped to
source file. The Profiling tool uses line number information to attribute
the samples (virtual address) to a line number. You can report different
code addresses for the same source line:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p><strong>Offset</strong></p></th>
<th class="head"><p><strong>Line Number</strong></p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>1</p></td>
<td><p>2</p></td>
</tr>
<tr class="row-odd"><td><p>12</p></td>
<td><p>4</p></td>
</tr>
<tr class="row-even"><td><p>15</p></td>
<td><p>2</p></td>
</tr>
<tr class="row-odd"><td><p>18</p></td>
<td><p>1</p></td>
</tr>
<tr class="row-even"><td><p>21</p></td>
<td><p>30</p></td>
</tr>
</tbody>
</table>
<p>Profilers construct the following table using the client data:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p><strong>Code sub-range</strong></p></th>
<th class="head"><p><strong>Line Number</strong></p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>0-1</p></td>
<td><p>2</p></td>
</tr>
<tr class="row-odd"><td><p>1-12</p></td>
<td><p>4</p></td>
</tr>
<tr class="row-even"><td><p>12-15</p></td>
<td><p>2</p></td>
</tr>
<tr class="row-odd"><td><p>15-18</p></td>
<td><p>1</p></td>
</tr>
<tr class="row-even"><td><p>18-21</p></td>
<td><p>30</p></td>
</tr>
</tbody>
</table>
<p>The <code class="docutils literal notranslate"><span class="pre">LineNumberInfo</span></code> structure has the following fields:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Field</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">Offset</span>
</pre></div>
</div>
</td>
<td><p>Opcode byte offset from the
beginning of the method.</p></td>
</tr>
<tr class="row-odd"><td><div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">LineNumber</span>
</pre></div>
</div>
</td>
<td><p>Matching source line number offset
(from beginning of source file).</p></td>
</tr>
</tbody>
</table>
</section>
<section id="return-values">
<h2>Return Values<a class="headerlink" href="#return-values" title="Link to this heading"></a></h2>
<p>The return values are dependent on the particular <code class="docutils literal notranslate"><span class="pre">iJIT_JVM_EVENT</span></code>.</p>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../jit-api-reference.html" class="btn btn-neutral float-left" title="JIT API Reference" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="ijit_isprofilingactive.html" class="btn btn-neutral float-right" title="iJIT_IsProfilingActive" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2026 Intel Corporation.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>