You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+41Lines changed: 41 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ scorep is a module that allows tracing of python scripts using [Score-P](https:/
13
13
*[Instrumenter](#instrumenter)
14
14
+[Instrumenter Types](#instrumenter-types)
15
15
+[Instrumenter User Interface](#instrumenter-user-interface)
16
+
+[Instrumenter File](#instrumenter-file)
16
17
*[MPI](#mpi)
17
18
*[User Regions](#user-regions)
18
19
*[Overview about Flags](#overview-about-flags)
@@ -102,6 +103,7 @@ with scorep.instrumenter.enable():
102
103
The main idea is to reduce the instrumentation overhead for regions that are not of interest.
103
104
Whenever the instrumenter is disabled, function enter or exits will not be trace.
104
105
However, user regions as described in [User Regions](#user-regions) are not affected.
106
+
Both functions are also available as decorators.
105
107
106
108
As an example:
107
109
@@ -155,6 +157,45 @@ with scorep.instrumenter.disable():
155
157
will only disable the instrumenter, but `my_fun_calls` will not appear in the trace or profile, as the second call to `scorep.instrumenter.disable` did not change the state of the instrumenter.
156
158
Please look to [User Regions](#user-regions), if you want to annotate a region, no matter what the instrumenter state is.
157
159
160
+
### Instrumenter File
161
+
162
+
Handing a Python file to `--instrumenter-file` allows the instrumentation of modules and functions without changing their code.
163
+
The file handed to `--instrumenter-file` is executed before the script is executed so that the original function definition can be overwritten before the function is executed.
164
+
However, using this approach, it is no longer possible to track the bring up of the module.
165
+
166
+
To simplify the instrumentation, the user instrumentation contains two helper calls:
0 commit comments