I met a problem when using pintool and itrace,
I use pintool to execute a HelloWorld.exe demo program
pin -t itrace.dll -- HelloWorld.exe
However, the generated "itrace.out" indicate no eips for user code
like this:
0x77e52996
0x77e52998
0x77e52999
0x77e5299a
0x77e5299b
0x77e5299c
0x77e2dd42
0x77e2dd45
0x77e2dd4c
0x77e2dd53
0x77e2dd6d
0x77e23c50
0x77e23c56
0x77e23c59
0x77e23c5b
0x77e23c5d
Related
Anyone have a clean process for converting samples on macOS to FlameGraphs?
After a bit of fiddling I thought I could perhaps use a tool such as flamegraph-sample, but it seems to give me some trouble and so I thought perhaps there may be other more up-to-date options that I'm missing insomuch that this tool gives an error:
$ sudo sample PID -file ~/tmp/sample.txt -fullPaths 1
Sampling process 198 for 1 second with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Sample analysis of process 35264 written to file ~/tmp/sample.txt
$ python stackcollapse-sample.py ~/tmp/sample.txt > ~/tmp/sample_collapsed.txt
$ flamegraph.pl ~/tmp/sample_collapsed.txt > ~/tmp/sample_collapsed_flamegraph.svg
Ignored 2335 lines with invalid format
ERROR: No stack counts found
I have been trying to get a w3wp crash dump to see the crash callstack. I got two dumps but both of them have a single thread in them - seems almost like AppDomain has been recycled already and there is nothing useful left in the process when the dump was saved.
Command used: "procdump -mm -e -n 1 -l pt <PID>"
Also tried -ma for full dump but result is the same:
0:000> ~
. 0 Id: fa4.1dc8 Suspend: -1 Teb: 000000b1`77a78000 Unfrozen
I am not sure if I am missing something in the command, or IIS does not provide usable managed dumps when capturing them with procdump - any inputs are highly appreciated!
Additional detail: I was seeing STACK_OVERFLOW exception being logged by the procdump, which - apparently needs different method to capture useful dump. See my own answer below for details.
It only took few hours - hopefully this will save some time for others like me.
Found a way to do this:
procdump -mm -e 1 -l -f C00000FD.STACK_OVERFLOW -g <PID>
It works! Thanks to the unknown fellow member whose hint lead me to this. I was reading too many pages and missed saving the page link to post acknowledgement here.
Hi i saw some AES encryption supported in the Github's SDAccel/Vitis docs [here][1]. Is there any way to implement AES encryption or others using the HDK flow. Notably, I'm interested in hardware support for cryptographic suites or operations.
AI was told to simply create a standard HLS project. Just make sure to select "xcvu9p-flgb2104-2-i" as the targeted part.
For instance, here is a sample HLS script to run the hello world (vadd) example:
open_project prj -reset
set_top vadd
open_solution "solution"
add_files ./src/vadd.cpp -cflags "-g -I./src "
set_part xcvu9p-flgb2104-2-i
create_clock -period 250.000000MHz
set_clock_uncertainty 27.000000%
config_interface -m_axi_addr64
config_interface -default_slave_interface s_axilite
config_export -format ip_catalog -ipname vadd
csynth_design
export_design
exit
If you put the above in a file called vadd.tcl, you can then run "vitis_hls -f vadd.tcl" from the hello world example directory. After that, the generated RTL (or the generated Vivado IP) can be used in the HDK flow.
From here I'm not sure how to take the Vivado generated IP zip and include it in the simple hello_world_vhdl HDK example
I’m new for spike and RISC V. I’m trying to do some dynamic instruction trace with spike. These instructions are from a sample.c file. I have tried the following commands:
$ riscv64-unknown-elf-gcc simple.c -g -o simple.out
$ riscv64-unknown-elf-objdump -d --line-numbers -S simple.out
But these commands display the assembled instructions in an out file, which is not I want. I need to trace the dynamic executed instruction in runtime. I find only two relative commands in spike host option:
-g - track histogram of PCs
-l - generate a log of execution
I’m not sure if the result is what I expected as above.
Does anyone have an idea how to do the dynamic instruction trace in spike?
Thanks a lot!
Yes, you can call spike with -l to get a trace of all executed instructions.
Example:
$ spike -l --isa=RV64gc ~/riscv/pk/riscv64-unknown-elf/bin/pk ./hello 2> ins.log
Note that this trace also contains all instructions executed by the proxy-kernel - rather than just the trace of your user program.
The trace can still be useful, e.g. you can search for the start address of your code (i.e. look it up in the objdump output) and consume the trace from there.
Also, when your program invokes a syscall you see something like this in the trace:
[.. inside your program ..]
core 0: 0x0000000000010088 (0x00000073) ecall
core 0: exception trap_user_ecall, epc 0x0000000000010088
core 0: 0x0000000080001938 (0x14011173) csrrw sp, sscratch, sp
[.. inside the pk ..]
sret
[.. inside your program ..]
That means you can skip to the sycall instruction (that are executed in the pk) by searching for the next sret.
Alternatively, you can call spike with -d to enter debug mode. Then you can set a breakpoint on the first instruction of interest in your program (until pc 0 YOURADDRESS - look up the address in the objdump output) and single step from there (by hitting return multiple times). See also the help screen by entering h at the spike prompt.
I want to compile on a server a module using f2py with the following command :
f2py -c utils.f90 parameters.f90 helmholtz.f90 calc.f90 qgflux.f90
qgstep.f90 interface.f90 -m py_mod
but the f2py command is not available on that server. Hence, I tried to compile my module within python with the following code :
import numpy.f2py
r = numpy.f2py.run_main(['-m','py_mod','utils.f90','parameters.f90','helmholtz.f90','calc.f90','qgflux.f90','qgstep.f90','interface.f90'])
Looks like everything goes fines, at the end I get :
Wrote C/API module "py_mod" to file "./py_modmodule.c"
Fortran 90 wrappers are saved to "./py_mod-f2pywrappers2.f90"
Now the command "print(r)" returns :
{'py_mod': {'csrc': ['./py_modmodule.c',
'/usr/lib64/python3.6/site-packages/numpy/f2py/src/fortranobject.c'],
'fsrc': ['./py_mod-f2pywrappers2.f90'], 'h':
['/usr/lib64/python3.6/site-packages/numpy/f2py/src/fortranobject.h']}}
But I do not know what to do next to get the module py_mod, can you please help me ?
Regards
OK, I finally found a solution to my issue. Here is the command I used in bash :
python3.6 -m numpy.f2py -c utils.f90 parameters.f90 helmholtz.f90
calc.f90 qgflux.f90 qgstep.f90 interface.f90 -m py_mod
and it worked fine !