diff options
| author | Alexander Potapenko <glider@google.com> | 2017-10-16 11:50:46 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-10-16 14:09:52 +0200 |
| commit | 419e3a859c0e84369b87dfffc174032f5d1b944a (patch) | |
| tree | 4989c41a72efa54fc111ef84aebad95698818e96 /executor/executor.h | |
| parent | 66aeb467de80c92a099e49eaad6c25974c96f9cf (diff) | |
executor: add PC to kcov_comparison_t
KCOV comparisons support is in the kernel mm tree already, and the
patch contains an additional uint64_t to store PCs of functions calling
__sanitizer_cov_trace_XXX().
Change kcov_comparison_t accordingly.
Diffstat (limited to 'executor/executor.h')
| -rw-r--r-- | executor/executor.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/executor/executor.h b/executor/executor.h index 0eb0e4fc4..94d3a2ca0 100644 --- a/executor/executor.h +++ b/executor/executor.h @@ -119,6 +119,7 @@ struct kcov_comparison_t { uint64_t type; uint64_t arg1; uint64_t arg2; + uint64_t pc; // Writes the structure using the write_one function for each field. // Inspired by write_output() function. @@ -619,7 +620,7 @@ uint64_t read_input(uint64_t** input_posp, bool peek) void kcov_comparison_t::write(uint32_t* (*write_one)(uint32_t)) { - // Write order: type arg1 arg2. + // Write order: type arg1 arg2 pc. write_one((uint32_t)type); // KCOV converts all arguments of size x first to uintx_t and then to @@ -657,6 +658,7 @@ void kcov_comparison_t::write(uint32_t* (*write_one)(uint32_t)) bool kcov_comparison_t::operator==(const struct kcov_comparison_t& other) const { + // We don't check for PC equality now, because it is not used. return type == other.type && arg1 == other.arg1 && arg2 == other.arg2; } @@ -666,5 +668,6 @@ bool kcov_comparison_t::operator<(const struct kcov_comparison_t& other) const return type < other.type; if (arg1 != other.arg1) return arg1 < other.arg1; + // We don't check for PC equality now, because it is not used. return arg2 < other.arg2; } |
