Topic
  • 3 replies
  • Latest Post - ‏2009-11-09T08:42:23Z by kenws
SystemAdmin
SystemAdmin
10114 Posts

Pinned topic Trace SPU C++ code

‏2008-09-29T12:55:19Z |
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
Updated on 2009-11-09T08:42:23Z at 2009-11-09T08:42:23Z by kenws
  • CellServ
    CellServ
    1346 Posts

    Re: Trace SPU C++ code

    ‏2008-09-30T15:04:06Z  
    It looks like you've found a compatibility problem.

    I will report this to development.

    There is no workaround (other than using C) that I know of right now.

    thank you

    --
    IBM SDK Service Administrator
  • SystemAdmin
    SystemAdmin
    10114 Posts

    Re: Trace SPU C++ code

    ‏2008-10-06T09:52:16Z  
    • CellServ
    • ‏2008-09-30T15:04:06Z
    It looks like you've found a compatibility problem.

    I will report this to development.

    There is no workaround (other than using C) that I know of right now.

    thank you

    --
    IBM SDK Service Administrator
    Thanks for your response.

    Kind regards,
    Dominik
  • kenws
    kenws
    49 Posts

    Re: Trace SPU C++ code

    ‏2009-11-09T08:42:23Z  
    I stumbled upon this post and remembered a user had a similar problem a couple of weeks ago. In C the void* is implicetely converted to trace_payload_t* but not with C++. There is a small patch that fixes these compilation errors at: http://www.ibm.com/developerworks/forums/message.jspa?messageID=14302400#14302400

    -ken