1tnf_process_disable(3TNF) TNF Library Functions tnf_process_disable(3TNF)
2
3
4
6 tnf_process_disable, tnf_process_enable, tnf_thread_disable,
7 tnf_thread_enable - probe control internal interface
8
10 cc [ flag ... ] file ... -ltnfprobe [ library ... ]
11 #include <tnf/probe.h>
12
13
14
15 void tnf_process_disable(void);
16
17
18 void tnf_process_enable(void);
19
20
21 void tnf_thread_disable(void);
22
23
24 void tnf_thread_enable(void);
25
26
28 There are three levels of granularity for controlling tracing and probe
29 functions (called probing from here on): probing for the entire
30 process, a particular thread, and the probe itself can be disabled or
31 enabled. The first two (process and thread) are controlled by this
32 interface. The probe is controlled with the prex(1) utility.
33
34
35 The tnf_process_disable() function turns off probing for the process.
36 The default process state is to have probing enabled. The
37 tnf_process_enable() function turns on probing for the process.
38
39
40 The tnf_thread_disable() function turns off probing for the currently
41 running thread. Threads are "born" or created with this state enabled.
42 The tnf_thread_enable() function turns on probing for the currently
43 running thread. If the program is a non-threaded program, these two
44 thread interfaces disable or enable probing for the process.
45
47 See attributes(5) for descriptions of the following attributes:
48
49
50
51
52 ┌─────────────────────────────┬─────────────────────────────┐
53 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
54 ├─────────────────────────────┼─────────────────────────────┤
55 │Availability │SUNWtnfd │
56 ├─────────────────────────────┼─────────────────────────────┤
57 │Interface Stability │Unstable │
58 ├─────────────────────────────┼─────────────────────────────┤
59 │MT-Level │MT-Safe │
60 └─────────────────────────────┴─────────────────────────────┘
61
63 prex(1), tnfdump(1), TNF_DECLARE_RECORD(3TNF), TNF_PROBE(3TNF),
64 attributes(5)
65
67 A probe is considered enabled only if:
68
69 o prex(1) has enabled the probe AND
70
71 o the process has probing enabled, which is the default or
72 could be set with tnf_process_enable() AND
73
74 o the thread that hits the probe has probing enabled, which is
75 every thread's default or could be set with
76 tnf_thread_enable().
77
78
79 There is a run time cost associated with determining that the probe is
80 disabled. To reduce the performance effect of probes, this cost should
81 be minimized. The quickest way that a probe can be determined to be
82 disabled is by the enable control that prex(1) uses. Therefore, to
83 disable all the probes in a process use the disable command in prex(1)
84 rather than tnf_process_disable().
85
86
87 The tnf_process_disable() and tnf_process_enable() functions should
88 only be used to toggle probing based on some internal program condi‐
89 tion. The tnf_thread_disable() function should be used to turn off
90 probing for threads that are uninteresting.
91
92
93
94SunOS 5.11 5 Feb 2002 tnf_process_disable(3TNF)