diff --git a/include/config.h.in b/include/config.h.in index d2d7baff8a..e8063e87ea 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -11,5 +11,6 @@ #mesondefine U3_OS_ENDIAN_big #mesondefine U3_MEMORY_DEBUG +#mesondefine U3_CPU_DEBUG #endif /*CONFIG_H*/ diff --git a/include/noun/trace.h b/include/noun/trace.h index 5b847f5216..838ce835f3 100644 --- a/include/noun/trace.h +++ b/include/noun/trace.h @@ -2,12 +2,6 @@ ** ** This file is in the public domain. */ - /** Options. - **/ - /* U3_CPU_DEBUG: activate profiling. - */ -# undef U3_CPU_DEBUG - /** Data structures. **/ /* u3t_trace: fast execution flags. diff --git a/meson.build b/meson.build index d8c17808cb..4cefeff2ff 100644 --- a/meson.build +++ b/meson.build @@ -265,6 +265,7 @@ incdir = include_directories('include/') conf_data = configuration_data() conf_data.set('URBIT_VERSION', '"0.6.0"') conf_data.set('U3_MEMORY_DEBUG', get_option('gc')) +conf_data.set('U3_CPU_DEBUG', get_option('prof')) osdet = build_machine.system() os_c_flags = ['-funsigned-char','-ffast-math'] diff --git a/meson_options.txt b/meson_options.txt index 4f9bb057a1..a4dd843856 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,2 +1,4 @@ option('gc', type : 'boolean', value : false, description : 'Add debugging information to heap. Run with -g. Breaks image.') +option('prof', type : 'boolean', value : false, + description : 'Activate profiling. Run with -P.')