|
|
|
@ -108,7 +108,16 @@ namespace ICSharpCode.Profiler.Controller.Data
@@ -108,7 +108,16 @@ namespace ICSharpCode.Profiler.Controller.Data
|
|
|
|
|
return instance; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} catch (Exception) { |
|
|
|
|
// These exceptions happen when something is wrong with the system settings or the perfmon service is not started.
|
|
|
|
|
// We will ignore performance counters in those cases.
|
|
|
|
|
} catch (Win32Exception) { |
|
|
|
|
// Win32Exception (0x80004005): The service cannot be started, either because it is disabled
|
|
|
|
|
// or because it has no enabled devices associated with it
|
|
|
|
|
// see http://community.sharpdevelop.net/forums/p/10709/29534.aspx#29534
|
|
|
|
|
return null; |
|
|
|
|
} catch (InvalidOperationException) { |
|
|
|
|
// InvalidOperationException: Cannot load Counter Name data because an invalid index '' was read from the registry.
|
|
|
|
|
// see http://community.sharpdevelop.net/forums/p/14180/37895.aspx#37895 and SD-1819
|
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|