Commit b6778fe1 authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo

perf auxtrace: Add itrace A option to approximate IPC

Add an option to specify that synthesized IPC can be approximate, rather
than completely accurate.
Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: https://lore.kernel.org/r/20211027080334.365596-3-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent cf14013b
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
L synthesize last branch entries on existing event records L synthesize last branch entries on existing event records
s skip initial number of events s skip initial number of events
q quicker (less detailed) decoding q quicker (less detailed) decoding
A approximate IPC
Z prefer to ignore timestamps (so-called "timeless" decoding) Z prefer to ignore timestamps (so-called "timeless" decoding)
The default is all events i.e. the same as --itrace=ibxwpe, The default is all events i.e. the same as --itrace=ibxwpe,
......
...@@ -1564,6 +1564,9 @@ int itrace_do_parse_synth_opts(struct itrace_synth_opts *synth_opts, ...@@ -1564,6 +1564,9 @@ int itrace_do_parse_synth_opts(struct itrace_synth_opts *synth_opts,
case 'q': case 'q':
synth_opts->quick += 1; synth_opts->quick += 1;
break; break;
case 'A':
synth_opts->approx_ipc = true;
break;
case 'Z': case 'Z':
synth_opts->timeless_decoding = true; synth_opts->timeless_decoding = true;
break; break;
......
...@@ -84,6 +84,7 @@ enum itrace_period_type { ...@@ -84,6 +84,7 @@ enum itrace_period_type {
* @thread_stack: feed branches to the thread_stack * @thread_stack: feed branches to the thread_stack
* @last_branch: add branch context to 'instruction' events * @last_branch: add branch context to 'instruction' events
* @add_last_branch: add branch context to existing event records * @add_last_branch: add branch context to existing event records
* @approx_ipc: approximate IPC
* @flc: whether to synthesize first level cache events * @flc: whether to synthesize first level cache events
* @llc: whether to synthesize last level cache events * @llc: whether to synthesize last level cache events
* @tlb: whether to synthesize TLB events * @tlb: whether to synthesize TLB events
...@@ -127,6 +128,7 @@ struct itrace_synth_opts { ...@@ -127,6 +128,7 @@ struct itrace_synth_opts {
bool thread_stack; bool thread_stack;
bool last_branch; bool last_branch;
bool add_last_branch; bool add_last_branch;
bool approx_ipc;
bool flc; bool flc;
bool llc; bool llc;
bool tlb; bool tlb;
...@@ -649,6 +651,7 @@ bool auxtrace__evsel_is_auxtrace(struct perf_session *session, ...@@ -649,6 +651,7 @@ bool auxtrace__evsel_is_auxtrace(struct perf_session *session,
" L[len]: synthesize last branch entries on existing event records\n" \ " L[len]: synthesize last branch entries on existing event records\n" \
" sNUMBER: skip initial number of events\n" \ " sNUMBER: skip initial number of events\n" \
" q: quicker (less detailed) decoding\n" \ " q: quicker (less detailed) decoding\n" \
" A: approximate IPC\n" \
" Z: prefer to ignore timestamps (so-called \"timeless\" decoding)\n" \ " Z: prefer to ignore timestamps (so-called \"timeless\" decoding)\n" \
" PERIOD[ns|us|ms|i|t]: specify period to sample stream\n" \ " PERIOD[ns|us|ms|i|t]: specify period to sample stream\n" \
" concatenate multiple options. Default is ibxwpe or cewp\n" " concatenate multiple options. Default is ibxwpe or cewp\n"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment