auxtrace.h (4772925885dac93aa5f00d1c1da93277778099cd) | auxtrace.h (f2a39fe84901df2b3d1bec3459b65cee3e8db57c) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* 3 * auxtrace.h: AUX area trace support 4 * Copyright (c) 2013-2015, Intel Corporation. 5 */ 6 7#ifndef __PERF_AUXTRACE_H 8#define __PERF_AUXTRACE_H --- 4 unchanged lines hidden (view full) --- 13#include <stddef.h> 14#include <linux/list.h> 15#include <linux/perf_event.h> 16#include <linux/types.h> 17#include <asm/bitsperlong.h> 18#include <asm/barrier.h> 19 20#include "event.h" | 1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* 3 * auxtrace.h: AUX area trace support 4 * Copyright (c) 2013-2015, Intel Corporation. 5 */ 6 7#ifndef __PERF_AUXTRACE_H 8#define __PERF_AUXTRACE_H --- 4 unchanged lines hidden (view full) --- 13#include <stddef.h> 14#include <linux/list.h> 15#include <linux/perf_event.h> 16#include <linux/types.h> 17#include <asm/bitsperlong.h> 18#include <asm/barrier.h> 19 20#include "event.h" |
21#include "session.h" | |
22 23union perf_event; 24struct perf_session; 25struct evlist; 26struct perf_tool; 27struct perf_mmap; 28struct option; 29struct record_opts; --- 345 unchanged lines hidden (view full) --- 375 * @head: list of address filters 376 * @cnt: number of address filters 377 */ 378struct addr_filters { 379 struct list_head head; 380 int cnt; 381}; 382 | 21 22union perf_event; 23struct perf_session; 24struct evlist; 25struct perf_tool; 26struct perf_mmap; 27struct option; 28struct record_opts; --- 345 unchanged lines hidden (view full) --- 374 * @head: list of address filters 375 * @cnt: number of address filters 376 */ 377struct addr_filters { 378 struct list_head head; 379 int cnt; 380}; 381 |
382struct auxtrace_cache; 383 |
|
383#ifdef HAVE_AUXTRACE_SUPPORT 384 385/* 386 * In snapshot mode the mmapped page is read-only which makes using 387 * __sync_val_compare_and_swap() problematic. However, snapshot mode expects 388 * the buffer is not updated while the snapshot is made (e.g. Intel PT disables 389 * the event) so there is not a race anyway. 390 */ --- 153 unchanged lines hidden (view full) --- 544void events_stats__auxtrace_error_warn(const struct events_stats *stats); 545 546void addr_filters__init(struct addr_filters *filts); 547void addr_filters__exit(struct addr_filters *filts); 548int addr_filters__parse_bare_filter(struct addr_filters *filts, 549 const char *filter); 550int auxtrace_parse_filters(struct evlist *evlist); 551 | 384#ifdef HAVE_AUXTRACE_SUPPORT 385 386/* 387 * In snapshot mode the mmapped page is read-only which makes using 388 * __sync_val_compare_and_swap() problematic. However, snapshot mode expects 389 * the buffer is not updated while the snapshot is made (e.g. Intel PT disables 390 * the event) so there is not a race anyway. 391 */ --- 153 unchanged lines hidden (view full) --- 545void events_stats__auxtrace_error_warn(const struct events_stats *stats); 546 547void addr_filters__init(struct addr_filters *filts); 548void addr_filters__exit(struct addr_filters *filts); 549int addr_filters__parse_bare_filter(struct addr_filters *filts, 550 const char *filter); 551int auxtrace_parse_filters(struct evlist *evlist); 552 |
552static inline int auxtrace__process_event(struct perf_session *session, 553 union perf_event *event, 554 struct perf_sample *sample, 555 struct perf_tool *tool) 556{ 557 if (!session->auxtrace) 558 return 0; | 553int auxtrace__process_event(struct perf_session *session, union perf_event *event, 554 struct perf_sample *sample, struct perf_tool *tool); 555int auxtrace__flush_events(struct perf_session *session, struct perf_tool *tool); 556void auxtrace__free_events(struct perf_session *session); 557void auxtrace__free(struct perf_session *session); |
559 | 558 |
560 return session->auxtrace->process_event(session, event, sample, tool); 561} 562 563static inline int auxtrace__flush_events(struct perf_session *session, 564 struct perf_tool *tool) 565{ 566 if (!session->auxtrace) 567 return 0; 568 569 return session->auxtrace->flush_events(session, tool); 570} 571 572static inline void auxtrace__free_events(struct perf_session *session) 573{ 574 if (!session->auxtrace) 575 return; 576 577 return session->auxtrace->free_events(session); 578} 579 580static inline void auxtrace__free(struct perf_session *session) 581{ 582 if (!session->auxtrace) 583 return; 584 585 return session->auxtrace->free(session); 586} 587 | |
588#define ITRACE_HELP \ 589" i: synthesize instructions events\n" \ 590" b: synthesize branches events\n" \ 591" c: synthesize branches events (calls only)\n" \ 592" r: synthesize branches events (returns only)\n" \ 593" x: synthesize transactions events\n" \ 594" w: synthesize ptwrite events\n" \ 595" p: synthesize power events\n" \ --- 185 unchanged lines hidden --- | 559#define ITRACE_HELP \ 560" i: synthesize instructions events\n" \ 561" b: synthesize branches events\n" \ 562" c: synthesize branches events (calls only)\n" \ 563" r: synthesize branches events (returns only)\n" \ 564" x: synthesize transactions events\n" \ 565" w: synthesize ptwrite events\n" \ 566" p: synthesize power events\n" \ --- 185 unchanged lines hidden --- |