Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Compilers LCC > Help - how to p...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 1015 of 1070
Post > Topic >>

Help - how to profile DLL files with arbitrary entry points

by MatlabMonkey@[EMAIL PROTECTED] Jan 11, 2008 at 09:56 AM

I managed to compile a Matlab DLL from the command prompt succesfully
on Windows Vista for profiling. I compiled the __profile.asm file
prior to calling lcclnk.

Now I believe the lcc-generated profiling function
__profile_write_my_engine() did not get triggered when I invoke my DLL
file from Matlab. Everything worked, except that there is no profiler
output.

The entry point for my Matlab DLL is mexFunction(). But if I specify
this in lcclnk using the -entry option, my machine crashes if I
attempt to run invoke the DLL.

Many thanks in advance for your thoughts!


----------------------------------------------------------------------------
lcc and lcclnk logs
----------------------------------------------------------------------------
c:\> lcc My_Engine.c -FoMy_Engine.obj -g2 -profile -v -I"C:\Program
Files\MATLAB\R2007b\extern\include" -I"C:\lcc\include\" -
DMATLAB_MEX_FILE -DNDEBUG -DMX_COMPAT_32

Warning My_Engine.c: 52  assignment of pointer to array 2 of pointer
to incomplete struct mxArray_tag defined at c:\program files\matlab
\r2007b\extern\include\matrix.h 311 to pointer to pointer to
incomplete struct mxArray_tag defined at c:\program files\matlab\r2007b
\extern\include\matrix.h 311
Logiciels/Informatique lcc-win32 version 3.8. Compilation date: Dec 18
2007 19:12:54
Spills:0 Chars read: 222310, Assembly time: 0 ms, Memory used:
1245184,Time = 0.032 sec.
0 errors, 1 warning
.............................................................................
c:\> lcc "C:\Program Files\MATLAB\R2007b\sys\lcc\mex\lccstub.c" -
FoMy_Engine.TempLib.obj -g2 -profile -v -I"C:\Program Files\MATLAB
\R2007b\extern\include" -I"C:\lcc\include\" -DMATLAB_MEX_FILE -DNDEBUG
-DMX_COMPAT_32

Logiciels/Informatique lcc-win32 version 3.8. Compilation date: Dec 18
2007 19:12:54
Spills:0 Chars read: 659088, Assembly time: 0 ms, Memory used:
2555904,Time = 0.043 sec.
.............................................................................
lcclnk -o My_Engine.mexw32 -Dll "C:\Program Files\MATLAB\R2007b\extern
\lib\win32\lcc\mexFunction.def" -L"C:\Program Files\MATLAB\R2007b
\extern\lib\win32\lcc" My_Engine.TempLib.obj My_Engine.obj profile.lib
__profile.obj libmx.lib libmex.lib libmat.lib
Writing library for My_Engine.mexw32
 




 1 Posts in Topic:
Help - how to profile DLL files with arbitrary entry points
MatlabMonkey@[EMAIL PROTE  2008-01-11 09:56:50 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Oct 10 23:43:27 CDT 2008.