TEMU  4.4
The Terma Emulator
Profiling.h
Go to the documentation of this file.
1 //===-- temu-c/Profiling.h - TEMU Profiling and Coverage --------*- C++ -*-===//
2 //
3 // TEMU: The Terma Emulator
4 // (c) Terma 2021
5 // Authors: Mattias Holm <maho (at) terma.com>
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef TEMU_PROFILING_H
10 #define TEMU_PROFILING_H
11 
12 #include <stdint.h>
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 /*!
19  * Experimental coverage support
20  *
21  * This file declares a number of functions useful for working with coverage.
22  *
23  * The support here is experimental.
24  */
25 
26 /*!
27  * Write branch counters in YAML format
28  *
29  * Coverage is stored using physical addresses.
30  * \param fileName Name of file to write
31  * \result 0 if successful
32  */
33 int xemu_writeBranchCounters(const char *fileName);
34 
35 /*!
36  * Get a branch counter for the specific arc
37  * \param src Source physical address
38  * \param tgt Target physical address
39  * \result Pointer to the counter
40  */
41 uint64_t * xemu_getBranchCounter(uint64_t src, uint64_t tgt);
42 
43 #ifdef __cplusplus
44 }
45 #endif
46 
47 
48 #endif // !TEMU_PROFILING_H
xemu_getBranchCounter
uint64_t * xemu_getBranchCounter(uint64_t src, uint64_t tgt)
xemu_writeBranchCounters
int xemu_writeBranchCounters(const char *fileName)