SN Systems Tech Blog


Error Handling in Libraries: A Case Study

ARTICLE BY: James Henderson
POSTED: Dec 13, 2018

Using work performed on the DWARF debug line parser earlier this year as an example, this talk will show some of the pitfalls and problems a library developer has to be aware of when handling errors in their code, and will present some good rules of thumb that should be followed.

Read the whole post  

Understanding the performance of code using LLVM's (llvm-mca)

ARTICLE BY: Andrea Di Biagio
POSTED: Dec 13, 2018
TAGS: Toolchain, Compiler, LLVM

LLVM-mca is a LLVM based tool that uses information available in LLVM’s scheduling models to statically measure the performance of machine code in a specific CPU. The goal of this tool is not just to predict the performance of the code when run on the target, but also to help with diagnosing potential performance issues. In this talk we, will discuss how llvm-mca works and walk the audience through example uses of this tool.

Read the whole post  

Link time performance

ARTICLE BY: Jamie Redding
POSTED: Jun 20, 2018
TAGS: Linker, Toolchain, Developer Services

When developing console games, linking becomes an inevitable iterative process as changes are made and bugs are fixed. Whilst the C++ file may only be re-compiled once, for example after the file is modified, all of the intermediate files are re-linked, thereby generating the final executable, in every build. Over the course of the development life cycle this can mean having to re-link a game many thousands of times before it finally reaches the consumer. Reducing the overall time each link takes makes a significant impact to the games development process.

Read the whole post  

Debugging of optimized code: Extending the lifetime of local variables

ARTICLE BY: Wolfgang Pieb
POSTED: Nov 30, 2017
TAGS: LLVM, Compiler, Debugger, 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  

Generalized API checkers for the Clang Static Analyzer

ARTICLE BY: Sean Eveson
POSTED: Jun 20, 2017
TAGS: clang, checker, Static Analyzer, Toolchain

Sean presents three modified API checkers, that use external metadata, to warn on improper function calls.

Read the whole post  

DIVA: Debug Information Visual Analyzer

ARTICLE BY: Phillip Power
POSTED: Jun 15, 2017
TAGS: DWARF, Toolchain

DIVA is a new command line tool that processes DWARF debug information contained within ELF files and prints the semantics of that debug information. The DIVA output is designed with an aim to be understandable by software programmers without any low-level compiler or DWARF knowledge

Read the whole post  

Coroutines and C++ DSLs for Human Scale Concurrency

ARTICLE BY: Dominic Robinson
POSTED: Jun 12, 2017
TAGS: C++ coroutines, ACCU 2017

C++ coroutines have not yet been standardised, but are available today in Visual Studio 2015 (coming soon to clang/llvm) in the form of the stackless coroutines/resumable functions presented at CppCon2016. This session will look beyond the canonical examples of generators and asynchronous IO to see if coroutines can be leveraged in the pursuit of C++ DSLs to make concurrency easier to work with for humans - "Concurrency at Human Scale".

Read the whole post  

Delivering Sample-based PGO for PlayStation(R)4

Users of the PlayStation(R)4 toolchain have a number of expectations from their development tools: good runtime performance is vitally important, as is the ability to debug fully optimized code. The team at Sony Interactive Entertainment have been working on delivering a Profile Guided Optimization solution to our users to allow them to maximize their runtime performance.

Read the whole post  

Demo of a repository for statically compiled programs

ARTICLE BY: Paul Bowen-Huggett
POSTED: Nov 17, 2016
TAGS: LLVM, Toolchain

Paul presents a proof of concept of an approach which improves compile and link times by replacing the conventional use of object files with an incrementally updated repository without requiring change to existing build infrastructure. It aims to present the idea at a high-level using a live demo of some trivial tools and initiate discussion of a real implementation within the LLVM framework.

Read the whole post  

Quick wins for speedy links

ARTICLE BY: Binutils Team
POSTED: Mar 03, 2016
TAGS: de-duplication, Dead-code stripping, Linker, LTO, Toolchain

Linking is the final stage when building your C/C++ program code. As a developer, you must wait for the link to complete before you can run or debug your program. Any delay in the process slows development and can become frustrating.

Read the whole post  

Verifying Game Developer Assumptions

ARTICLE BY: Russell Gallop
POSTED: Apr 22, 2015
TAGS: Assembly, Debug, Compiler, Toolchain

Game developers make a number of assumptions about how the compiler works. SN Systems has implemented “Check CFC” (Compile Flow Consistency) to help ensure their assumptions hold true for the PlayStation®4 (PS4) compiler. This has been contributed to the open source LLVM compiler community. Using…

Read the whole post  

ABI bugs are a NIGHTMARE!

ARTICLE BY: Sunil Srivastava
POSTED: Dec 18, 2014
TAGS: ABI, Compiler, Toolchain

Release-to-release compatibility is critical in the games industry, where old games must be able to run on an updated PlayStation® operating system. To guard against incompatibilities from creeping in, we developed a C++ ABI test suite for all currently supported PlayStation® platforms (PlayStation®3 (PS3) and PlayStation®Vita (PS Vita) as well as PlayStation®4 (PS4)).

Read the whole post  

Linker Optimizations

ARTICLE BY: Binutils Team
POSTED: Nov 10, 2014
TAGS: Build, Linker, Toolchain

When developing for games consoles, there are known limits on the amount of storage available. Learn about two Linker features which can help with this; dead-stripping and de-duplication.

Read the whole post  

Function-level Profiling

ARTICLE BY: Performance Analysis Team
POSTED: Jun 30, 2014
TAGS: Analyze, Razor

One of the most frequently asked questions our Performance Analysis team hears is "Which are my hottest functions, and why?". This article covers some of the features we provide to try and answer that question.

Read the whole post  

Building with the Network

ARTICLE BY: Dominic Robinson
POSTED: Jun 24, 2014

Learn how SN-DBS significantly reduces compile times for games console development projects, by sharing the work between computers on a network.

Read the whole post