[all-commits] [llvm/llvm-project] b6f9d7: Cleanup and speedup NativeRegisterContextLinux_arm64

Muhammad Omair Javaid via All-commits all-commits at lists.llvm.org
Fri Dec 6 09:19:19 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b6f9d7b8fb2eb6b78ac93ebd5ea4e36c04469285
      https://github.com/llvm/llvm-project/commit/b6f9d7b8fb2eb6b78ac93ebd5ea4e36c04469285
  Author: Muhammad Omair Javaid <omair.javaid at linaro.org>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h
    M lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
    M lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
    M lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp

  Log Message:
  -----------
  Cleanup and speedup NativeRegisterContextLinux_arm64

Summary:
This patch simplifies register accesses in NativeRegisterContextLinux_arm64
and also adds some bare minimum caching to avoid multiple calls to ptrace
during a stop.

Linux ptrace returns data in the form of structures containing GPR/FPR data.
This means that one single call is enough to read all GPRs or FPRs. We do
that once per stop and keep reading from or writing to the buffer that we
have in NativeRegisterContextLinux_arm64 class. Before a resume or detach we
write all buffers back.

This is tested on aarch64 thunder x1 with Ubuntu 18.04. Also tested
regressions on x86_64.

Reviewers: labath, clayborg

Reviewed By: labath

Subscribers: kristof.beyls, lldb-commits

Differential Revision: https://reviews.llvm.org/D69371




More information about the All-commits mailing list