# プロファイリングツール

> Reference for various profiling tools available for performance analysis.

アプリケーションの[プロファイリング](https://en.wikipedia.org/wiki/Profiling_\(computer_programming\))は、そのパフォーマンスを測定する最善の方法です。さまざまなプロファイリングツールを使用して、メモリの使用量、CPU パフォーマンス、GPU パフォーマンス、カスタムスクリプトなど、アプリケーションの要素に問題がありそうな場所を把握することができます。

## Unity のプロファイリングツール

Unity には、アプリケーションのパフォーマンスを測定するためのツールがいくつかあります。

* [Unity Profiler](/engine/6000.0/manual/analysis/profiler.md): Unity エディターや再生モードのアプリケーションのパフォーマンスを測定する、開発モードでアプリケーションを実行しているデバイスに接続する、などが可能です。
* [Profiling Core パッケージ](https://docs.unity3d.com/Packages/com.unity.profiling.core@latest): Unity Profiler のキャプチャにコンテキスト情報を追加するために使用する API を提供します。
* [Memory Profiler](https://docs.unity3d.com/Packages/com.unity.memoryprofiler@latest): メモリの性能の詳細な分析を提供するツールです。
* [Profile Analyzer](https://docs.unity3d.com/Packages/com.unity.performance.profile-analyzer@latest): 2 つのプロファイリングデータセットを比較して、変更がアプリケーションのパフォーマンスにどのように影響するかを分析します。
* [Frame Debugger](/engine/6000.0/manual/rendering-and-post-processing/graphics-performance-profiling/profile-rendering/frame-debugger/frame-debugger.md): アプリケーションのグラフィカルなパフォーマンスを測定する方法を提供するツールです。

### サードパーティ製のプロファイリングツール

Unity Profiler と併せて、プラットフォーム固有のプロファイラーを使用して、アプリケーションが期待どおりに実行されることを確認します。使用可能なプロファイリングツールの例を以下に示します。また、Unity の[低レベルネイティブプラグイン Profiler API](/engine/6000.0/manual/scripting/compilation-and-code-reload/plug-ins/native-plugin-interface/low-level-native-plugin-profiler.md) を使用して、プロファイリングデータをサードパーティ製のプロファイリングツールにエクスポートすることもできます。

* **Android**

  * 一般的な Android GPU プロファイリング: サポートするデバイスを持っている場合は、Google の [Android GPU Inspector](https://developer.android.com/agi) を使用します。
  * ARM CPU: ARM Mobile Studio の [Streamline](https://developer.arm.com/tools-and-software/embedded/arm-development-studio/components/streamline-performance-analyzer) です。
  * Arm Mali GPU: GPU とシステムプロファイリングには [Arm Mobile Studio](https://developer.arm.com/solutions/hpc/hpc-software/categories/profiling-tools) のツールを使用します。
  * Imagination PowerVR GPU: GPU プロファイリングには [PVRTune](https://developer.imaginationtech.com/pvrtune/) を使用します。
  * Qualcomm のチップ: GPU およびシステムプロファイリングには [Snapdragon Profiler](https://developer.qualcomm.com/software/snapdragon-profiler) を使用します。

* **macOS と iOS**

  * [Xcode](https://developer.apple.com/xcode/)
  * [Xcode GPU Frame Capture](https://developer.apple.com/documentation/metal/frame_capture_debugging_tools/)

* **PC**

  * [AMD uProf](https://developer.amd.com/amd-uprof/)
  * [Intel GPA](https://www.intel.com/content/www/us/en/developer/tools/graphics-performance-analyzers/overview.html)
  * [NVIDIA Nsight Graphics](https://developer.nvidia.com/nsight-graphics)
  * [PIX on Windows](https://devblogs.microsoft.com/pix/download/)
  * [Superluminal](https://superluminal.eu/)
  * [VTune](https://www.intel.com/content/www/us/en/developer/tools/oneapi/vtune-profiler.html)
  * [Windows Performance Analysis Toolkit](https://docs.microsoft.com/en-us/windows-hardware/test/wpt/)
  * [Visual Studio graphics debugger](http://msdn.microsoft.com/en-us/library/hh315751.aspx)
  * [RenderDoc](https://github.com/baldurk/renderdoc)
  * [Radeon Developer Tool Suite](https://gpuopen.com/introducing-radeon-developer-tool-suite/)
  * [GPU Driver Instruments](https://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Instrument-GPUDriver.html)

これらのツールは、[IL2CPP](/engine/6000.0/manual/scripting/compilation-and-code-reload/backends/il2cpp.md) を使用してプロジェクトの C++ バージョンを作成することのできるプラットフォームの中で最も実用的です。これらのネイティブコード版は、Mono で実行されている場合には利用できない、透過なコールスタックと高解像度のメソッドのタイミングを提供します。
