Skip to content

Commit c82d3be

Browse files
committed
yukon: cleaunp old debug code
1 parent 8f5999b commit c82d3be

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

runtime/core/Heap.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,8 @@ namespace alaska {
309309
size_t wasted = lp->heap_size() * (1 - u);
310310
total_wasted += wasted;
311311

312-
printf("%p - %8f waste: %5lukb %4d iters in %9luns\n", lp, u, wasted / 1024, compaction_iterations, (end - start));
312+
printf("%p - %8f waste: %5lukb %4d iters in %9luns\n", lp, u, wasted / 1024,
313+
compaction_iterations, (end - start));
313314
return true;
314315
});
315316
printf("Total wastage: %lukb\n", total_wasted / 1024);

runtime/yukon/yukon.cpp

+6-12
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ static void init(void) {
135135
sigaction(SIGSEGV, &act, NULL);
136136

137137

138-
signal(SIGABRT, handle_sig);
138+
// signal(SIGABRT, handle_sig);
139139
// signal(SIGSEGV, handle_sig);
140-
signal(SIGBUS, handle_sig);
141-
signal(SIGILL, handle_sig);
140+
// signal(SIGBUS, handle_sig);
141+
// signal(SIGILL, handle_sig);
142142
}
143143

144144

@@ -162,21 +162,16 @@ void __attribute__((constructor(102))) alaska_init(void) {
162162
}
163163

164164
void __attribute__((destructor)) alaska_deinit(void) {
165-
// if (the_runtime != NULL) {
166-
// if (tc != NULL) {
167-
// the_runtime->del_threadcache(tc);
168-
// }
169-
// delete the_runtime;
170-
// }
171-
// set_ht_addr(0);
172165
}
173166

174167
static void *_halloc(size_t sz, int zero) {
168+
// HACK: make it so we *always* zero the data to avoid pagefaults
169+
// *this is slow*
170+
zero = 1;
175171
void *result = NULL;
176172

177173
result = get_tc()->halloc(sz, zero);
178174
auto m = (uintptr_t)alaska::Mapping::translate(result);
179-
printf("halloc(%zu) -> %p (%zx-%zx)\n", sz, result, m, m + sz);
180175
if (result == NULL) errno = ENOMEM;
181176

182177
return result;
@@ -223,7 +218,6 @@ extern "C" void *hrealloc(void *handle, size_t new_size) {
223218

224219

225220
extern "C" void hfree(void *ptr) {
226-
printf("hfree %p\n", ptr);
227221
// no-op if NULL is passed
228222
if (unlikely(ptr == NULL)) return;
229223

0 commit comments

Comments
 (0)