@@ -71,21 +71,10 @@ auto MiriGenMCShim::createHandle(const GenmcParams &config)
71
71
// FIXME(genmc): expose this setting to Miri
72
72
conf->randomScheduleSeed = " 42" ;
73
73
conf->printRandomScheduleSeed = config.print_random_schedule_seed ;
74
- if (config.quiet )
75
- {
76
- // logLevel = VerbosityLevel::Quiet;
77
- // TODO GENMC: error might be better (or new level for `BUG`)
78
- // logLevel = VerbosityLevel::Quiet;
79
- logLevel = VerbosityLevel::Error;
80
- }
81
- else if (config.log_level_trace )
82
- {
83
- logLevel = VerbosityLevel::Trace;
84
- }
85
- else
86
- {
87
- logLevel = VerbosityLevel::Tip;
88
- }
74
+
75
+ // FIXME(genmc): Add support for setting this from the Miri side.
76
+ // FIXME(genmc): Decide on what to do about warnings from GenMC (keep them disabled until then).
77
+ logLevel = VerbosityLevel::Error;
89
78
90
79
// FIXME(genmc): check if we can enable IPR:
91
80
conf->ipr = false ;
@@ -127,20 +116,14 @@ auto MiriGenMCShim::createHandle(const GenmcParams &config)
127
116
const auto addr = access.getAddr ();
128
117
if (!driverPtr->initVals_ .contains (addr))
129
118
{
130
- MIRI_LOG () << " WARNING: TODO GENMC: requested initial value for address "
131
- << addr << " , but there is none.\n " ;
132
119
return SVal (0xCC00CC00 );
133
120
// BUG_ON(!driverPtr->initVals_.contains(addr));
134
121
}
135
122
auto result = driverPtr->initVals_ [addr];
136
123
if (!result.is_init )
137
124
{
138
- MIRI_LOG () << " WARNING: TODO GENMC: requested initial value for address "
139
- << addr << " , but the memory is uninitialized.\n " ;
140
125
return SVal (0xFF00FF00 );
141
126
}
142
- MIRI_LOG () << " MiriGenMCShim: requested initial value for address " << addr
143
- << " == " << addr.get () << " , returning: " << result << " \n " ;
144
127
return result.toSVal ();
145
128
};
146
129
driver->getExec ().getGraph ().setInitValGetter (initValGetter);
@@ -211,8 +194,6 @@ void MiriGenMCShim::handleThreadJoin(ThreadId thread_id, ThreadId child_id)
211
194
212
195
void MiriGenMCShim::handleThreadFinish (ThreadId thread_id, uint64_t ret_val)
213
196
{
214
- MIRI_LOG () << " GenMC: handleThreadFinish: thread id: " << thread_id << " \n " ;
215
-
216
197
auto pos = incPos (thread_id);
217
198
auto retVal = SVal (ret_val);
218
199
@@ -228,9 +209,7 @@ void MiriGenMCShim::handleThreadFinish(ThreadId thread_id, uint64_t ret_val)
228
209
MemOrdering ord, GenmcScalar old_val) -> LoadResult
229
210
{
230
211
auto pos = incPos (thread_id);
231
- MIRI_LOG () << " Received Load from Miri at address: " << address << " , size " << size
232
- << " with ordering " << ord << " , event: " << pos << " \n " ;
233
-
212
+
234
213
auto loc = SAddr (address);
235
214
auto aSize = ASize (size);
236
215
auto type = AType::Unsigned; // FIXME(genmc): get correct type from Miri(?)
@@ -249,10 +228,6 @@ void MiriGenMCShim::handleThreadFinish(ThreadId thread_id, uint64_t ret_val)
249
228
GenmcScalar rhs_value, GenmcScalar old_val)
250
229
-> ReadModifyWriteResult
251
230
{
252
- MIRI_LOG () << " Received Read-Modify-Write from Miri at address: " << address << " , size "
253
- << size << " with orderings (" << loadOrd << " , " << store_ordering
254
- << " ), rmw op: " << static_cast <uint64_t >(rmw_op) << " \n " ;
255
-
256
231
auto pos = incPos (thread_id);
257
232
258
233
auto loc = SAddr (address);
@@ -288,14 +263,6 @@ void MiriGenMCShim::handleThreadFinish(ThreadId thread_id, uint64_t ret_val)
288
263
MemOrdering success_store_ordering, MemOrdering fail_load_ordering,
289
264
bool can_fail_spuriously) -> CompareExchangeResult
290
265
{
291
-
292
- MIRI_LOG () << " Received Compare-Exchange from Miri (value: " << expected_value << " --> "
293
- << new_value << " , old value: " << old_val << " ) at address: " << address
294
- << " , size " << size << " with success orderings (" << success_load_ordering
295
- << " , " << success_store_ordering
296
- << " ), fail load ordering: " << fail_load_ordering
297
- << " , is weak (can fail spuriously): " << can_fail_spuriously << " \n " ;
298
-
299
266
auto pos = incPos (thread_id);
300
267
301
268
auto loc = SAddr (address);
@@ -335,10 +302,6 @@ void MiriGenMCShim::handleThreadFinish(ThreadId thread_id, uint64_t ret_val)
335
302
MemOrdering ord, StoreEventType store_event_type)
336
303
-> StoreResult
337
304
{
338
- MIRI_LOG () << " Received Store from Miri at address " << address << " , size " << size
339
- << " with ordering " << ord << " , is part of rmw: ("
340
- << static_cast <uint64_t >(store_event_type) << " )\n " ;
341
-
342
305
auto pos = incPos (thread_id);
343
306
344
307
auto loc = SAddr (address);
0 commit comments