mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-01 23:04:54 +01:00
Missed previously, add libpfm support for 'perf list' callbacks and
thereby JSON support.
Committer notes:
Add __maybe_unused to the args of the new print_libpfm_events() in the
else HAVE_LIBPFM block.
Fixes: e42b0ee61282a2f9 ("perf list: Add JSON output option")
Signed-off-by: Ian Rogers <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Caleb Biggers <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kajol Jain <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Leo Yan <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Perry Taylor <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Ravi Bangoria <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sandipan Das <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Weilin Wang <[email protected]>
Cc: Xin Gao <[email protected]>
Cc: Xing Zhengjun <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
39 lines
795 B
C
39 lines
795 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Support for libpfm4 event encoding.
|
|
*
|
|
* Copyright 2020 Google LLC.
|
|
*/
|
|
#ifndef __PERF_PFM_H
|
|
#define __PERF_PFM_H
|
|
|
|
#include "print-events.h"
|
|
#include <subcmd/parse-options.h>
|
|
|
|
#ifdef HAVE_LIBPFM
|
|
int parse_libpfm_events_option(const struct option *opt, const char *str,
|
|
int unset);
|
|
|
|
void print_libpfm_events(const struct print_callbacks *print_cb, void *print_state);
|
|
|
|
#else
|
|
#include <linux/compiler.h>
|
|
|
|
static inline int parse_libpfm_events_option(
|
|
const struct option *opt __maybe_unused,
|
|
const char *str __maybe_unused,
|
|
int unset __maybe_unused)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline void print_libpfm_events(const struct print_callbacks *print_cb __maybe_unused,
|
|
void *print_state __maybe_unused)
|
|
{
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
#endif /* __PERF_PFM_H */
|