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
@@ -2109,33 +2109,26 @@ Please not the use of ids as way to cope with the need for unique pointers for c
2109
2109
2110
2110
### Building the Python package
2111
2111
2112
-
To build the Python package, you will need to use the CMake build system to compile the Tracy-Client. The CMake option `-D TRACY_CLIENT_PYTHON=ON` is used to enable the generation of the Python bindings in conjunction with a mandatory creation of a shared Tracy-Client library via one of the CMake options `-D BUILD_SHARED_LIBS=ON` or `-D DEFAULT_STATIC=OFF`.
2112
+
To build the Python package, run the following commands:
2113
2113
2114
-
The following other variables are available in addition:
2115
-
2116
-
- `EXTERNAL_PYBIND11` --- Can be used to disable the download of pybind11 when Tracy is embedded in another CMake project that already uses pybind11.
2114
+
cd ../python
2115
+
pip wheel .
2117
2116
2118
-
- `TRACY_CLIENT_PYTHON_TARGET` --- Optional directory to copy Tracy Python bindings to when Tracyis embedded in another CMake project.
2117
+
This will create a wheel package in the `python` folder. Please note that this requires CMake and a C++ compiler installed on the system, as the Tracy-Client library is built in the background.
2119
2118
2120
-
- `BUFFER_SIZE` --- The size of the global pointer buffer (defaults to 128) for naming Tracy profiling entities like frame marks, plots, and memory locations.
2119
+
You can pass additional CMake options to the package build to configure the Tracy-Client library:
2121
2120
2122
-
- `NAME_LENGTH` --- The maximum length (defaults to 128) of a name stored in the global pointer buffer.
2123
-
2124
-
Be aware that the memory allocated by this buffer is global and is not freed, see section [3.1.2](#uniquepointers).
- `BUFFER_SIZE` --- The size of the global pointer buffer (defaults to 128) for naming Tracy profiling entities like frame marks, plots, and memory locations.
2132
2126
2133
-
Once this has finished building the Python package can be built as follows:
2127
+
- `NAME_LENGTH` --- The maximum length (defaults to 128) of a name stored in the global pointer buffer.
2134
2128
2135
-
cd ../python
2136
-
python3 setup.py bdist_wheel
2129
+
- `EXTERNAL_PYBIND11` --- Can be used to disable the download of pybind11 when Tracy is embedded in another CMake project that already uses pybind11.
2137
2130
2138
-
The created package will be in the folder `python/dist`.
2131
+
Be aware that the memory allocated by this buffer is global and is not freed, see section [3.1.2](#uniquepointers).
2139
2132
2140
2133
## Fortran API {#fortranapi}
2141
2134
@@ -2395,6 +2388,8 @@ By default, sampling is performed at 8 kHz frequency on Windows (the maximum pos
2395
2388
2396
2389
Call stack sampling may be disabled by using the `TRACY_NO_SAMPLING` define.
2397
2390
2391
+
When enabled, by default, sampling starts at the beginning of the application and ends with it. You can instead have programmatic (manual) control over when sampling should begin and end by defining `TRACY_SAMPLING_PROFILER_MANUAL_START` when compiling `TracyClient.cpp`. Use `tracy::BeginSamplingProfiling()` and `tracy::EndSamplingProfiling()` to control it. There are C interfaces for it as well: `TracyCBeginSamplingProfiling()` and `TracyCEndSamplingProfiling()`.
2392
+
2398
2393
::: bclogo
2399
2394
Linux sampling rate limits The operating system may decide that sampling takes too much CPU time and reduce the allowed sampling rate. This can be seen in `dmesg` output as:
Copy file name to clipboardExpand all lines: manual/tracy.tex
+16-23Lines changed: 16 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -2392,37 +2392,30 @@ \subsubsection{Bindings}
2392
2392
2393
2393
\subsubsection{Building the Python package}
2394
2394
2395
-
To build the Python package, you will need to use the CMake build system to compile the Tracy-Client.
2396
-
The CMake option \texttt{-D TRACY\_CLIENT\_PYTHON=ON} is used to enable the generation of the Python bindings in conjunction with a mandatory creation of a shared Tracy-Client library via one of the CMake options \texttt{-D BUILD\_SHARED\_LIBS=ON} or \texttt{-D DEFAULT\_STATIC=OFF}.
2397
-
2398
-
The following other variables are available in addition:
2399
-
2400
-
\begin{itemize}
2401
-
\item\texttt{EXTERNAL\_PYBIND11} --- Can be used to disable the download of pybind11 when Tracy is embedded in another CMake project that already uses pybind11.
2402
-
\item\texttt{TRACY\_CLIENT\_PYTHON\_TARGET} --- Optional directory to copy Tracy Python bindings to when Tracy is embedded in another CMake project.
2403
-
\item\texttt{BUFFER\_SIZE} --- The size of the global pointer buffer (defaults to 128) for naming Tracy profiling entities like frame marks, plots, and memory locations.
2404
-
\item\texttt{NAME\_LENGTH} --- The maximum length (defaults to 128) of a name stored in the global pointer buffer.
2405
-
\end{itemize}
2406
-
2407
-
Be aware that the memory allocated by this buffer is global and is not freed, see section~\ref{uniquepointers}.
2408
-
2409
-
See below for example steps to build the Python bindings using CMake:
2395
+
To build the Python package, run the following commands:
The created package will be in the folder \texttt{python/dist}.
2410
+
The following additional CMake options are available when building the Python package:
2411
+
2412
+
\begin{itemize}
2413
+
\item\texttt{BUFFER\_SIZE} --- The size of the global pointer buffer (defaults to 128) for naming Tracy profiling entities like frame marks, plots, and memory locations.
2414
+
\item\texttt{NAME\_LENGTH} --- The maximum length (defaults to 128) of a name stored in the global pointer buffer.
2415
+
\item\texttt{EXTERNAL\_PYBIND11} --- Can be used to disable the download of pybind11 when Tracy is embedded in another CMake project that already uses pybind11.
2416
+
\end{itemize}
2417
+
2418
+
Be aware that the memory allocated by this buffer is global and is not freed, see section~\ref{uniquepointers}.
0 commit comments