Control Data Collection
export INTEL_LIBITTNOTIFY64=libtcc_collector.so <additional environment variables to control data collection>
Description / Examples
Use a shared memory ring buffer instead of a local buffer to store all measurement results. Can be true or false. Default: false.
When the shared memory mode is enabled, the second (monitoring) application can attach to the shared buffer and process the measurement results.
Define the buffers that will hold the measurements generated from your application. If your application has multiple measurement instances, you can define a buffer for each instance. One buffer will be created per instance.
Full format description:
For each measurement instance in your application, specify:
File where measurements are logged after the program finishes. If the measurement library cannot open the provided file, nothing will be stored.
NOTE:Use either implicit output (TCC_MEASUREMENTS_DUMP_FILE) or explicit output (“print” described in Analyze Measurements Offline).
Time unit that will be used to store the results. If the TCC measurement library cannot parse
TCC_MEASUREMENTS_TIME_UNIT, clk will be used. Options:
/* Extract the deadline settings from the environment variable */ uint64_t deadline, deadline_raw; TCC_TIME_UNIT unit = tcc_measurement_get_time_unit_from_env(); deadline_raw = tcc_measurement_get_deadline_from_env(measurement_name); deadline = tcc_measurement_convert_time_units_to_clock(deadline_raw, unit);
Examples of Controlling the Collector Behavior
- Example 1: The measurement library collector will create a local ring buffer that can hold 1000 measurements. The collector will store the measurement results for the “Input” measurement instance in the buffer during application run. After the application is finished, the results will vanish.INTEL_LIBITTNOTIFY64=libtcc_collector.so TCC_MEASUREMENTS_BUFFERS=Input:1000 ./myapp
- Example 2: The measurement library collector will create two buffers that can hold 1000 measurements each. The collector will store the measurement results in the buffers during application run. After the application is finished, the last 1000 results of each measurement instance will be stored in the dump.txt file. The format is explained in Analyze Measurements Offline. The data will be stored in CPU clock cycles.INTEL_LIBITTNOTIFY64=libtcc_collector.so TCC_MEASUREMENTS_DUMP_FILE=dump.txt TCC_MEASUREMENTS_BUFFERS=Input:1000,Compute:1000 ./myapp
- Example 3: The measurement library collector will create two buffers in shared memory. Each buffer can hold 10 measurements each. The collector will store the measurement results in the buffers during application run. After the application is finished, the last 10 results of each measurement instance will be stored in the dump.txt file. The shared memory always keeps data in CPU clock cycles (raw measurements) while the output file (dump.txt) uses the configured time units. The deadline value does not influence collector behavior. You can decide how to use the value in your code.INTEL_LIBITTNOTIFY64=libtcc_collector.so TCC_USE_SHARED_MEMORY=true TCC_MEASUREMENTS_TIME_UNIT=us TCC_MEASUREMENTS_DUMP_FILE=dump.txt TCC_MEASUREMENTS_BUFFERS=Input:10:10,Compute:10:100 ./myapp