forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Link: https://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
- Loading branch information
Showing
12 changed files
with
218 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
#ifndef __PERF_EVSEL_FPRINTF_H | ||
#define __PERF_EVSEL_FPRINTF_H 1 | ||
|
||
#include <stdio.h> | ||
#include <stdbool.h> | ||
|
||
struct evsel; | ||
|
||
struct perf_attr_details { | ||
bool freq; | ||
bool verbose; | ||
bool event_group; | ||
bool force; | ||
bool trace_fields; | ||
}; | ||
|
||
int perf_evsel__fprintf(struct evsel *evsel, | ||
struct perf_attr_details *details, FILE *fp); | ||
|
||
#define EVSEL__PRINT_IP (1<<0) | ||
#define EVSEL__PRINT_SYM (1<<1) | ||
#define EVSEL__PRINT_DSO (1<<2) | ||
#define EVSEL__PRINT_SYMOFFSET (1<<3) | ||
#define EVSEL__PRINT_ONELINE (1<<4) | ||
#define EVSEL__PRINT_SRCLINE (1<<5) | ||
#define EVSEL__PRINT_UNKNOWN_AS_ADDR (1<<6) | ||
#define EVSEL__PRINT_CALLCHAIN_ARROW (1<<7) | ||
#define EVSEL__PRINT_SKIP_IGNORED (1<<8) | ||
|
||
struct addr_location; | ||
struct perf_event_attr; | ||
struct perf_sample; | ||
struct callchain_cursor; | ||
struct strlist; | ||
|
||
int sample__fprintf_callchain(struct perf_sample *sample, int left_alignment, | ||
unsigned int print_opts, struct callchain_cursor *cursor, | ||
struct strlist *bt_stop_list, FILE *fp); | ||
|
||
int sample__fprintf_sym(struct perf_sample *sample, struct addr_location *al, | ||
int left_alignment, unsigned int print_opts, | ||
struct callchain_cursor *cursor, | ||
struct strlist *bt_stop_list, FILE *fp); | ||
|
||
typedef int (*attr__fprintf_f)(FILE *, const char *, const char *, void *); | ||
|
||
int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr, | ||
attr__fprintf_f attr__fprintf, void *priv); | ||
#endif // __PERF_EVSEL_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.