<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi all,<br>
<br>
Is it feasible to have an officially supported way of determining if
a tracepoint is currently enabled?<br>
<br>
In my code I would like to test if the tracepoint is enabled, and if
it isn't, avoid doing expensive setup work.<br>
<br>
I've been doing the following:<br>
<br>
if
(__builtin_expect(!!(__tracepoint_sample_component___message.state),
0)) {<br>
/* setup work */<br>
tracepoint(sample_component, message);<br>
/* cleanup work */<br>
}<br>
<br>
But it's weak for two reasons:<br>
<ul>
<li>The 'state' attribute goes true when the tracepoint is
enabled, but stays true after the tracepoint is disabled. It
only goes false when the session is destroyed.<br>
</li>
<li>It uses a private / unofficial API<br>
</li>
</ul>
<p>What I'd like is an official API that correctly evaluates whether
a tracepoint is enabled or not?<br>
</p>
<p>Is this possible?<br>
</p>
<p>Thanks,<br>
Dave<br>
</p>
<HR>The information contained in this transmission may be confidential. Any disclosure, copying, or further distribution of confidential information is not permitted unless such privilege is explicitly granted in writing by Quantum. Quantum reserves the right to have electronic communications, including email and attachments, sent across its networks filtered through anti virus and spam software programs and retain such messages in order to comply with applicable data security and retention requirements. Quantum is not responsible for the proper and complete transmission of the substance of this communication or for any delay in its receipt.<BR>
</body>
</html>