Solutions: Spot Your System’s Tipping Point

Here are the solutions to the exercises in Chapter 6, Spot Your System’s Tipping Point.

Prioritize Hotspots in CPU Architectures

The main suspect in the arch subsystem is arch/x86/kvm/vmx.c. The file contains 8,500 lines of code, and several of its functions are quite excessive in terms of complexity. Another refactoring candidate with slightly lower change frequency but equal complexity is arch/x86/kvm/x86.c.

Get a Quick Win

There’s plenty of structural duplication within the file erts/emulator/beam/erl_process.c. Fortunately, the functions with the most duplication are relatively small. That means you can either look to live with the duplication by organizing the clones according to proximity, ...

Get Software Design X-Rays now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.