libperf: Rename the PERF_RECORD_ structs to have a "perf" prefix
Even more, to have a "perf_record_" prefix, so that they match the PERF_RECORD_ enum they map to. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-23-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
7510410a38
commit
72932371e7
@@ -15,9 +15,9 @@ static int process_event_mask(struct perf_tool *tool __maybe_unused,
|
||||
struct perf_sample *sample __maybe_unused,
|
||||
struct machine *machine __maybe_unused)
|
||||
{
|
||||
struct cpu_map_event *map_event = &event->cpu_map;
|
||||
struct cpu_map_mask *mask;
|
||||
struct cpu_map_data *data;
|
||||
struct perf_record_cpu_map *map_event = &event->cpu_map;
|
||||
struct perf_record_record_cpu_map *mask;
|
||||
struct perf_record_cpu_map_data *data;
|
||||
struct perf_cpu_map *map;
|
||||
int i;
|
||||
|
||||
@@ -25,7 +25,7 @@ static int process_event_mask(struct perf_tool *tool __maybe_unused,
|
||||
|
||||
TEST_ASSERT_VAL("wrong type", data->type == PERF_CPU_MAP__MASK);
|
||||
|
||||
mask = (struct cpu_map_mask *)data->data;
|
||||
mask = (struct perf_record_record_cpu_map *)data->data;
|
||||
|
||||
TEST_ASSERT_VAL("wrong nr", mask->nr == 1);
|
||||
|
||||
@@ -49,9 +49,9 @@ static int process_event_cpus(struct perf_tool *tool __maybe_unused,
|
||||
struct perf_sample *sample __maybe_unused,
|
||||
struct machine *machine __maybe_unused)
|
||||
{
|
||||
struct cpu_map_event *map_event = &event->cpu_map;
|
||||
struct perf_record_cpu_map *map_event = &event->cpu_map;
|
||||
struct cpu_map_entries *cpus;
|
||||
struct cpu_map_data *data;
|
||||
struct perf_record_cpu_map_data *data;
|
||||
struct perf_cpu_map *map;
|
||||
|
||||
data = &map_event->data;
|
||||
|
@@ -12,7 +12,7 @@ static int process_event_unit(struct perf_tool *tool __maybe_unused,
|
||||
struct perf_sample *sample __maybe_unused,
|
||||
struct machine *machine __maybe_unused)
|
||||
{
|
||||
struct event_update_event *ev = (struct event_update_event *) event;
|
||||
struct perf_record_event_update *ev = (struct perf_record_event_update *)event;
|
||||
|
||||
TEST_ASSERT_VAL("wrong id", ev->id == 123);
|
||||
TEST_ASSERT_VAL("wrong id", ev->type == PERF_EVENT_UPDATE__UNIT);
|
||||
@@ -25,10 +25,10 @@ static int process_event_scale(struct perf_tool *tool __maybe_unused,
|
||||
struct perf_sample *sample __maybe_unused,
|
||||
struct machine *machine __maybe_unused)
|
||||
{
|
||||
struct event_update_event *ev = (struct event_update_event *) event;
|
||||
struct event_update_event_scale *ev_data;
|
||||
struct perf_record_event_update *ev = (struct perf_record_event_update *)event;
|
||||
struct perf_record_event_update_scale *ev_data;
|
||||
|
||||
ev_data = (struct event_update_event_scale *) ev->data;
|
||||
ev_data = (struct perf_record_event_update_scale *)ev->data;
|
||||
|
||||
TEST_ASSERT_VAL("wrong id", ev->id == 123);
|
||||
TEST_ASSERT_VAL("wrong id", ev->type == PERF_EVENT_UPDATE__SCALE);
|
||||
@@ -47,7 +47,7 @@ static int process_event_name(struct perf_tool *tool,
|
||||
struct machine *machine __maybe_unused)
|
||||
{
|
||||
struct event_name *tmp = container_of(tool, struct event_name, tool);
|
||||
struct event_update_event *ev = (struct event_update_event*) event;
|
||||
struct perf_record_event_update *ev = (struct perf_record_event_update *)event;
|
||||
|
||||
TEST_ASSERT_VAL("wrong id", ev->id == 123);
|
||||
TEST_ASSERT_VAL("wrong id", ev->type == PERF_EVENT_UPDATE__NAME);
|
||||
@@ -60,11 +60,11 @@ static int process_event_cpus(struct perf_tool *tool __maybe_unused,
|
||||
struct perf_sample *sample __maybe_unused,
|
||||
struct machine *machine __maybe_unused)
|
||||
{
|
||||
struct event_update_event *ev = (struct event_update_event*) event;
|
||||
struct event_update_event_cpus *ev_data;
|
||||
struct perf_record_event_update *ev = (struct perf_record_event_update *)event;
|
||||
struct perf_record_event_update_cpus *ev_data;
|
||||
struct perf_cpu_map *map;
|
||||
|
||||
ev_data = (struct event_update_event_cpus*) ev->data;
|
||||
ev_data = (struct perf_record_event_update_cpus *) ev->data;
|
||||
|
||||
map = cpu_map__new_data(&ev_data->cpus);
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
#include "counts.h"
|
||||
#include "debug.h"
|
||||
|
||||
static bool has_term(struct stat_config_event *config,
|
||||
static bool has_term(struct perf_record_stat_config *config,
|
||||
u64 tag, u64 val)
|
||||
{
|
||||
unsigned i;
|
||||
@@ -25,7 +25,7 @@ static int process_stat_config_event(struct perf_tool *tool __maybe_unused,
|
||||
struct perf_sample *sample __maybe_unused,
|
||||
struct machine *machine __maybe_unused)
|
||||
{
|
||||
struct stat_config_event *config = &event->stat_config;
|
||||
struct perf_record_stat_config *config = &event->stat_config;
|
||||
struct perf_stat_config stat_config;
|
||||
|
||||
#define HAS(term, val) \
|
||||
@@ -65,7 +65,7 @@ static int process_stat_event(struct perf_tool *tool __maybe_unused,
|
||||
struct perf_sample *sample __maybe_unused,
|
||||
struct machine *machine __maybe_unused)
|
||||
{
|
||||
struct stat_event *st = &event->stat;
|
||||
struct perf_record_stat *st = &event->stat;
|
||||
|
||||
TEST_ASSERT_VAL("wrong cpu", st->cpu == 1);
|
||||
TEST_ASSERT_VAL("wrong thread", st->thread == 2);
|
||||
@@ -95,7 +95,7 @@ static int process_stat_round_event(struct perf_tool *tool __maybe_unused,
|
||||
struct perf_sample *sample __maybe_unused,
|
||||
struct machine *machine __maybe_unused)
|
||||
{
|
||||
struct stat_round_event *stat_round = &event->stat_round;
|
||||
struct perf_record_stat_round *stat_round = &event->stat_round;
|
||||
|
||||
TEST_ASSERT_VAL("wrong time", stat_round->time == 0xdeadbeef);
|
||||
TEST_ASSERT_VAL("wrong type", stat_round->type == PERF_STAT_ROUND_TYPE__INTERVAL);
|
||||
|
@@ -56,7 +56,7 @@ static int process_event(struct perf_tool *tool __maybe_unused,
|
||||
struct perf_sample *sample __maybe_unused,
|
||||
struct machine *machine __maybe_unused)
|
||||
{
|
||||
struct thread_map_event *map = &event->thread_map;
|
||||
struct perf_record_thread_map *map = &event->thread_map;
|
||||
struct perf_thread_map *threads;
|
||||
|
||||
TEST_ASSERT_VAL("wrong nr", map->nr == 1);
|
||||
|
Reference in New Issue
Block a user