History

Add disable garbage collector flag

arr committed 9 years ago

Commit 27bffe61 parent dd16d0c1 file · +11 −2Browse files

Showing the changes to src/exec/main.cpp (1 of 1 file). Show all

Unified · Split

src/exec/main.cpp+11−2
@@ -258,11 +258,13 @@ void print_banner(const exec_options &options) · 257 unmodified lines
258void print_help()258void print_help()
259{259{
260 std::cout260 std::cout
261 << "Usage: disvm-exec [-d[e|m|x]*] [-l[s|S|t|T|e|g|m]*] [-t <num>] [-q] [-h] <entry module> <args>*\n"261 << "Usage: disvm-exec [-d[e|m|x]*] [-l[s|S|t|T|e|g|m]*] [-gD] [-t <num>] [-q] [-h] <entry module> <args>*\n"
262 " d - Enable debugger\n"262 " d - Enable debugger\n"
263 " e - Break on entry\n"263 " e - Break on entry\n"
264 " m - Break on module load\n"264 " m - Break on module load\n"
265 " x - Break on exception (first chance)\n"265 " x - Break on exception (first chance)\n"
266 " g - Garbage collector options\n"
267 " D - Disable\n"
266 " l - Enable logging in a component\n"268 " l - Enable logging in a component\n"
267 " s - Scheduler\n"269 " s - Scheduler\n"
268 " S - Stack\n"270 " S - Stack\n"
@@ -274,7 +276,7 @@ void print_help() · 5 unmodified lines
274 " m - Memory allocations (noisy)\n"276 " m - Memory allocations (noisy)\n"
275 " q - Suppress banner and configuration\n"277 " q - Suppress banner and configuration\n"
276 " t - Specify the number of system threads to use (0 < x <= 4)\n"278 " t - Specify the number of system threads to use (0 < x <= 4)\n"
277 " h - Print help (alternative: '?')\n";279 " h - Print this help (alternative: '?')\n";
278}280}
279 281
280void log_callback(const component_trace_t origin, const log_level_t level, const char *msg_fmt, std::va_list args)282void log_callback(const component_trace_t origin, const log_level_t level, const char *msg_fmt, std::va_list args)
@@ -335,6 +337,13 @@ void process_arg(char* arg, std::function<char *()> next, exec_options &options) · 54 unmodified lines
335 }337 }
336 break;338 break;
337 339
340 case 'g':
341 if (arg_len <= 2 || arg[2] != 'D')
342 throw arg_exception_t{ "Invalid garbage collector option" };
343
344 options.vm_config.create_gc = disvm::runtime::create_no_op_gc;
345 break;
346
338 case 't':347 case 't':
339 {348 {
340 auto sys_threads_str = next();349 auto sys_threads_str = next();