| 1 | //===----------------------------------------------------------------------===// |
|---|---|
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | /// |
| 9 | /// \file |
| 10 | /// RPC packet shared by the device and host ConcurrencySanitizer runtimes. |
| 11 | /// |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef CSAN_OFFLOAD_PACKET_H |
| 15 | #define CSAN_OFFLOAD_PACKET_H |
| 16 | |
| 17 | #include "csan_defs.h" |
| 18 | #include "sanitizer_common/sanitizer_internal_defs.h" |
| 19 | #include "sanitizer_common/sanitizer_offload_opcodes.h" |
| 20 | |
| 21 | struct __csan_gpu_race { |
| 22 | __sanitizer::u64 pc; |
| 23 | __sanitizer::u64 peer_pc; |
| 24 | __sanitizer::u64 addr; |
| 25 | __sanitizer::u32 size; |
| 26 | __sanitizer::u32 access_type; |
| 27 | __sanitizer::u32 kind; |
| 28 | __sanitizer::u32 block[3]; |
| 29 | __sanitizer::u16 thread[3]; |
| 30 | __sanitizer::u8 lane; |
| 31 | __sanitizer::u8 peer_lane; |
| 32 | __sanitizer::u8 peer_access_type; |
| 33 | __sanitizer::u8 peer_size; |
| 34 | }; |
| 35 | |
| 36 | static_assert(sizeof(__csan_gpu_race) == 64, |
| 37 | "Offload CSan report must fit one RPC packet"); |
| 38 | |
| 39 | #endif // CSAN_OFFLOAD_PACKET_H |
| 40 |