diff options
author | Uri Simchoni <urisimchoni@users.noreply.github.com> | 2017-10-02 17:29:49 +0300 |
---|---|---|
committer | Zoltan Varga <vargaz@gmail.com> | 2017-10-02 17:29:49 +0300 |
commit | bfc76bafbf72f8e10c4d2cc7b12e779715c527fa (patch) | |
tree | 6f45a10c8b5fb003d287bc71a3545286f288ede2 /msvc | |
parent | 30cddad5fb4c3d290906a6e6c33ecd8b07d8b48c (diff) |
[profiler] log profiler: limit method instrumentation to selected methods (#5517)
* [trace] remove code that has no effect
* [trace] move program assembly out of MonoTraceSpec
The assembly member represents the program assembly. It's
information the trace spec is matched against, not part of
the trace spec per-se (if two trace specs exist for two purposes
we would still have one program assembly)
* [trace] remove side effects from get_string()
On the way towards supporting multiple trace specs,
remove side effects from get_string() function.
* [trace] remove side effects from get_token()
Remove side effects from get_token() to allow handling
multiple trace specs.
* [trace] fix handling of double exclusion and disabled
When encountering "disabled", do not add an entry to
the trace spec
Fix error handling around double "-" - get_spec()
never returns TOKEN_EXCLUDE and the recursion can
be easily avoided.
* [trace] remove side effects from get_spec()
Another step in making the trace options reusable.
* [trace] rename mono_trace_parse_options() to mono_trace_set_options()
This routine actually sets the tracing options, not just parses an
option string, so set_ is more suitable. This frees up the
mono_trace_parse_options() name for pure parsing, when we later
reuse the parsing code.
* [trace] make tracing options API reusable
Add APIs that parse tracing options and evaluate a method
against the parsed options. The tracing functionality now uses
this API, but other components can use this to apply an operation
to a method based on policy (e.g. profiling)
* [trace] rename MonoTraceSpec to MonoCallSpec
In preparation for reusing call specification beyond the
tracer, rename the data structure - it now only specifies
a set of calls, without indication what should be done with
them.
* [trace] rename mono_trace_set_assembly to mono_callspec_set_assembly
As it becoming a reuse candidate, we remove the "trace" component
from the name.
* [trace-metadata] move callspec code into its own module
Introduce callspec.c/h which encapsulate the call specification
functionality.
* [profiler] add "callspec" option to log profiler
The callspec option define which methods get instrumented
at JIT time with entry/exit calls to the profiler. The
syntax is same as the tracer (--trace=) syntax. To
distinguish between profiler options and callspec, wrap the
callspec with double quotes, as in:
--profile=log:callspec="all-mscorlib",calls
Since this typically runs from a shell, the double quotes have to be
escaped or wrapped in single quotes, as in:
mono '--profile=log:callspec="all-mscorlib",calls' prog.exe
* [metadata] add an error return string to callspec parsing
Instead of printing parsing error messages to standard error,
return an error string. That allows the client to do the right thing
with the error.
Diffstat (limited to 'msvc')
-rw-r--r-- | msvc/libmonoruntime.vcxproj | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/msvc/libmonoruntime.vcxproj b/msvc/libmonoruntime.vcxproj index d2e5ad512cd..84c3083b3a1 100644 --- a/msvc/libmonoruntime.vcxproj +++ b/msvc/libmonoruntime.vcxproj @@ -23,6 +23,7 @@ <ClCompile Include="..\mono\metadata\assembly.c" />
<ClCompile Include="..\mono\metadata\attach.c" />
<ClCompile Include="..\mono\metadata\boehm-gc.c" />
+ <ClCompile Include="..\mono\metadata\callspec.c" />
<ClCompile Include="..\mono\metadata\class-accessors.c" />
<ClCompile Include="..\mono\metadata\class.c" />
<ClCompile Include="..\mono\metadata\cominterop.c" />
@@ -115,6 +116,7 @@ <ClInclude Include="..\mono\metadata\appdomain-icalls.h" />
<ClInclude Include="..\mono\metadata\assembly.h" />
<ClInclude Include="..\mono\metadata\attach.h" />
+ <ClInclude Include="..\mono\metadata\callspec.h" />
<ClInclude Include="..\mono\metadata\cil-coff.h" />
<ClInclude Include="..\mono\metadata\class-internals.h" />
<ClInclude Include="..\mono\metadata\class.h" />
|