diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Mono.Profiler/Mono.Profiler.mds | 4 | ||||
-rw-r--r-- | Mono.Profiler/mprof-runtime/AssemblyInfo.cs | 30 | ||||
-rw-r--r-- | Mono.Profiler/mprof-runtime/Runtime.cs | 16 | ||||
-rw-r--r-- | Mono.Profiler/mprof-runtime/mprof-runtime.mdp | 24 |
5 files changed, 78 insertions, 0 deletions
@@ -1,3 +1,7 @@ +2008-10-10 Massimiliano Mantione <massi@ximian.com> + * Mono.Profiler/Mono.Profiler.mds, Mono.Profiler/mprof-runtime/: + Preliminary (but working) code to control the profiler at runtime. + 2008-10-09 Daniel Nauck <dna@mono-project.de> * Makefile.am, configure.in: diff --git a/Mono.Profiler/Mono.Profiler.mds b/Mono.Profiler/Mono.Profiler.mds index 217748fc..f579e3f4 100644 --- a/Mono.Profiler/Mono.Profiler.mds +++ b/Mono.Profiler/Mono.Profiler.mds @@ -5,12 +5,14 @@ <Entry build="True" name="mprof-decoder" configuration="Debug" /> <Entry build="True" name="mprof-heap-viewer" configuration="Debug" /> <Entry build="True" name="mprof-heap-explorer" configuration="Debug" /> + <Entry build="True" name="mprof-runtime" configuration="Debug" /> </Configuration> <Configuration name="Release" ctype="CombineConfiguration"> <Entry build="True" name="mprof-decoder-library" configuration="Release" /> <Entry build="True" name="mprof-decoder" configuration="Release" /> <Entry build="True" name="mprof-heap-viewer" configuration="Release" /> <Entry build="True" name="mprof-heap-explorer" configuration="Release" /> + <Entry build="True" name="mprof-runtime" configuration="Release" /> </Configuration> </Configurations> <StartMode startupentry="mprof-decoder" single="True"> @@ -18,6 +20,7 @@ <Execute type="None" entry="mprof-decoder" /> <Execute type="None" entry="mprof-heap-viewer" /> <Execute type="None" entry="mprof-heap-explorer" /> + <Execute type="None" entry="mprof-runtime" /> </StartMode> <MonoDevelop.ChangeLogAddIn.ChangeLogInfo policy="UpdateNearestChangeLog" /> <Entries> @@ -25,5 +28,6 @@ <Entry filename="profiler-file-decoder/profiler-file-decoder.mdp" /> <Entry filename="heap-snapshot-viewer/heap-snapshot-viewer.mdp" /> <Entry filename="heap-snapshot-explorer/heap-snapshot-explorer.mdp" /> + <Entry filename="mprof-runtime/mprof-runtime.mdp" /> </Entries> </Combine>
\ No newline at end of file diff --git a/Mono.Profiler/mprof-runtime/AssemblyInfo.cs b/Mono.Profiler/mprof-runtime/AssemblyInfo.cs new file mode 100644 index 00000000..1acaf869 --- /dev/null +++ b/Mono.Profiler/mprof-runtime/AssemblyInfo.cs @@ -0,0 +1,30 @@ +// AssemblyInfo.cs created with MonoDevelop +// User: massi at 7:28 PMĀ 9/7/2008 +// +// To change standard headers go to Edit->Preferences->Coding->Standard Headers +// +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle("mprof-runtime")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// If the build and revision are set to '*' they will be updated automatically. + +[assembly: AssemblyVersion("1.0.*.*")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] diff --git a/Mono.Profiler/mprof-runtime/Runtime.cs b/Mono.Profiler/mprof-runtime/Runtime.cs new file mode 100644 index 00000000..eb104a3a --- /dev/null +++ b/Mono.Profiler/mprof-runtime/Runtime.cs @@ -0,0 +1,16 @@ +using System; +using System.Runtime.CompilerServices; + +namespace Mono.Profiler { + public class RuntimeControls { + + [MethodImplAttribute(MethodImplOptions.InternalCall)] + public static extern void TakeHeapSnapshot (); + + [MethodImplAttribute(MethodImplOptions.InternalCall)] + public static extern void EnableProfiler (); + + [MethodImplAttribute(MethodImplOptions.InternalCall)] + public static extern void DisableProfiler (); + } +} diff --git a/Mono.Profiler/mprof-runtime/mprof-runtime.mdp b/Mono.Profiler/mprof-runtime/mprof-runtime.mdp new file mode 100644 index 00000000..4dcbe4b9 --- /dev/null +++ b/Mono.Profiler/mprof-runtime/mprof-runtime.mdp @@ -0,0 +1,24 @@ +<Project name="mprof-runtime" fileversion="2.0" language="C#" clr-version="Net_2_0" ctype="DotNetProject"> + <Configurations active="Debug"> + <Configuration name="Debug" ctype="DotNetProjectConfiguration"> + <Output directory="bin/Debug" assembly="mprof-runtime" /> + <Build debugmode="True" target="Library" /> + <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_2_0" /> + <CodeGeneration compiler="Mcs" warninglevel="4" optimize="False" unsafecodeallowed="False" generateoverflowchecks="False" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" /> + </Configuration> + <Configuration name="Release" ctype="DotNetProjectConfiguration"> + <Output directory="bin/Release" assembly="mprof-runtime" /> + <Build debugmode="False" target="Library" /> + <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_2_0" /> + <CodeGeneration compiler="Mcs" warninglevel="4" optimize="False" unsafecodeallowed="False" generateoverflowchecks="False" generatexmldocumentation="False" ctype="CSharpCompilerParameters" /> + </Configuration> + </Configurations> + <Contents> + <File name="Runtime.cs" subtype="Code" buildaction="Compile" /> + <File name="AssemblyInfo.cs" subtype="Code" buildaction="Compile" /> + </Contents> + <References> + <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> + </References> + <Deployment.LinuxDeployData generatePcFile="False" /> +</Project>
\ No newline at end of file |