topology.c (4f2c0a4acffbec01079c28f839422e64ddeff004) topology.c (1eaf496ed386934f1c2439a120fe84a05194f91a)
1// SPDX-License-Identifier: GPL-2.0
2#include <string.h>
3#include <stdlib.h>
4#include <stdio.h>
5#include <perf/cpumap.h>
6#include "cpumap.h"
7#include "tests.h"
8#include "session.h"
9#include "evlist.h"
10#include "debug.h"
1// SPDX-License-Identifier: GPL-2.0
2#include <string.h>
3#include <stdlib.h>
4#include <stdio.h>
5#include <perf/cpumap.h>
6#include "cpumap.h"
7#include "tests.h"
8#include "session.h"
9#include "evlist.h"
10#include "debug.h"
11#include "pmu.h"
11#include "pmus.h"
12#include <linux/err.h>
13
14#define TEMPL "/tmp/perf-test-XXXXXX"
15#define DATA_SIZE 10
16
17static int get_temp(char *path)
18{
19 int fd;

--- 16 unchanged lines hidden (view full) ---

36 struct perf_data data = {
37 .path = path,
38 .mode = PERF_DATA_MODE_WRITE,
39 };
40
41 session = perf_session__new(&data, NULL);
42 TEST_ASSERT_VAL("can't get session", !IS_ERR(session));
43
12#include <linux/err.h>
13
14#define TEMPL "/tmp/perf-test-XXXXXX"
15#define DATA_SIZE 10
16
17static int get_temp(char *path)
18{
19 int fd;

--- 16 unchanged lines hidden (view full) ---

36 struct perf_data data = {
37 .path = path,
38 .mode = PERF_DATA_MODE_WRITE,
39 };
40
41 session = perf_session__new(&data, NULL);
42 TEST_ASSERT_VAL("can't get session", !IS_ERR(session));
43
44 if (!perf_pmu__has_hybrid()) {
44 if (!perf_pmus__has_hybrid()) {
45 session->evlist = evlist__new_default();
46 TEST_ASSERT_VAL("can't get evlist", session->evlist);
47 } else {
48 struct parse_events_error err;
49
50 session->evlist = evlist__new();
51 TEST_ASSERT_VAL("can't get evlist", session->evlist);
52 parse_events_error__init(&err);

--- 190 unchanged lines hidden ---
45 session->evlist = evlist__new_default();
46 TEST_ASSERT_VAL("can't get evlist", session->evlist);
47 } else {
48 struct parse_events_error err;
49
50 session->evlist = evlist__new();
51 TEST_ASSERT_VAL("can't get evlist", session->evlist);
52 parse_events_error__init(&err);

--- 190 unchanged lines hidden ---