[compiler-rt] [SystemZ][XRay] XRay runtime support for SystemZ (PR #113252)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 22 09:36:49 PDT 2024


================
@@ -0,0 +1,90 @@
+//===-- xray_s390x.cpp ------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of XRay, a dynamic runtime instrumentation system.
+//
+// Implementation of s390x routines.
+//
+//===----------------------------------------------------------------------===//
+#include "sanitizer_common/sanitizer_common.h"
+#include "xray_defs.h"
+#include "xray_interface_internal.h"
+#include <cassert>
+#include <cstring>
+
+namespace __xray {
+
+bool patchFunctionEntry(const bool Enable, uint32_t FuncId,
----------------
MaskRay wrote:

Prefer `__xray::patchFunctionEntry` https://llvm.org/docs/CodingStandards.html#use-namespace-qualifiers-to-implement-previously-declared-functions

https://github.com/llvm/llvm-project/pull/113252


More information about the llvm-commits mailing list