Skip to content

Commit d8a9756

Browse files
surfnerdPauliusd01
andauthored
CHANGE: Remove version defines for profiling. (#1980)
* Remove version defines for profiling. * Fix spelling. --------- Co-authored-by: Paulius Dervinis <[email protected]>
1 parent 5556836 commit d8a9756

File tree

12 files changed

+27
-89
lines changed

12 files changed

+27
-89
lines changed

Packages/com.unity.inputsystem/InputSystem/Actions/InputActionState.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using Unity.Collections.LowLevel.Unsafe;
77
using UnityEngine.InputSystem.Controls;
88
using UnityEngine.InputSystem.LowLevel;
9-
using UnityEngine.InputSystem.Profiler;
9+
using Unity.Profiling;
1010
using UnityEngine.InputSystem.Utilities;
1111

1212
using ProfilerMarker = Unity.Profiling.ProfilerMarker;
@@ -124,9 +124,9 @@ internal unsafe class InputActionState : IInputStateChangeMonitor, ICloneable, I
124124
private InputEventPtr m_CurrentlyProcessingThisEvent;
125125
private Action m_OnBeforeUpdateDelegate;
126126
private Action m_OnAfterUpdateDelegate;
127-
private static readonly InputProfilerMarker k_InputInitialActionStateCheckMarker = new InputProfilerMarker("InitialActionStateCheck");
128-
private static readonly InputProfilerMarker k_InputActionResolveConflictMarker = new InputProfilerMarker("InputActionResolveConflict");
129-
private static readonly InputProfilerMarker k_InputActionCallbackMarker = new InputProfilerMarker("InputActionCallback");
127+
private static readonly ProfilerMarker k_InputInitialActionStateCheckMarker = new ProfilerMarker("InitialActionStateCheck");
128+
private static readonly ProfilerMarker k_InputActionResolveConflictMarker = new ProfilerMarker("InputActionResolveConflict");
129+
private static readonly ProfilerMarker k_InputActionCallbackMarker = new ProfilerMarker("InputActionCallback");
130130

131131
/// <summary>
132132
/// Initialize execution state with given resolved binding information.

Packages/com.unity.inputsystem/InputSystem/Devices/Touchscreen.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using UnityEngine.InputSystem.Layouts;
77
using UnityEngine.InputSystem.LowLevel;
88
using UnityEngine.InputSystem.Utilities;
9-
using UnityEngine.InputSystem.Profiler;
9+
using Unity.Profiling;
1010

1111
////TODO: property that tells whether a Touchscreen is multi-touch capable
1212

@@ -522,8 +522,8 @@ public class Touchscreen : Pointer, IInputStateCallbackReceiver, IEventMerger, I
522522
public ReadOnlyArray<TouchControl> touches { get; protected set; }
523523

524524

525-
static readonly InputProfilerMarker k_TouchscreenUpdateMarker = new InputProfilerMarker("Touchscreen.OnNextUpdate");
526-
static readonly InputProfilerMarker k_TouchAllocateMarker = new InputProfilerMarker("TouchAllocate");
525+
static readonly ProfilerMarker k_TouchscreenUpdateMarker = new ProfilerMarker("Touchscreen.OnNextUpdate");
526+
static readonly ProfilerMarker k_TouchAllocateMarker = new ProfilerMarker("TouchAllocate");
527527

528528
protected TouchControl[] touchControlArray
529529
{

Packages/com.unity.inputsystem/InputSystem/Editor/Internal/InputControlTreeView.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Linq;
55
using UnityEditor.IMGUI.Controls;
66
using UnityEngine.InputSystem.LowLevel;
7-
using UnityEngine.InputSystem.Profiler;
7+
using Unity.Profiling;
88

99
////TODO: make control values editable (create state events from UI and pump them into the system)
1010

@@ -23,7 +23,7 @@ internal class InputControlTreeView : TreeView
2323
public byte[][] multipleStateBuffers;
2424
public bool showDifferentOnly;
2525

26-
static readonly InputProfilerMarker k_InputBuildControlTreeMarker = new InputProfilerMarker("BuildControlTree");
26+
static readonly ProfilerMarker k_InputBuildControlTreeMarker = new ProfilerMarker("BuildControlTree");
2727

2828
public static InputControlTreeView Create(InputControl rootControl, int numValueColumns, ref TreeViewState treeState, ref MultiColumnHeaderState headerState)
2929
{

Packages/com.unity.inputsystem/InputSystem/Editor/Internal/InputEventTreeView.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using UnityEditor.IMGUI.Controls;
55
using UnityEngine.InputSystem.LowLevel;
66
using UnityEditor;
7-
using UnityEngine.InputSystem.Profiler;
7+
using Unity.Profiling;
88

99
////FIXME: this performs horribly; the constant rebuilding on every single event makes the debug view super slow when device is noisy
1010

@@ -23,7 +23,7 @@ internal class InputEventTreeView : TreeView
2323
{
2424
private readonly InputEventTrace m_EventTrace;
2525
private readonly InputControl m_RootControl;
26-
private static readonly InputProfilerMarker k_InputEventTreeBuildRootMarker = new InputProfilerMarker("InputEventTreeView.BuildRoot");
26+
private static readonly ProfilerMarker k_InputEventTreeBuildRootMarker = new ProfilerMarker("InputEventTreeView.BuildRoot");
2727

2828
private enum ColumnId
2929
{

Packages/com.unity.inputsystem/InputSystem/Events/InputEventTrace.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using Unity.Collections;
77
using Unity.Collections.LowLevel.Unsafe;
88
using UnityEngine.InputSystem.Layouts;
9-
using UnityEngine.InputSystem.Profiler;
9+
using Unity.Profiling;
1010

1111
namespace UnityEngine.InputSystem.LowLevel
1212
{
@@ -27,7 +27,7 @@ namespace UnityEngine.InputSystem.LowLevel
2727
public sealed unsafe class InputEventTrace : IDisposable, IEnumerable<InputEventPtr>
2828
{
2929
private const int kDefaultBufferSize = 1024 * 1024;
30-
private static readonly InputProfilerMarker k_InputEvenTraceMarker = new InputProfilerMarker("InputEventTrace");
30+
private static readonly ProfilerMarker k_InputEvenTraceMarker = new ProfilerMarker("InputEventTrace");
3131

3232
/// <summary>
3333
/// If <see name="recordFrameMarkers"/> is enabled, an <see cref="InputEvent"/> with this <see cref="FourCC"/>

Packages/com.unity.inputsystem/InputSystem/InputManager.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
using UnityEngine.InputSystem.Interactions;
1414
using UnityEngine.InputSystem.Utilities;
1515
using UnityEngine.InputSystem.Layouts;
16-
using UnityEngine.InputSystem.Profiler;
16+
using Unity.Profiling;
1717

1818
#if UNITY_EDITOR
1919
using UnityEngine.InputSystem.Editor;
@@ -64,10 +64,10 @@ internal partial class InputManager
6464
public TypeTable interactions => m_Interactions;
6565
public TypeTable composites => m_Composites;
6666

67-
static readonly InputProfilerMarker k_InputUpdateProfilerMarker = new InputProfilerMarker("InputUpdate");
68-
static readonly InputProfilerMarker k_InputTryFindMatchingControllerMarker = new InputProfilerMarker("InputSystem.TryFindMatchingControlLayout");
69-
static readonly InputProfilerMarker k_InputAddDeviceMarker = new InputProfilerMarker("InputSystem.AddDevice");
70-
static readonly InputProfilerMarker k_InputRestoreDevicesAfterReloadMarker = new InputProfilerMarker("InputManager.RestoreDevicesAfterDomainReload");
67+
static readonly ProfilerMarker k_InputUpdateProfilerMarker = new ProfilerMarker("InputUpdate");
68+
static readonly ProfilerMarker k_InputTryFindMatchingControllerMarker = new ProfilerMarker("InputSystem.TryFindMatchingControlLayout");
69+
static readonly ProfilerMarker k_InputAddDeviceMarker = new ProfilerMarker("InputSystem.AddDevice");
70+
static readonly ProfilerMarker k_InputRestoreDevicesAfterReloadMarker = new ProfilerMarker("InputManager.RestoreDevicesAfterDomainReload");
7171

7272
public InputMetrics metrics
7373
{

Packages/com.unity.inputsystem/InputSystem/InputSystem.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
using UnityEngine.InputSystem.Users;
1414
using UnityEngine.InputSystem.XInput;
1515
using UnityEngine.InputSystem.Utilities;
16-
using UnityEngine.InputSystem.Profiler;
16+
using Unity.Profiling;
1717

1818
#if UNITY_EDITOR
1919
using UnityEditor;
@@ -84,9 +84,9 @@ namespace UnityEngine.InputSystem
8484
public static partial class InputSystem
8585
{
8686
#if UNITY_EDITOR
87-
static readonly InputProfilerMarker k_InputInitializeInEditorMarker = new InputProfilerMarker("InputSystem.InitializeInEditor");
87+
static readonly ProfilerMarker k_InputInitializeInEditorMarker = new ProfilerMarker("InputSystem.InitializeInEditor");
8888
#endif
89-
static readonly InputProfilerMarker k_InputRestMarker = new InputProfilerMarker("InputSystem.Reset");
89+
static readonly ProfilerMarker k_InputResetMarker = new ProfilerMarker("InputSystem.Reset");
9090

9191
#region Layouts
9292

@@ -3857,7 +3857,7 @@ private static void PerformDefaultPluginInitialization()
38573857
/// </summary>
38583858
private static void Reset(bool enableRemoting = false, IInputRuntime runtime = null)
38593859
{
3860-
k_InputRestMarker.Begin();
3860+
k_InputResetMarker.Begin();
38613861

38623862
#if UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS
38633863
// Note that in a test setup we might enter reset with project-wide actions already enabled but the
@@ -3917,7 +3917,7 @@ private static void Reset(bool enableRemoting = false, IInputRuntime runtime = n
39173917
EnableActions();
39183918
#endif
39193919

3920-
k_InputRestMarker.End();
3920+
k_InputResetMarker.End();
39213921
}
39223922

39233923
/// <summary>

Packages/com.unity.inputsystem/InputSystem/Plugins/Users/InputUser.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using Unity.Collections;
44
using UnityEngine.InputSystem.LowLevel;
55
using UnityEngine.InputSystem.Utilities;
6-
using UnityEngine.InputSystem.Profiler;
6+
using Unity.Profiling;
77

88
////REVIEW: remove users automatically when exiting play mode?
99

@@ -37,8 +37,8 @@ public struct InputUser : IEquatable<InputUser>
3737
{
3838
public const uint InvalidId = 0;
3939

40-
static readonly InputProfilerMarker k_InputUserOnChangeMarker = new InputProfilerMarker("InputUser.onChange");
41-
static readonly InputProfilerMarker k_InputCheckForUnpairMarker = new InputProfilerMarker("InputCheckForUnpairedDeviceActivity");
40+
static readonly ProfilerMarker k_InputUserOnChangeMarker = new ProfilerMarker("InputUser.onChange");
41+
static readonly ProfilerMarker k_InputCheckForUnpairMarker = new ProfilerMarker("InputCheckForUnpairedDeviceActivity");
4242

4343
/// <summary>
4444
/// Whether this is a currently active user record in <see cref="all"/>.

Packages/com.unity.inputsystem/InputSystem/Profiler.meta

Lines changed: 0 additions & 3 deletions
This file was deleted.

Packages/com.unity.inputsystem/InputSystem/Profiler/InputProfilerMarker.cs

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)