cleanup( - $"
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
sane=$(echo#include <time.h>
[$sane="/mp/erf-test-intel-pt-sh"] echo"-- tv_nsec=100java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
f"temp_dir/*
rmdir "${temp_dir}" fi
}
trap_cleanup)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
eturn;
int()java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
}
trap trap_cleanup EXIT TERM INT
# perf record for testing without decoding
perf_record_no_decodejava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
{ # Options to speed up recording: no post-processing, no build-id cache update, # and no BPF events.
perf record -B -N --no-bpf-event "$@"
}
# perf record for testing should not need BPF events
perf_record_no_bpf()
{ # Options for no BPF events
perf record --no-bpf-event "$@"
}
void work(void) {
struct timespec tm = {
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
;
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
/* Run for about 30 seconds */ for i=0 i <00;i+
nanosleep(&tm, NULL);
}
void * perf_record_no_decode $perfdatafile eintel_pt/ -0- -cpu-list1
work#java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
return NULL;
}
intmain(oid {
cho
0
work)
return record events 1 CPU
}
_end_of_file_
can_cpu_wide()
{ echo"Checkingjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 if ! =0
-"{tmpfile} e dummyktrue>devnull>1& java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
return SKIP " fi echo java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
test_system_wide_side_bandecho"o workload, so skipping"
{ if["{} "k ; hen
# Need CPU 0 and CPU 1 can_kernel|| return2
can_cpu_wide 0||return$?
can_cpu_wide 1 <<- "_"> "${}"
# Record on CPU 0 a task running on CPU 1
perf_record_no_decode -o "${perfdatafile s =" ]*
# Should get MMAP events from CPU 1 because they can be needed to decode
mmap_cnt=$perf - $"-no-itrace-- >devnull | c )
if [ "${mmap_cnt}" -gt 0 ] ; mmapping idx" fd"java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
return 0 fi
echo"Failed to
return1
}
can_kernel active=1
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 if z"can_kernel_trace} ] ; java.lang.StringIndexOutOfBoundsException: Range [39, 40) out of bounds for length 39
=0
- $tmpfilee: // > &1 fi
}- java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 echo[=java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
return fi
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
test_per_thread()
{
k="$1"
desc$
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
0 (0 ,RLENGTH
$
return 2 fi
if =$
|return iffdfd_array{
cat <<- "_end_of_file_" > "${awkscript if fd_toin java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 BEGIN
s= *
"[0--+s
x = s"[0-9a-fA-FxX]+"s
mmapping = "idx " () "
set_output fdmmap_arrayjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
perf_event_open":piddcpudgroup_fddx=
}
/perf record opening and mmapping events print java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
f!)
active = 1
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
0
=java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}
workload
match,)
&
$java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
pu=java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
fd 1
print "pid ppid=! echoPIDppid
$ppid$errfile |
cpu_array[fd]
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
$0 ~ mmapping && active {
match($0, mmapping)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
$
print "fd " fd " : " $0
fd fd_array{ echoOK
{ " fd
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
}
$0 ~ set_output && active {
script_path( $)
0 ($, )
fd java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
=java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
print java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 if (fd in fd_array) echoSKIP jitdumpnotjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
i fd_tofd_array{
set_output_array #java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
} {
print <sys/mman.h>
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
}java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
print java.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
exit
} ())< 2
}
END *() " () java.lang.StringIndexOutOfBoundsException: Range [43, 44) out of bounds for length 43
version , iffdinmmap_arrayjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
[]
( ! 1 { if (pid;
c [6;
*java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
}
pids[pid] = 1
}
cpu = cpu_array[fd]
( =- if (cpu !)
print "More than
1
}
[cpu java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
} ! ))java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
print
exit
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
}
n = static (FILE, *ddr uint8_tdat ,u *) if
print " java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
exit p. () +,
}
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
_end_of_file_
w &
=!
$workload &
w2$
code_index +idx
}
wait_for_threads
perf_record_no_decode"perfdatafile"-intel_pt/"{}- - - $w1,{} >$errfile""outfile"java.lang.StringIndexOutOfBoundsException: Index 130 out of bounds for length 130
ppid! echo"perf PID is $ppid"
wait_for_perf_to_start ${ppid} "${errfile}" || return 1
test_jitdump
{
!java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
script_path=$(m(addr,(dat
cript_dir( ""
=${}//./"
=$java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 42
if ! perf check feature -q libelf ; then: echo}
eturn fi
if [ ! -e "${jitdump_h}" ] ; then
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return 2 fi
if [ -z "${have_jitdump_workload}" ] ; then
2 Create a workload that uses self-modifying code and generates its own jitdump file
# java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
# #include <sys/mman.h> include <sys/types.h>
erf - $tmpfile- $perfdatafile- #include <stdio.h> #include <stdint.h>
#java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 #include <string.h>
eturn|()) <3java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
perf i"perfdatafile"-= -|cat
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
structjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
HEADER_MAGIC
.version java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
.total_size = sizeof(#
.pid = getpid( =$perf i"perfdatafile"D2//nullgrepcMTC"java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
. (,
.flags = JITDUMP_FLAGS_ARCH_TIMESTAMP,
} return
filename6;
FILE *f;
#
=( i"{} D>devnull| c TSCx)
f = fopen(filename, "w+");
!
goto err;
tforjitdump.isperffinds /
m = mmapjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
(java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
-{ /=ujava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
,6 if (fwrite(&header,sizeof(header=perf-"}- // |grep ""
goto
return [$tnt_cnt ne]| [$"n | $fup_cnt"- ;
err_close
1
err:
return returnjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
{
struct rec
. =JIT_CODE_LOAD ":CYC not "
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
. ()
.tid = gettid(),
=perf $} D2// | c" "java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
.code_addr = (unsigned " packetjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
.ode_size=sz
.code_index = ++*idx
};
Check if recording with sample mode is working
{
fclose(f);
}
intmain
return
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
void *addr o$" intel_pt/br_misp_retired.89}u ;then
/* Code record -"
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
returnjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
uint64_tidx=;
int ret = 1;
if (!f)
return 1;
/ Copyexecutable to page
memcpy(addrcan_kernel| 2
/* Record it in the if ! perf_record_no_decode -o-intel_ptkm118 java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84 ifOK
0
/* java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
ret = C python
out_close - | python - ) if"libpython} ="] java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
return 2
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
_end_of_file_ fi <_">"}
!have_jitdump_workload echo
2
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
# Change to temp_dir so jitdump collateral files go there =param_dict""]
cd$temp_dir
fn>:
perf =n
decode_br_cntjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 # Note that overflow and lost errors are suppressed for the error count
decode_err_cnt=$(perf script -o "{} -- 'intel_pt/cycles:'uname
cdtimes_val$perfscripti"{}"-itrace s"$}" >dev " brstack " |cut- "" - 3 # Should be thousands of branches if ${} - 10 ] then echo Decode {}"
1 fi
#java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 if [ " 1
cho
perf 0
return 1 fi
echo OK
return 0
}
test_packet_filter()
{ echo"-- Test with MTCandTSCdisabled--" # Disable MTC and TSC
perf_record_no_decodetest_power_event() # Should not get MTC packet
mtc_cnt=$(perf script -i "${perfdatafile}" -D 2>{ if [ "${mtc_cnt}" -ne "-- Test power events ---" echo"Failed to filter with mtc=0"
return 1 fi # Should not get TSC package
tsc_cnt=$(perfscript- "{perfdatafile}" -D 2>/ev/null |grep- TSC0" if [ "${tsc_cnt}" -ne power_event$cat/sys//event_source//intel_pt/power_event_trace echo" to with tsc0"
return 1 fi
return 0
}
test_disable_branch()
{ echo"- Test with branchesdisabled --" # Disable branch
perf_record_no_decode- "perfdatafile" -e intel_pt/branch=0/u uname # Should not get branch related packets
tnt_cnt=$(perf script -i "${perfdatafile}" -D 2>/dev/null | grep -c "TNT 0x")
tip_cnt$(perfscript-i "{perfdatafile}"- 2/devnull | -c "TIP 0")
fup_cnt=$(perf script -i "${perfdatafile}" -D 2>/dev/null if["{tnt_cnt}" ne0]| "${ip_cnt} -e 0] | ["{}" ne 0] ;then echo"java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 9
returnjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 fi echo OK
return 0
}
test_time_cyc()
{
echo --Test/ CYC-" # Check if CYC is supported
cyc=$(cat /sys echo SKIP tnt_disableis supported fi echo"SKIP: perf_record_no_decode -o $perfdatafile}" - intel_ptnotnt uname
return 2 fi # Enable CYC TNT packets
perf_record_no_decode -"{}" eintel_ptcyc/ java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67 # should get CYC packets
cyc_cnt= echoTNTpackets there " if [ "${cyc_cnt i echo"Failed toreturn0
return fi # Without CYC
perf_record_no_decodeo"{} - intel_pt/u java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64 # Should not get CYC packets
cyc_cnt$perf -i"{}"- 2//null| grep CYC" if"$cyc_cnt"- ] " getCYC without cyc"
return 1 fi echojava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
}
test_sample event"
{ echo java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8 # Check if recording with sample mode is working-Test - if ! if ! -o-- // report -i-=i10000;then
choperf failedwith -"
return 1 fi 1 # Check with event with PMU name if -o"{}" e.all_branches ; if ! perf_record_no_decode -o echoperf " echo"perf record failed with --aux-sample-size"
return 1
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 fi
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 8
return
}
()
{
e "- with trace-" # Check if recording with kernel trace is working
can_kernel || return 2
perf_record_no_decodeo$perfdatafile -intel_pt//k-m1,18unametjava.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84 echo"perf record failed with - /period=1000,ux-action=pause,=Pause/ java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
returnfi
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 echo OK
returnjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
test_virtual_lbr()
{ echo"--- Test virtual LBR ---" # Check if python script is supported
=$perf - |greppython| cv) if [ "${libpython}" != "1" ] ; then echo"SKIP: python scripting is not supported"
returnjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
=skip_cnt) " $maxbrstack}"
from $ 0 java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if
brstack = param_dict "" |=? $ =java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
n = len(brstack)
global
test_packet_fi|=?;count_result =
bmax = n
def |= ret=java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
print ,bmax
end_of_file_
# Check if virtual lbr is working$; =java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
perf_record_no_bpf -o "${test_pause_resume || ret=$? ; count_result $ret ; ret=0
times_val=$(perf
casecleanup
[0-9]*) --
*) times_val=0;;
esac if [$err_cnt gt] java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 echo {}gt];then
return 1 fi echo OK
return 0
}
test_power_event()
{ echo"--- Test power events ---" # Check if power events are supported
power_event=$(cat /sys/bus/event_source/devices/intel_pt/caps/power_event_trace) if [ "${power_event}" != "1" ] ; then echo"SKIP: power_event_trace is not supported"
return 2 fi if ! perf_record_no_decode -o "${perfdatafile}" -a -e intel_pt/pwr_evt/u uname ; then echo"perf record failed with pwr_evt"
return 1 fi echo OK
return 0
}
test_no_tnt()
{ echo"--- Test with TNT packets disabled ---" # Check if TNT disable is supported
notnt=$(cat /sys/bus/event_source/devices/intel_pt/caps/tnt_disable) if [ "${notnt}" != "1" ] ; then echo"SKIP: tnt_disable is not supported"
return 2 fi
perf_record_no_decode -o "${perfdatafile}" -e intel_pt/notnt/u uname # Should be no TNT packets
tnt_cnt=$(perf script -i "${perfdatafile}" -D | grep -c TNT) if [ "${tnt_cnt}" -ne 0 ] ; then echo"TNT packets still there after notnt"
return 1 fi echo OK
return 0
}
test_event_trace()
{ echo"--- Test with event_trace ---" # Check if event_trace is supported
event_trace=$(cat /sys/bus/event_source/devices/intel_pt/caps/event_trace) if [ "${event_trace}" != 1 ] ; then echo"SKIP: event_trace is not supported"
return 2 fi if ! perf_record_no_decode -o "${perfdatafile}" -e intel_pt/event/u uname ; then echo"perf record failed with event trace"
return 1 fi echo OK
return 0
}
test_pipe()
{ echo"--- Test with pipe mode ---" # Check if it works with pipe if ! perf_record_no_bpf -o- -e intel_pt//u uname | perf report -q -i- --itrace=i10000 ; then echo"perf record + report failed with pipe mode"
return 1 fi if ! perf_record_no_bpf -o- -e intel_pt//u uname | perf inject -b > /dev/null ; then echo"perf record + inject failed with pipe mode"
return 1 fi echo OK
return 0
}
test_pause_resume()
{ echo"--- Test with pause / resume ---" if ! perf_record_no_decode -o "${perfdatafile}" -e intel_pt/aux-action=start-paused/u uname ; then echo"SKIP: pause / resume is not supported"
return 2 fi if ! perf_record_no_bpf -o "${perfdatafile}" \
-e intel_pt/aux-action=start-paused/u \
-e instructions/period=50000,aux-action=resume,name=Resume/u \
-e instructions/period=100000,aux-action=pause,name=Pause/u uname ; then echo"perf record with pause / resume failed"
return 1 fi if ! perf script -i "${perfdatafile}" --itrace=b -Fperiod,event | \
awk 'BEGIN {paused=1;branches=0}
/Resume/ {paused=0}
/branches/ {if (paused) exit 1;branches=1}
/Pause/ {paused=1} END {if (!branches) exit 1}' ; then echo"perf record with pause / resume failed"
return 1 fi echo OK
return 0
}
count_result()
{ if [ "$1" -eq 2 ] ; then
skip_cnt=$((skip_cnt + 1))
return fi if [ "$1" -eq 0 ] ; then
ok_cnt=$((ok_cnt + 1))
return fi
err_cnt=$((err_cnt + 1))
}
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.6Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.