summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2019-03-01 22:16:56 +0100
committerJan Kotas <jkotas@microsoft.com>2019-03-01 13:16:56 -0800
commit2f4a95b3a4bc8c3a2b928eb59b7a88c5de84b4e9 (patch)
tree2cfb95fdcdcc42d344b701c758a6d1277c158a30
parent919a19ce1d000049e9dd7e886760b8f03d861af9 (diff)
downloadcoreclr-2f4a95b3a4bc8c3a2b928eb59b7a88c5de84b4e9.tar.gz
coreclr-2f4a95b3a4bc8c3a2b928eb59b7a88c5de84b4e9.tar.bz2
coreclr-2f4a95b3a4bc8c3a2b928eb59b7a88c5de84b4e9.zip
Remove unused code from EventSource (#22853)
FallbackActivityId is theoretically references in CoreFX but it's under never defined FEATURE_ACTIVITYSAMPLING and the implementation should live in CoreFX part anyway
-rw-r--r--src/System.Private.CoreLib/System.Private.CoreLib.csproj1
-rw-r--r--src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs33
-rw-r--r--src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/StubEnvironment.cs3
3 files changed, 0 insertions, 37 deletions
diff --git a/src/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/System.Private.CoreLib/System.Private.CoreLib.csproj
index afcfcf763f..df8bd2ac0b 100644
--- a/src/System.Private.CoreLib/System.Private.CoreLib.csproj
+++ b/src/System.Private.CoreLib/System.Private.CoreLib.csproj
@@ -269,7 +269,6 @@
<Compile Include="$(BclSourcesRoot)\System\WeakReference.cs" />
<Compile Include="$(BclSourcesRoot)\System\WeakReferenceOfT.cs" />
<Compile Include="shared\Interop\Windows\Kernel32\Interop.GetCurrentProcessId.cs" />
- <Compile Include="shared\Interop\Windows\Kernel32\Interop.GetCurrentThreadId.cs" />
<Compile Include="shared\Interop\Windows\Kernel32\Interop.GetStdHandle.cs" />
<Compile Include="shared\Interop\Windows\Kernel32\Interop.LocalAlloc.cs" />
<Compile Include="shared\Interop\Windows\Kernel32\Interop.QueryUnbiasedInterruptTime.cs" />
diff --git a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs
index fc5b26c32e..1f98dd55aa 100644
--- a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs
+++ b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs
@@ -434,39 +434,6 @@ namespace System.Diagnostics.Tracing
eventSource.SendCommand(null, EventProviderType.ETW, 0, 0, command, true, EventLevel.LogAlways, EventKeywords.None, commandArguments);
}
-#if !ES_BUILD_STANDALONE
- /// <summary>
- /// This property allows EventSource code to appropriately handle as "different"
- /// activities started on different threads that have not had an activity created on them.
- /// </summary>
- internal static Guid InternalCurrentThreadActivityId
- {
- get
- {
- Guid retval = CurrentThreadActivityId;
- if (retval == Guid.Empty)
- {
- retval = FallbackActivityId;
- }
- return retval;
- }
- }
-
- internal static Guid FallbackActivityId
- {
- get
- {
- int threadID = Interop.Kernel32.GetCurrentThreadId();
-
- // Managed thread IDs are more aggressively re-used than native thread IDs,
- // so we'll use the latter...
- return new Guid(unchecked((uint)threadID),
- unchecked((ushort)s_currentPid), unchecked((ushort)(s_currentPid >> 16)),
- 0x94, 0x1b, 0x87, 0xd5, 0xa6, 0x5c, 0x36, 0x64);
- }
- }
-#endif // !ES_BUILD_STANDALONE
-
// Error APIs. (We don't throw by default, but you can probe for status)
/// <summary>
/// Because
diff --git a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/StubEnvironment.cs b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/StubEnvironment.cs
index 1ca8dd06a8..c62b517906 100644
--- a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/StubEnvironment.cs
+++ b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/StubEnvironment.cs
@@ -344,9 +344,6 @@ internal static partial class Interop
internal static partial class Kernel32
{
[DllImport("kernel32.dll", CharSet = CharSet.Auto)]
- public static extern int GetCurrentThreadId();
-
- [DllImport("kernel32.dll", CharSet = CharSet.Auto)]
internal static extern uint GetCurrentProcessId();
}
}