Skip to main content

developerWorks >  Power Architecture  >  Forums  >  Cell Broadband Engine Architecture forum  >  developerWorks

Trace SPU C++ code    Point your RSS reader here for a feed of the latest messages in this thread


     

 
 

My developerWorks
 Welcome, Guest
Sign in or register
This question is answered.

Permlink Replies: 3 - Pages: 1 - Last Post: Nov 9, 2009 3:42 AM Last Post By: kenws
DominikM

Posts: 11
Registered: Aug 28, 2008 06:11:39 AM
Trace SPU C++ code
Posted: Sep 29, 2008 08:55:19 AM
 
Click to report abuse...   Click to reply to this thread Reply
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

IBM employee or contractor CellServ

Posts: 1,346
Registered: Jul 17, 2006 06:15:39 PM
Re: Trace SPU C++ code
Posted: Sep 30, 2008 11:04:06 AM   in response to: DominikM in response to: DominikM's post
 
Click to report abuse...   Click to reply to this thread Reply
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
DominikM

Posts: 11
Registered: Aug 28, 2008 06:11:39 AM
Re: Trace SPU C++ code
Posted: Oct 06, 2008 05:52:16 AM   in response to: CellServ in response to: CellServ's post
 
Click to report abuse...   Click to reply to this thread Reply
Thanks for your response.

Kind regards,
Dominik
kenws

Posts: 33
Registered: Mar 05, 2009 09:26:50 AM
Re: Trace SPU C++ code
Posted: Nov 09, 2009 03:42:23 AM   in response to: DominikM in response to: DominikM's post
 
Click to report abuse...   Click to reply to this thread Reply
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
 Tags
Help

Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular type of content or application that you're viewing.

My tags shows your tags for this particular type of content or application that you're viewing.

 

MoreLess 


Point your RSS reader here for a feed of the latest messages in all forums