<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Implement a signal handling component for controlling XRay instrumentation"
   href="https://bugs.llvm.org/show_bug.cgi?id=37389">37389</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Implement a signal handling component for controlling XRay instrumentation
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>XRay
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Runtime
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dberris@google.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dberris@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Currently, the only ways to enable/disable XRay tracing is through the
following mechanisms:

- Environment variable-based configuration. This works great for short-lived
processes.

- Programmatic control through the runtime APIs. This works great for
long-lived services that already have a control surface that the XRay handling
can be plugged in through.

For all other cases where the application is one of the following:

- Interactive: i.e. has a long-running component and dedicated input handling.

- A daemon: i.e. an application that sits in the background, doing periodic
work, and has a very limited or constrained control surface, like logging
daemons or other system daemons typical in some POSIX environments.

- Self-contained: i.e. an application that has no external control outside of
initial start-up, usually acting as a client or a controller of sorts, which
only typically performs output operations and has no existing control surface
for interactive use-cases.

On POSIX platforms, we have some options:

1. We can use the signal-handling facilities to control the XRay tracing
implementation, using one of the signals that are well-defined to be ignored by
default (SIGCONT or SIGURG), and dedicate one thread to block on these signals.

2. Use ptrace only to signal the dedicated XRay control thread in the target
process to kick-off the tracing implementation.

3. A hybrid of 2 and 1.

This bug is intended to track the work on the in-process control as well as the
tool used to coordinate/configure the tracing. That tool is intended to be
implemented as a sub-command to the `llvm-xray` tool in the LLVM distribution.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>