linux/arch/x86/events/intel/bts.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * BTS PMU driver for perf
 * Copyright (c) 2013-2014, Intel Corporation.
 */

#undef DEBUG

#define pr_fmt(fmt)

#include <linux/bitops.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/debugfs.h>
#include <linux/device.h>
#include <linux/coredump.h>

#include <linux/sizes.h>
#include <asm/perf_event.h>

#include "../perf_event.h"

struct bts_ctx {};

/* BTS context states: */
enum {};

static DEFINE_PER_CPU(struct bts_ctx, bts_ctx);

#define BTS_RECORD_SIZE
#define BTS_SAFETY_MARGIN

struct bts_phys {};

struct bts_buffer {};

static struct pmu bts_pmu;

static int buf_nr_pages(struct page *page)
{}

static size_t buf_size(struct page *page)
{}

static void *
bts_buffer_setup_aux(struct perf_event *event, void **pages,
		     int nr_pages, bool overwrite)
{}

static void bts_buffer_free_aux(void *data)
{}

static unsigned long bts_buffer_offset(struct bts_buffer *buf, unsigned int idx)
{}

static void
bts_config_buffer(struct bts_buffer *buf)
{}

static void bts_buffer_pad_out(struct bts_phys *phys, unsigned long head)
{}

static void bts_update(struct bts_ctx *bts)
{}

static int
bts_buffer_reset(struct bts_buffer *buf, struct perf_output_handle *handle);

/*
 * Ordering PMU callbacks wrt themselves and the PMI is done by means
 * of bts::state, which:
 *  - is set when bts::handle::event is valid, that is, between
 *    perf_aux_output_begin() and perf_aux_output_end();
 *  - is zero otherwise;
 *  - is ordered against bts::handle::event with a compiler barrier.
 */

static void __bts_event_start(struct perf_event *event)
{}

static void bts_event_start(struct perf_event *event, int flags)
{}

static void __bts_event_stop(struct perf_event *event, int state)
{}

static void bts_event_stop(struct perf_event *event, int flags)
{}

void intel_bts_enable_local(void)
{}

void intel_bts_disable_local(void)
{}

static int
bts_buffer_reset(struct bts_buffer *buf, struct perf_output_handle *handle)
{}

int intel_bts_interrupt(void)
{}

static void bts_event_del(struct perf_event *event, int mode)
{}

static int bts_event_add(struct perf_event *event, int mode)
{}

static void bts_event_destroy(struct perf_event *event)
{}

static int bts_event_init(struct perf_event *event)
{}

static void bts_event_read(struct perf_event *event)
{}

static __init int bts_init(void)
{}
arch_initcall(bts_init);