mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 22:04:55 +00:00
[lib/Fuzzer] don't record traces when trace collection is off
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237067 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6eb095d7ae
commit
66c6a4c240
@ -191,6 +191,7 @@ class TraceState {
|
|||||||
size_t DataSize);
|
size_t DataSize);
|
||||||
|
|
||||||
void StartTraceRecording() {
|
void StartTraceRecording() {
|
||||||
|
if (!Options.UseTraces) return;
|
||||||
RecordingTraces = true;
|
RecordingTraces = true;
|
||||||
Mutations.clear();
|
Mutations.clear();
|
||||||
}
|
}
|
||||||
@ -294,7 +295,7 @@ int TraceState::TryToAddDesiredData(uint64_t PresentData, uint64_t DesiredData,
|
|||||||
|
|
||||||
void TraceState::TraceCmpCallback(size_t CmpSize, size_t CmpType, uint64_t Arg1,
|
void TraceState::TraceCmpCallback(size_t CmpSize, size_t CmpType, uint64_t Arg1,
|
||||||
uint64_t Arg2) {
|
uint64_t Arg2) {
|
||||||
if (!Options.UseTraces) return;
|
if (!RecordingTraces) return;
|
||||||
int Added = 0;
|
int Added = 0;
|
||||||
if (Options.Verbosity >= 3)
|
if (Options.Verbosity >= 3)
|
||||||
std::cerr << "TraceCmp: " << Arg1 << " " << Arg2 << "\n";
|
std::cerr << "TraceCmp: " << Arg1 << " " << Arg2 << "\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user