Hi,
I want to trace SPU activity using the Cell BE Performance Debugging Tool. I followed the instructions of the CBE_Programmers_Guide which goes well for C code.
But now I have my program written in C++ code. If I try to compile the SPU code I get the following error:
[root@sandwithtoaster spu]# make
spu-g++ -I/usr/spu/include/trace -L/usr/spu/lib/trace -Dmain=_pdt_main -Dexit=_pdt_exit -DMFCIO_TRACE -DLIBSYNC_TRACE -O3 -o spu spu.cpp -lm -ltrace
/usr/spu/include/trace/trace_spu_mfcio.h: In function 'unsigned int trace_mfc_read_tag_status()':
/usr/spu/include/trace/trace_spu_mfcio.h:30: error: invalid conversion from 'void*' to 'trace_payload_t*'
/usr/spu/include/trace/trace_spu_mfcio.h:30: error: initializing argument 3 of 'long int trace_interval_exit(void*, int, trace_payload_t*, const char*)'
/usr/spu/include/trace/trace_spu_mfcio.h: In function 'unsigned int trace_mfc_read_list_stall_status()':
/usr/spu/include/trace/trace_spu_mfcio.h:40: error: invalid conversion from 'void*' to 'trace_payload_t*'
/usr/spu/include/trace/trace_spu_mfcio.h:40: error: initializing argument 3 of 'long int trace_interval_exit(void*, int, trace_payload_t*, const char*)'
/usr/spu/include/trace/trace_spu_mfcio.h: In function 'unsigned int trace_spu_read_signal1()':
/usr/spu/include/trace/trace_spu_mfcio.h:50: error: invalid conversion from 'void*' to 'trace_payload_t*'
/usr/spu/include/trace/trace_spu_mfcio.h:50: error: initializing argument 3 of 'long int trace_interval_exit(void*, int, trace_payload_t*, const char*)'
/usr/spu/include/trace/trace_spu_mfcio.h: In function 'unsigned int trace_spu_read_signal2()':
/usr/spu/include/trace/trace_spu_mfcio.h:60: error: invalid conversion from 'void*' to 'trace_payload_t*'
/usr/spu/include/trace/trace_spu_mfcio.h:60: error: initializing argument 3 of 'long int trace_interval_exit(void*, int, trace_payload_t*, const char*)'
/usr/spu/include/trace/trace_spu_mfcio.h: In function 'unsigned int trace_spu_read_in_mbox()':
/usr/spu/include/trace/trace_spu_mfcio.h:70: error: invalid conversion from 'void*' to 'trace_payload_t*'
/usr/spu/include/trace/trace_spu_mfcio.h:70: error: initializing argument 3 of 'long int trace_interval_exit(void*, int, trace_payload_t*, const char*)'
/usr/spu/include/trace/trace_spu_mfcio.h: In function 'void trace_spu_write_out_mbox(unsigned int)':
/usr/spu/include/trace/trace_spu_mfcio.h:78: error: invalid conversion from 'void*' to 'trace_payload_t*'
/usr/spu/include/trace/trace_spu_mfcio.h:78: error: initializing argument 3 of 'long int trace_interval_exit(void*, int, trace_payload_t*, const char*)'
/usr/spu/include/trace/trace_spu_mfcio.h: In function 'void trace_spu_write_out_intr_mbox(unsigned int)':
/usr/spu/include/trace/trace_spu_mfcio.h:86: error: invalid conversion from 'void*' to 'trace_payload_t*'
/usr/spu/include/trace/trace_spu_mfcio.h:86: error: initializing argument 3 of 'long int trace_interval_exit(void*, int, trace_payload_t*, const char*)'
/usr/spu/include/trace/trace_spu_mfcio.h: In function 'unsigned int trace_spu_read_event_status()':
/usr/spu/include/trace/trace_spu_mfcio.h:96: error: invalid conversion from 'void*' to 'trace_payload_t*'
/usr/spu/include/trace/trace_spu_mfcio.h:96: error: initializing argument 3 of 'long int trace_interval_exit(void*, int, trace_payload_t*, const char*)'
spu.cpp: In function 'void update_singlebuffer(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)':
spu.cpp:271: error: invalid conversion from 'void*' to 'trace_payload_t*'
...
Is there any way to trace SPUs with C++ code? Would it help if I rewrite the SPU code to C code? But how would I then link the SPU C code with PPU C++ code?
Kind regards,
Dominik