SN Systems Tech Blog

    Measuring the User Debug Experience

    ARTICLE BY: Greg Bedwell
    POSTED: Jul 11, 2019
    TAGS: Compiler, Debugger, LLVM, Toolchain

    For a game to hit 30 frames-per-second, all of the frame compute has to fit into ~33.3 ms, at 60 frames-per-second it has to fit into ~16.7 ms. Games are reliant on compiler optimizations to get near to these target frame times, without these optimizations the game may be unplayable. Unfortunately, compiler optimizations tend to interfere with the "debuggability" of the code. This can be for legitimate reasons, i.e. some optimizations fundamentally changing the structure of the code and it may no longer resemble the original source code. In other cases, it can be down to the compiler not preserving debug information that could have been preserved. Game developers often need to play the fully optimized game in order to trigger the required condition to reproduce a reported bug. Making it easier to debug fully optimized code is a request that we hear regularly from game developers.

    READ THE WHOLE POST 

    Debugging of optimized code: Extending the lifetime of local variables

    ARTICLE BY: Wolfgang Pieb
    POSTED: Nov 30, 2017
    TAGS: Compiler, Debugger, LLVM, LLVM Developers Meeting, Toolchain

    When developing programs, local variables and function parameters are often optimized away by the backend of the compiler to gain the best runtime performance. As a result, these variables and parameters may not be visible when a developer is attempting to debug their optimized programs. For the PS4, game developers commonly write their code with optimizations enabled so they can maintain graphical frame rates (30-60 fps). As such, they regularly encounter loss of debug information, which impacts their productivity. We have introduced an option that forces the various optimization passes to keep local variables and parameters around. This LLVM talk addresses the implementation, effectiveness and performance impact of this feature in front of the LLVM compiler community.

    READ THE WHOLE POST