X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fprofiler%2Flog-args.c;h=b20444f31db4fc324d731d8c6a3d15301627bca8;hb=bfc76bafbf72f8e10c4d2cc7b12e779715c527fa;hp=3cfadd1e5138ba73a8edc41cd0d618dceb975a53;hpb=919a03d17d36604f05e1d99c3f9f26a1509e9655;p=mono.git diff --git a/mono/profiler/log-args.c b/mono/profiler/log-args.c index 3cfadd1e513..b20444f31db 100644 --- a/mono/profiler/log-args.c +++ b/mono/profiler/log-args.c @@ -104,6 +104,24 @@ parse_arg (const char *arg, ProfilerConfig *config) } else if (match_option (arg, "calldepth", &val)) { char *end; config->max_call_depth = strtoul (val, &end, 10); + } else if (match_option (arg, "callspec", &val)) { + if (!val) + val = ""; + if (val[0] == '\"') + ++val; + char *spec = g_strdup (val); + size_t speclen = strlen (val); + if (speclen > 0 && spec[speclen - 1] == '\"') + spec[speclen - 1] = '\0'; + char *errstr; + if (!mono_callspec_parse (spec, &config->callspec, &errstr)) { + mono_profiler_printf_err ( + "Could not parse callspec: '%s': %s", spec, + errstr); + g_free (errstr); + mono_callspec_cleanup (&config->callspec); + } + g_free (spec); } else if (match_option (arg, "covfilter-file", &val)) { if (config->cov_filter_files == NULL) config->cov_filter_files = g_ptr_array_new ();