Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf evsel: Introduce evsel_fprintf.h

We already had evsel_fprintf.c, add its counterpart, so that we can
reduce evsel.h a bit more.

We needed a new perf_event_attr_fprintf.c file so as to have a separate
object to link with the python binding in tools/perf/util/python-ext-sources
and not drag symbol_conf, etc into the python binding.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-06bdmt1062d9unzgqmxwlv88@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+218 -193
+1
tools/perf/builtin-evlist.c
··· 10 10 #include "perf.h" 11 11 #include "util/evlist.h" 12 12 #include "util/evsel.h" 13 + #include "util/evsel_fprintf.h" 13 14 #include "util/parse-events.h" 14 15 #include <subcmd/parse-options.h> 15 16 #include "util/session.h"
+1
tools/perf/builtin-sched.c
··· 6 6 #include "util/cpumap.h" 7 7 #include "util/evlist.h" 8 8 #include "util/evsel.h" 9 + #include "util/evsel_fprintf.h" 9 10 #include "util/symbol.h" 10 11 #include "util/thread.h" 11 12 #include "util/header.h"
+1
tools/perf/builtin-script.c
··· 17 17 #include "util/trace-event.h" 18 18 #include "util/evlist.h" 19 19 #include "util/evsel.h" 20 + #include "util/evsel_fprintf.h" 20 21 #include "util/evswitch.h" 21 22 #include "util/sort.h" 22 23 #include "util/data.h"
+2
tools/perf/builtin-trace.c
··· 28 28 #include "util/dso.h" 29 29 #include "util/env.h" 30 30 #include "util/event.h" 31 + #include "util/evsel.h" 32 + #include "util/evsel_fprintf.h" 31 33 #include "util/synthetic-events.h" 32 34 #include "util/evlist.h" 33 35 #include "util/evswitch.h"
+1
tools/perf/util/Build
··· 11 11 perf-y += evlist.o 12 12 perf-y += evsel.o 13 13 perf-y += evsel_fprintf.o 14 + perf-y += perf_event_attr_fprintf.o 14 15 perf-y += evswitch.o 15 16 perf-y += find_bit.o 16 17 perf-y += get_current_dir_name.o
+7 -146
tools/perf/util/evsel.c
··· 30 30 #include "counts.h" 31 31 #include "event.h" 32 32 #include "evsel.h" 33 + #include "util/evsel_fprintf.h" 33 34 #include "evlist.h" 34 35 #include <perf/cpumap.h> 35 36 #include "thread_map.h" ··· 1444 1443 return fd; 1445 1444 } 1446 1445 1447 - struct bit_names { 1448 - int bit; 1449 - const char *name; 1450 - }; 1451 - 1452 - static void __p_bits(char *buf, size_t size, u64 value, struct bit_names *bits) 1453 - { 1454 - bool first_bit = true; 1455 - int i = 0; 1456 - 1457 - do { 1458 - if (value & bits[i].bit) { 1459 - buf += scnprintf(buf, size, "%s%s", first_bit ? "" : "|", bits[i].name); 1460 - first_bit = false; 1461 - } 1462 - } while (bits[++i].name != NULL); 1463 - } 1464 - 1465 - static void __p_sample_type(char *buf, size_t size, u64 value) 1466 - { 1467 - #define bit_name(n) { PERF_SAMPLE_##n, #n } 1468 - struct bit_names bits[] = { 1469 - bit_name(IP), bit_name(TID), bit_name(TIME), bit_name(ADDR), 1470 - bit_name(READ), bit_name(CALLCHAIN), bit_name(ID), bit_name(CPU), 1471 - bit_name(PERIOD), bit_name(STREAM_ID), bit_name(RAW), 1472 - bit_name(BRANCH_STACK), bit_name(REGS_USER), bit_name(STACK_USER), 1473 - bit_name(IDENTIFIER), bit_name(REGS_INTR), bit_name(DATA_SRC), 1474 - bit_name(WEIGHT), bit_name(PHYS_ADDR), 1475 - { .name = NULL, } 1476 - }; 1477 - #undef bit_name 1478 - __p_bits(buf, size, value, bits); 1479 - } 1480 - 1481 - static void __p_branch_sample_type(char *buf, size_t size, u64 value) 1482 - { 1483 - #define bit_name(n) { PERF_SAMPLE_BRANCH_##n, #n } 1484 - struct bit_names bits[] = { 1485 - bit_name(USER), bit_name(KERNEL), bit_name(HV), bit_name(ANY), 1486 - bit_name(ANY_CALL), bit_name(ANY_RETURN), bit_name(IND_CALL), 1487 - bit_name(ABORT_TX), bit_name(IN_TX), bit_name(NO_TX), 1488 - bit_name(COND), bit_name(CALL_STACK), bit_name(IND_JUMP), 1489 - bit_name(CALL), bit_name(NO_FLAGS), bit_name(NO_CYCLES), 1490 - { .name = NULL, } 1491 - }; 1492 - #undef bit_name 1493 - __p_bits(buf, size, value, bits); 1494 - } 1495 - 1496 - static void __p_read_format(char *buf, size_t size, u64 value) 1497 - { 1498 - #define bit_name(n) { PERF_FORMAT_##n, #n } 1499 - struct bit_names bits[] = { 1500 - bit_name(TOTAL_TIME_ENABLED), bit_name(TOTAL_TIME_RUNNING), 1501 - bit_name(ID), bit_name(GROUP), 1502 - { .name = NULL, } 1503 - }; 1504 - #undef bit_name 1505 - __p_bits(buf, size, value, bits); 1506 - } 1507 - 1508 - #define BUF_SIZE 1024 1509 - 1510 - #define p_hex(val) snprintf(buf, BUF_SIZE, "%#"PRIx64, (uint64_t)(val)) 1511 - #define p_unsigned(val) snprintf(buf, BUF_SIZE, "%"PRIu64, (uint64_t)(val)) 1512 - #define p_signed(val) snprintf(buf, BUF_SIZE, "%"PRId64, (int64_t)(val)) 1513 - #define p_sample_type(val) __p_sample_type(buf, BUF_SIZE, val) 1514 - #define p_branch_sample_type(val) __p_branch_sample_type(buf, BUF_SIZE, val) 1515 - #define p_read_format(val) __p_read_format(buf, BUF_SIZE, val) 1516 - 1517 - #define PRINT_ATTRn(_n, _f, _p) \ 1518 - do { \ 1519 - if (attr->_f) { \ 1520 - _p(attr->_f); \ 1521 - ret += attr__fprintf(fp, _n, buf, priv);\ 1522 - } \ 1523 - } while (0) 1524 - 1525 - #define PRINT_ATTRf(_f, _p) PRINT_ATTRn(#_f, _f, _p) 1526 - 1527 - int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr, 1528 - attr__fprintf_f attr__fprintf, void *priv) 1529 - { 1530 - char buf[BUF_SIZE]; 1531 - int ret = 0; 1532 - 1533 - PRINT_ATTRf(type, p_unsigned); 1534 - PRINT_ATTRf(size, p_unsigned); 1535 - PRINT_ATTRf(config, p_hex); 1536 - PRINT_ATTRn("{ sample_period, sample_freq }", sample_period, p_unsigned); 1537 - PRINT_ATTRf(sample_type, p_sample_type); 1538 - PRINT_ATTRf(read_format, p_read_format); 1539 - 1540 - PRINT_ATTRf(disabled, p_unsigned); 1541 - PRINT_ATTRf(inherit, p_unsigned); 1542 - PRINT_ATTRf(pinned, p_unsigned); 1543 - PRINT_ATTRf(exclusive, p_unsigned); 1544 - PRINT_ATTRf(exclude_user, p_unsigned); 1545 - PRINT_ATTRf(exclude_kernel, p_unsigned); 1546 - PRINT_ATTRf(exclude_hv, p_unsigned); 1547 - PRINT_ATTRf(exclude_idle, p_unsigned); 1548 - PRINT_ATTRf(mmap, p_unsigned); 1549 - PRINT_ATTRf(comm, p_unsigned); 1550 - PRINT_ATTRf(freq, p_unsigned); 1551 - PRINT_ATTRf(inherit_stat, p_unsigned); 1552 - PRINT_ATTRf(enable_on_exec, p_unsigned); 1553 - PRINT_ATTRf(task, p_unsigned); 1554 - PRINT_ATTRf(watermark, p_unsigned); 1555 - PRINT_ATTRf(precise_ip, p_unsigned); 1556 - PRINT_ATTRf(mmap_data, p_unsigned); 1557 - PRINT_ATTRf(sample_id_all, p_unsigned); 1558 - PRINT_ATTRf(exclude_host, p_unsigned); 1559 - PRINT_ATTRf(exclude_guest, p_unsigned); 1560 - PRINT_ATTRf(exclude_callchain_kernel, p_unsigned); 1561 - PRINT_ATTRf(exclude_callchain_user, p_unsigned); 1562 - PRINT_ATTRf(mmap2, p_unsigned); 1563 - PRINT_ATTRf(comm_exec, p_unsigned); 1564 - PRINT_ATTRf(use_clockid, p_unsigned); 1565 - PRINT_ATTRf(context_switch, p_unsigned); 1566 - PRINT_ATTRf(write_backward, p_unsigned); 1567 - PRINT_ATTRf(namespaces, p_unsigned); 1568 - PRINT_ATTRf(ksymbol, p_unsigned); 1569 - PRINT_ATTRf(bpf_event, p_unsigned); 1570 - PRINT_ATTRf(aux_output, p_unsigned); 1571 - 1572 - PRINT_ATTRn("{ wakeup_events, wakeup_watermark }", wakeup_events, p_unsigned); 1573 - PRINT_ATTRf(bp_type, p_unsigned); 1574 - PRINT_ATTRn("{ bp_addr, config1 }", bp_addr, p_hex); 1575 - PRINT_ATTRn("{ bp_len, config2 }", bp_len, p_hex); 1576 - PRINT_ATTRf(branch_sample_type, p_branch_sample_type); 1577 - PRINT_ATTRf(sample_regs_user, p_hex); 1578 - PRINT_ATTRf(sample_stack_user, p_unsigned); 1579 - PRINT_ATTRf(clockid, p_signed); 1580 - PRINT_ATTRf(sample_regs_intr, p_hex); 1581 - PRINT_ATTRf(aux_watermark, p_unsigned); 1582 - PRINT_ATTRf(sample_max_stack, p_unsigned); 1583 - 1584 - return ret; 1585 - } 1586 - 1587 - static int __open_attr__fprintf(FILE *fp, const char *name, const char *val, 1588 - void *priv __maybe_unused) 1589 - { 1590 - return fprintf(fp, " %-32s %s\n", name, val); 1591 - } 1592 - 1593 1446 static void perf_evsel__remove_fd(struct evsel *pos, 1594 1447 int nr_cpus, int nr_threads, 1595 1448 int thread_idx) ··· 1512 1657 pr_warning("WARNING: Ignored open failure for pid %d\n", 1513 1658 ignore_pid); 1514 1659 return true; 1660 + } 1661 + 1662 + static int __open_attr__fprintf(FILE *fp, const char *name, const char *val, 1663 + void *priv __maybe_unused) 1664 + { 1665 + return fprintf(fp, " %-32s %s\n", name, val); 1515 1666 } 1516 1667 1517 1668 static void display_attr(struct perf_event_attr *attr)
+4 -47
tools/perf/util/evsel.h
··· 4 4 5 5 #include <linux/list.h> 6 6 #include <stdbool.h> 7 - #include <stdio.h> 8 7 #include <sys/types.h> 9 8 #include <linux/perf_event.h> 10 9 #include <linux/types.h> ··· 11 12 #include <perf/evsel.h> 12 13 #include "symbol_conf.h" 13 14 #include <internal/cpumap.h> 14 - 15 - struct addr_location; 16 - struct evsel; 17 - union perf_event; 18 - 19 - struct cgroup; 20 15 21 16 /* 22 17 * The 'struct perf_evsel_config_term' is used to pass event ··· 55 62 bool weak; 56 63 }; 57 64 65 + struct bpf_object; 66 + struct cgroup; 67 + struct perf_counts; 58 68 struct perf_stat_evsel; 69 + union perf_event; 59 70 60 71 typedef int (perf_evsel__sb_cb_t)(union perf_event *event, void *data); 61 72 ··· 67 70 PERF_TOOL_NONE = 0, 68 71 PERF_TOOL_DURATION_TIME = 1, 69 72 }; 70 - 71 - struct bpf_object; 72 - struct perf_counts; 73 73 74 74 /** struct evsel - event selector 75 75 * ··· 398 404 perf_evsel__match(evsel, SOFTWARE, SW_TASK_CLOCK); 399 405 } 400 406 401 - struct perf_attr_details { 402 - bool freq; 403 - bool verbose; 404 - bool event_group; 405 - bool force; 406 - bool trace_fields; 407 - }; 408 - 409 - int perf_evsel__fprintf(struct evsel *evsel, 410 - struct perf_attr_details *details, FILE *fp); 411 - 412 - #define EVSEL__PRINT_IP (1<<0) 413 - #define EVSEL__PRINT_SYM (1<<1) 414 - #define EVSEL__PRINT_DSO (1<<2) 415 - #define EVSEL__PRINT_SYMOFFSET (1<<3) 416 - #define EVSEL__PRINT_ONELINE (1<<4) 417 - #define EVSEL__PRINT_SRCLINE (1<<5) 418 - #define EVSEL__PRINT_UNKNOWN_AS_ADDR (1<<6) 419 - #define EVSEL__PRINT_CALLCHAIN_ARROW (1<<7) 420 - #define EVSEL__PRINT_SKIP_IGNORED (1<<8) 421 - 422 - struct callchain_cursor; 423 - 424 - int sample__fprintf_callchain(struct perf_sample *sample, int left_alignment, 425 - unsigned int print_opts, struct callchain_cursor *cursor, 426 - struct strlist *bt_stop_list, FILE *fp); 427 - 428 - int sample__fprintf_sym(struct perf_sample *sample, struct addr_location *al, 429 - int left_alignment, unsigned int print_opts, 430 - struct callchain_cursor *cursor, 431 - struct strlist *bt_stop_list, FILE *fp); 432 - 433 407 bool perf_evsel__fallback(struct evsel *evsel, int err, 434 408 char *msg, size_t msgsize); 435 409 int perf_evsel__open_strerror(struct evsel *evsel, struct target *target, ··· 429 467 { 430 468 return (evsel->core.attr.sample_type & PERF_SAMPLE_CALLCHAIN) != 0; 431 469 } 432 - 433 - typedef int (*attr__fprintf_f)(FILE *, const char *, const char *, void *); 434 - 435 - int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr, 436 - attr__fprintf_f attr__fprintf, void *priv); 437 470 438 471 struct perf_env *perf_evsel__env(struct evsel *evsel); 439 472
+1
tools/perf/util/evsel_fprintf.c
··· 4 4 #include <stdbool.h> 5 5 #include <traceevent/event-parse.h> 6 6 #include "evsel.h" 7 + #include "util/evsel_fprintf.h" 7 8 #include "util/event.h" 8 9 #include "callchain.h" 9 10 #include "map.h"
+50
tools/perf/util/evsel_fprintf.h
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + #ifndef __PERF_EVSEL_FPRINTF_H 3 + #define __PERF_EVSEL_FPRINTF_H 1 4 + 5 + #include <stdio.h> 6 + #include <stdbool.h> 7 + 8 + struct evsel; 9 + 10 + struct perf_attr_details { 11 + bool freq; 12 + bool verbose; 13 + bool event_group; 14 + bool force; 15 + bool trace_fields; 16 + }; 17 + 18 + int perf_evsel__fprintf(struct evsel *evsel, 19 + struct perf_attr_details *details, FILE *fp); 20 + 21 + #define EVSEL__PRINT_IP (1<<0) 22 + #define EVSEL__PRINT_SYM (1<<1) 23 + #define EVSEL__PRINT_DSO (1<<2) 24 + #define EVSEL__PRINT_SYMOFFSET (1<<3) 25 + #define EVSEL__PRINT_ONELINE (1<<4) 26 + #define EVSEL__PRINT_SRCLINE (1<<5) 27 + #define EVSEL__PRINT_UNKNOWN_AS_ADDR (1<<6) 28 + #define EVSEL__PRINT_CALLCHAIN_ARROW (1<<7) 29 + #define EVSEL__PRINT_SKIP_IGNORED (1<<8) 30 + 31 + struct addr_location; 32 + struct perf_event_attr; 33 + struct perf_sample; 34 + struct callchain_cursor; 35 + struct strlist; 36 + 37 + int sample__fprintf_callchain(struct perf_sample *sample, int left_alignment, 38 + unsigned int print_opts, struct callchain_cursor *cursor, 39 + struct strlist *bt_stop_list, FILE *fp); 40 + 41 + int sample__fprintf_sym(struct perf_sample *sample, struct addr_location *al, 42 + int left_alignment, unsigned int print_opts, 43 + struct callchain_cursor *cursor, 44 + struct strlist *bt_stop_list, FILE *fp); 45 + 46 + typedef int (*attr__fprintf_f)(FILE *, const char *, const char *, void *); 47 + 48 + int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr, 49 + attr__fprintf_f attr__fprintf, void *priv); 50 + #endif // __PERF_EVSEL_H
+1
tools/perf/util/header.c
··· 25 25 #include "dso.h" 26 26 #include "evlist.h" 27 27 #include "evsel.h" 28 + #include "util/evsel_fprintf.h" 28 29 #include "header.h" 29 30 #include "memswap.h" 30 31 #include "trace-event.h"
+148
tools/perf/util/perf_event_attr_fprintf.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + #include <inttypes.h> 3 + #include <stdio.h> 4 + #include <stdbool.h> 5 + #include <linux/kernel.h> 6 + #include <linux/types.h> 7 + #include <linux/perf_event.h> 8 + #include "util/evsel_fprintf.h" 9 + 10 + struct bit_names { 11 + int bit; 12 + const char *name; 13 + }; 14 + 15 + static void __p_bits(char *buf, size_t size, u64 value, struct bit_names *bits) 16 + { 17 + bool first_bit = true; 18 + int i = 0; 19 + 20 + do { 21 + if (value & bits[i].bit) { 22 + buf += scnprintf(buf, size, "%s%s", first_bit ? "" : "|", bits[i].name); 23 + first_bit = false; 24 + } 25 + } while (bits[++i].name != NULL); 26 + } 27 + 28 + static void __p_sample_type(char *buf, size_t size, u64 value) 29 + { 30 + #define bit_name(n) { PERF_SAMPLE_##n, #n } 31 + struct bit_names bits[] = { 32 + bit_name(IP), bit_name(TID), bit_name(TIME), bit_name(ADDR), 33 + bit_name(READ), bit_name(CALLCHAIN), bit_name(ID), bit_name(CPU), 34 + bit_name(PERIOD), bit_name(STREAM_ID), bit_name(RAW), 35 + bit_name(BRANCH_STACK), bit_name(REGS_USER), bit_name(STACK_USER), 36 + bit_name(IDENTIFIER), bit_name(REGS_INTR), bit_name(DATA_SRC), 37 + bit_name(WEIGHT), bit_name(PHYS_ADDR), 38 + { .name = NULL, } 39 + }; 40 + #undef bit_name 41 + __p_bits(buf, size, value, bits); 42 + } 43 + 44 + static void __p_branch_sample_type(char *buf, size_t size, u64 value) 45 + { 46 + #define bit_name(n) { PERF_SAMPLE_BRANCH_##n, #n } 47 + struct bit_names bits[] = { 48 + bit_name(USER), bit_name(KERNEL), bit_name(HV), bit_name(ANY), 49 + bit_name(ANY_CALL), bit_name(ANY_RETURN), bit_name(IND_CALL), 50 + bit_name(ABORT_TX), bit_name(IN_TX), bit_name(NO_TX), 51 + bit_name(COND), bit_name(CALL_STACK), bit_name(IND_JUMP), 52 + bit_name(CALL), bit_name(NO_FLAGS), bit_name(NO_CYCLES), 53 + { .name = NULL, } 54 + }; 55 + #undef bit_name 56 + __p_bits(buf, size, value, bits); 57 + } 58 + 59 + static void __p_read_format(char *buf, size_t size, u64 value) 60 + { 61 + #define bit_name(n) { PERF_FORMAT_##n, #n } 62 + struct bit_names bits[] = { 63 + bit_name(TOTAL_TIME_ENABLED), bit_name(TOTAL_TIME_RUNNING), 64 + bit_name(ID), bit_name(GROUP), 65 + { .name = NULL, } 66 + }; 67 + #undef bit_name 68 + __p_bits(buf, size, value, bits); 69 + } 70 + 71 + #define BUF_SIZE 1024 72 + 73 + #define p_hex(val) snprintf(buf, BUF_SIZE, "%#"PRIx64, (uint64_t)(val)) 74 + #define p_unsigned(val) snprintf(buf, BUF_SIZE, "%"PRIu64, (uint64_t)(val)) 75 + #define p_signed(val) snprintf(buf, BUF_SIZE, "%"PRId64, (int64_t)(val)) 76 + #define p_sample_type(val) __p_sample_type(buf, BUF_SIZE, val) 77 + #define p_branch_sample_type(val) __p_branch_sample_type(buf, BUF_SIZE, val) 78 + #define p_read_format(val) __p_read_format(buf, BUF_SIZE, val) 79 + 80 + #define PRINT_ATTRn(_n, _f, _p) \ 81 + do { \ 82 + if (attr->_f) { \ 83 + _p(attr->_f); \ 84 + ret += attr__fprintf(fp, _n, buf, priv);\ 85 + } \ 86 + } while (0) 87 + 88 + #define PRINT_ATTRf(_f, _p) PRINT_ATTRn(#_f, _f, _p) 89 + 90 + int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr, 91 + attr__fprintf_f attr__fprintf, void *priv) 92 + { 93 + char buf[BUF_SIZE]; 94 + int ret = 0; 95 + 96 + PRINT_ATTRf(type, p_unsigned); 97 + PRINT_ATTRf(size, p_unsigned); 98 + PRINT_ATTRf(config, p_hex); 99 + PRINT_ATTRn("{ sample_period, sample_freq }", sample_period, p_unsigned); 100 + PRINT_ATTRf(sample_type, p_sample_type); 101 + PRINT_ATTRf(read_format, p_read_format); 102 + 103 + PRINT_ATTRf(disabled, p_unsigned); 104 + PRINT_ATTRf(inherit, p_unsigned); 105 + PRINT_ATTRf(pinned, p_unsigned); 106 + PRINT_ATTRf(exclusive, p_unsigned); 107 + PRINT_ATTRf(exclude_user, p_unsigned); 108 + PRINT_ATTRf(exclude_kernel, p_unsigned); 109 + PRINT_ATTRf(exclude_hv, p_unsigned); 110 + PRINT_ATTRf(exclude_idle, p_unsigned); 111 + PRINT_ATTRf(mmap, p_unsigned); 112 + PRINT_ATTRf(comm, p_unsigned); 113 + PRINT_ATTRf(freq, p_unsigned); 114 + PRINT_ATTRf(inherit_stat, p_unsigned); 115 + PRINT_ATTRf(enable_on_exec, p_unsigned); 116 + PRINT_ATTRf(task, p_unsigned); 117 + PRINT_ATTRf(watermark, p_unsigned); 118 + PRINT_ATTRf(precise_ip, p_unsigned); 119 + PRINT_ATTRf(mmap_data, p_unsigned); 120 + PRINT_ATTRf(sample_id_all, p_unsigned); 121 + PRINT_ATTRf(exclude_host, p_unsigned); 122 + PRINT_ATTRf(exclude_guest, p_unsigned); 123 + PRINT_ATTRf(exclude_callchain_kernel, p_unsigned); 124 + PRINT_ATTRf(exclude_callchain_user, p_unsigned); 125 + PRINT_ATTRf(mmap2, p_unsigned); 126 + PRINT_ATTRf(comm_exec, p_unsigned); 127 + PRINT_ATTRf(use_clockid, p_unsigned); 128 + PRINT_ATTRf(context_switch, p_unsigned); 129 + PRINT_ATTRf(write_backward, p_unsigned); 130 + PRINT_ATTRf(namespaces, p_unsigned); 131 + PRINT_ATTRf(ksymbol, p_unsigned); 132 + PRINT_ATTRf(bpf_event, p_unsigned); 133 + PRINT_ATTRf(aux_output, p_unsigned); 134 + 135 + PRINT_ATTRn("{ wakeup_events, wakeup_watermark }", wakeup_events, p_unsigned); 136 + PRINT_ATTRf(bp_type, p_unsigned); 137 + PRINT_ATTRn("{ bp_addr, config1 }", bp_addr, p_hex); 138 + PRINT_ATTRn("{ bp_len, config2 }", bp_len, p_hex); 139 + PRINT_ATTRf(branch_sample_type, p_branch_sample_type); 140 + PRINT_ATTRf(sample_regs_user, p_hex); 141 + PRINT_ATTRf(sample_stack_user, p_unsigned); 142 + PRINT_ATTRf(clockid, p_signed); 143 + PRINT_ATTRf(sample_regs_intr, p_hex); 144 + PRINT_ATTRf(aux_watermark, p_unsigned); 145 + PRINT_ATTRf(sample_max_stack, p_unsigned); 146 + 147 + return ret; 148 + }
+1
tools/perf/util/python-ext-sources
··· 10 10 util/cap.c 11 11 util/evlist.c 12 12 util/evsel.c 13 + util/perf_event_attr_fprintf.c 13 14 util/cpumap.c 14 15 util/memswap.c 15 16 util/mmap.c