bootloader: reduce verbosity

- Disable tracing where it's not needed by default
- Convert some drpintf to TRACE statements
- Comment some dprintf out completely in files that don't have a TRACE
  macro.

Change-Id: I1f6062bce74bcf1dbf77bf7bccadeeb12a4df46c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2370
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
PulkoMandy 2020-03-16 17:54:45 +01:00 committed by waddlesplash
parent ae5a068f62
commit a207d7b35b
4 changed files with 12 additions and 12 deletions

View File

@ -119,7 +119,7 @@ add_stage2_driver_settings(stage2_args* args)
// TODO: split more intelligently
for (const char** arg = args->arguments;
arg != NULL && args->arguments_count-- && arg[0] != NULL; arg++) {
dprintf("adding args: '%s'\n", arg[0]);
//dprintf("adding args: '%s'\n", arg[0]);
add_safe_mode_settings((char*)arg[0]);
}
return B_OK;

View File

@ -15,7 +15,7 @@
#include <platform/openfirmware/devices.h>
#include <platform/openfirmware/openfirmware.h>
#define TRACE_CPU
//#define TRACE_CPU
#ifdef TRACE_CPU
# define TRACE(x) dprintf x
#else

View File

@ -71,7 +71,7 @@ remove_virtual_range_to_keep(void *start, uint32 size)
static status_t
find_physical_memory_ranges(size_t &total)
{
dprintf("checking for memory...\n");
TRACE("checking for memory...\n");
intptr_t package = of_instance_to_package(sMemoryInstance);
total = 0;
@ -110,10 +110,10 @@ find_physical_memory_ranges(size_t &total)
for (int32 i = 0; i < count; i++) {
if (regions[i].size <= 0) {
dprintf("%d: empty region\n", i);
TRACE("%d: empty region\n", i);
continue;
}
dprintf("%" B_PRIu32 ": base = %" B_PRIx64 ","
TRACE("%" B_PRIu32 ": base = %" B_PRIx64 ","
"size = %" B_PRIx64 "\n", i, regions[i].base, regions[i].size);
total += regions[i].size;
@ -225,7 +225,7 @@ find_allocated_ranges(void **_exceptionHandlers)
}
length = length / sizeof(struct translation_map);
uint32 total = 0;
dprintf("found %d translations\n", length);
TRACE("found %d translations\n", length);
for (int i = 0; i < length; i++) {
struct translation_map *map = &translations[i];
@ -271,7 +271,7 @@ find_allocated_ranges(void **_exceptionHandlers)
total += map->length;
}
dprintf("total size kept: %" B_PRIu32 "\n", total);
TRACE("total size kept: %" B_PRIu32 "\n", total);
// remove the boot loader code from the virtual ranges to keep in the
// kernel
@ -576,7 +576,7 @@ arch_mmu_init(void)
dprintf("Error: could not find physical memory ranges!\n");
return B_ERROR;
}
dprintf("total physical memory = %luMB\n", total / (1024 * 1024));
TRACE("total physical memory = %luMB\n", total / (1024 * 1024));
void *exceptionHandlers = (void *)-1;
if (find_allocated_ranges(&exceptionHandlers) != B_OK) {
@ -600,11 +600,11 @@ arch_mmu_init(void)
// set kernel args
dprintf("virt_allocated: %" B_PRIu32 "\n",
TRACE("virt_allocated: %" B_PRIu32 "\n",
gKernelArgs.num_virtual_allocated_ranges);
dprintf("phys_allocated: %" B_PRIu32 "\n",
TRACE("phys_allocated: %" B_PRIu32 "\n",
gKernelArgs.num_physical_allocated_ranges);
dprintf("phys_memory: %" B_PRIu32 "\n",
TRACE("phys_memory: %" B_PRIu32 "\n",
gKernelArgs.num_physical_memory_ranges);
#if 0

View File

@ -12,7 +12,7 @@
#include <platform/openfirmware/openfirmware.h>
#define TRACE_HEAP 1
//#define TRACE_HEAP 1
#if TRACE_HEAP
# define TRACE(x) printf x
#else