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