Skip to content

Commit 7c6dd27

Browse files
committed
fix #33
1 parent d02b59c commit 7c6dd27

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

scorep/user.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import inspect
22
import os.path
3-
import scorep.trace
43

54
from scorep.trace import global_trace
65

@@ -85,6 +84,20 @@ def oa_region_begin(name, file_name=None, line_number=None):
8584
def oa_region_end(name):
8685
global_trace.oa_region_end(name)
8786

87+
def register():
88+
"""
89+
Reenables the python-tracing.
90+
"""
91+
global_trace.register()
92+
93+
def unregister():
94+
"""
95+
Disables the python-tracing.
96+
Disabling the python-tracing is more efficient than disable_recording, as python does not longer call the tracing module.
97+
However, all the other things that are traced by Score-P will still be recorded.
98+
Please call register() to enable tracing again.
99+
"""
100+
global_trace.unregister()
88101

89102
def enable_recording():
90103
global_trace.user_enable_recording()

0 commit comments

Comments
 (0)