blob: 2e1b3b9a16d424ff6bc4b0f47cd487e631504291 [file] [log] [blame]
// Copyright 2016 The Fuchsia Authors
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
// N.B. This is ideally temporary. It is used by Intel PT support, and is a
// stopgap until "resources" can be used to read/write x86 MSRs.
// "mtrace" == "zircon trace": the idea being to be a generalization of
// ktrace. It's all temporary, but there may be other uses before the stopgap
// is no longer necessary.
#include "lib/mtrace.h"
#include <lib/zircon-internal/mtrace.h>
zx_status_t mtrace_control(uint32_t kind, uint32_t action, uint32_t options,
user_inout_ptr<void> arg, size_t size) {
switch (kind) {
#if defined(__x86_64__) || defined(__aarch64__)
return mtrace_perfmon_control(action, options, arg, size);