-
Notifications
You must be signed in to change notification settings - Fork 18
3. UFO Tracing In Depth
Andrew Chin edited this page May 2, 2019
·
4 revisions
During runtime, when an event occurs (memory reads and writes, function entry and exit, memory allocation and deallocation, thread creation, start, end, and join, condition wait and signal, mutex lock and unlock, and fork), TSan calls a function to track races (although TSan is focused on memory reads/writes). By inserting calls to the UFO tracing library in these functions, we can generate traces as a program executes. Here are the locations of the calls we insert into the TSan RTL:
- trace init and finish
- tsan_interface.cc:29
__tsan_init()--> we insertaser::ufo::init_ufo() - tsan_rtl.cc:409
Finalize()--> we insertaser::ufo::finish_ufo()
- tsan_interface.cc:29
- tsan_rtl.cc
- line 468
ForkBefore()-> we insertaser::ufo::before_fork()
- line 468
- tsan_mman.cc
- tsan_rtl_thread.cc
- tsan+interceptors.cc
- tsan_rtl_mutex.cc