[profiler] Hide the GC roots callback behind a macro and mark it obsolete.
ExceptionHandling = 10,
}
- // mono/profiler/log.h : SAMPLE_*
- public enum LogSampleHitType {
- Cycles = 1,
- Instructions = 2,
- CacheMisses = 3,
- CacheHits = 4,
- Branches = 5,
- BranchMisses = 6,
- }
-
// mono/metadata/profiler.h : MonoProfilerGCRootType
[Flags]
public enum LogHeapRootAttributes {
public sealed class SampleHitEvent : LogEvent {
- public LogSampleHitType Type { get; internal set; }
-
public long ThreadId { get; internal set; }
public IReadOnlyList<long> UnmanagedBacktrace { get; internal set; }
switch (extType) {
case LogEventType.SampleHit:
return new SampleHitEvent {
- Type = (LogSampleHitType) Reader.ReadByte (),
ThreadId = ReadPointer (),
UnmanagedBacktrace = ReadBacktrace (true, false),
ManagedBacktrace = ReadBacktrace (true),
../../../external/corefx/src/System.Drawing.Common/src/System/Drawing/Design/ToolboxComponentsCreatingEventHandler.cs
../../../external/corefx/src/System.Drawing.Common/src/System/Drawing/Design/ToolboxItemCreatorCallback.cs
System.Drawing.Design/ToolboxItem.cs
- ../../../external/corefx/src/System.Drawing.Common/src/System/Drawing/Design/UITypeEditor.cs
+../../../external/corefx/src/System.Drawing.Common/src/System/Drawing/Design/UITypeEditor.cs
../../../external/corefx/src/System.Drawing.Common/src/System/Drawing/Design/ToolboxItemCollection.cs
../../../external/corefx/src/System.Drawing.Common/src/System/Drawing/Drawing2D/AdjustableArrowCap.cs
../../../external/corefx/src/System.Drawing.Common/src/System/Drawing/Drawing2D/Blend.cs
ASN1_GENERALIZEDTIME *gtime;
struct tm tm;
int64_t epoch;
+ int ret;
memset (&tm, 0, sizeof (tm));
gtime = ASN1_TIME_to_generalizedtime (time, NULL);
- /* FIXME: check return value of asn1_generalizedtime_to_tm () */
- asn1_generalizedtime_to_tm (&tm, gtime);
+ ret = asn1_generalizedtime_to_tm (&tm, gtime);
ASN1_GENERALIZEDTIME_free (gtime);
+
+ /* FIXME: check the return value in managed code */
+ if (ret == 0) {
+ return 0;
+ }
+
epoch = btls_timegm64 (&tm);
return epoch;
}
}
+ [Category ("!BITCODE")]
public static int test_1_basic_filter_catch () {
try {
MyException e = new MyException ("");
return 0;
}
+ [Category ("!BITCODE")]
public static int test_1234_complicated_filter_catch () {
string res = "init";
try {
[MethodImpl( MethodImplOptions.NoInlining )]
private static bool ExceptionFilter( byte x, FooStruct item ) => true;
+ [Category ("!BITCODE")]
public static int test_0_filter_caller_area () {
try {
throw new Exception();
public static int test_0_isreference_intrins () {
IFaceIsRef iface = new ClassIsRef ();
- Console.WriteLine ("X: " + iface.is_ref<AStruct3<int, int, int>> ());
- Console.WriteLine ("X: " + iface.is_ref<AStruct3<string, int, int>> ());
+ if (iface.is_ref<AStruct3<int, int, int>> ())
+ return 1;
+ if (!iface.is_ref<AStruct3<string, int, int>> ())
+ return 2;
return 0;
}
}
);
emit_event_time (logbuffer, TYPE_SAMPLE | TYPE_SAMPLE_HIT, sample->time);
- emit_byte (logbuffer, SAMPLE_CYCLES);
emit_ptr (logbuffer, (void *) sample->tid);
emit_value (logbuffer, 1);
added an image pointer field to assembly load events
added an exception object field to TYPE_CLAUSE
class unload events no longer exist (they were never emitted)
+ removed type field from TYPE_SAMPLE_HIT
*/
enum {
MONO_PROFILER_GC_HANDLE_DESTROYED,
};
-// Sampling sources
-// Unless you have compiled with --enable-perf-events, only SAMPLE_CYCLES is available
-enum {
- SAMPLE_CYCLES = 1,
- SAMPLE_INSTRUCTIONS,
- SAMPLE_CACHE_MISSES,
- SAMPLE_CACHE_REFS,
- SAMPLE_BRANCHES,
- SAMPLE_BRANCH_MISSES,
- SAMPLE_LAST
-};
-
-
// If you alter MAX_FRAMES, you may need to alter SAMPLE_BLOCK_SIZE too.
#define MAX_FRAMES 32
return NULL;
}
+// For backwards compatibility.
+enum {
+ SAMPLE_CYCLES = 1,
+ SAMPLE_INSTRUCTIONS,
+ SAMPLE_CACHE_MISSES,
+ SAMPLE_CACHE_REFS,
+ SAMPLE_BRANCHES,
+ SAMPLE_BRANCH_MISSES,
+};
+
static const char*
sample_type_name (int type)
{
uint64_t tdiff = decode_uleb128 (p + 1, &p);
LOG_TIME (time_base, tdiff);
time_base += tdiff;
- sample_type = *p++;
+ if (ctx->data_version < 14)
+ sample_type = *p++;
+ else
+ sample_type = SAMPLE_CYCLES;
tstamp = time_base;
} else {
sample_type = decode_uleb128 (p + 1, &p);
<PackAlignmentBoundary>0</PackAlignmentBoundary>
<CallingConvention>0</CallingConvention>
<ErrorReporting>0</ErrorReporting>
- <CommandLineTemplate Condition="'$(Platform)' == 'Win32'">"$(VCInstallDir)bin\ml.exe" /c [AllOptions] [AdditionalOptions] /Ta[Inputs]</CommandLineTemplate>
- <CommandLineTemplate Condition="'$(Platform)' == 'X64'">"$(VCInstallDir)bin\amd64\ml64.exe" /c [AllOptions] [AdditionalOptions] /Ta[Inputs]</CommandLineTemplate>
+ <CommandLineTemplate Condition="'$(Platform)' == 'Win32'">"ml.exe" /c [AllOptions] [AdditionalOptions] /Ta[Inputs]</CommandLineTemplate>
+ <CommandLineTemplate Condition="'$(Platform)' == 'X64'">"ml64.exe" /c [AllOptions] [AdditionalOptions] /Ta[Inputs]</CommandLineTemplate>
<CommandLineTemplate Condition="'$(Platform)' != 'Win32' and '$(Platform)' != 'X64'">echo MASM not supported on this platform</CommandLineTemplate>
<ExecutionDescription>Assembling %(Identity)...</ExecutionDescription>
</MASM>