Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Feature Request Unity Profiler measure cache hits

Discussion in 'Profiler Previews' started by TJHeuvel-net, Apr 12, 2023.

  1. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
    Sadly i missed the devdays, but i had wanted to ask this question.

    With DOTS, Unity is fully embracing data oriented design. One of the main tenants is increased performance because of better memory layout, resulting in more cache hits.

    How our applications interact with memory, and cache in particular, has a huge impact on its performance. Sadly though, the Unity Profiler does not show any of this. We have to retort to using Intel VTune or AMD UPerf for this information, and its very hard to read.

    Some .NET tools can show cache hits already, are there any plans to integrate this into the Unity profiler? At the moment its a great tool to see what is slow, but not why it is. An extra column to show cache hit/miss would help tremendously!
     
    alexeyzakharov likes this.
  2. alexeyzakharov

    alexeyzakharov

    Joined:
    Jul 2, 2014
    Posts:
    508
    Thanks for the idea and the link @TJHeuvel-net ! I've added the request to the productboard for tracking.
    We don't currently have plans to integrate this.

    It is indeed - at Unity level we can generally only map L3 cache misses to our markers as it is very likely that thread can change core within a marker scope.
    I'm curious - did you manage to use user tracks in Intel VTune to see cache misses within Unity markers?
     
    TJHeuvel-net likes this.
  3. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
    Thanks a lot! No sadly, this is what makes it all so hard to read, so we're back to guessing how our program interacts with memory/cache.
     
    alexeyzakharov likes this.