EASy68K  
It is currently Sat Apr 29, 2017 5:37 am

All times are UTC




Post new topic Reply to topic  [ 58 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject:
PostPosted: Mon May 25, 2009 9:49 am 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1036
Location: Monroe County Community College, Monroe Michigan, U.S.A.
I've never found a profiler I like that doesn't cost too much. A good recommendation would be appreciated.

In the mean time; If you look in the file textS.cpp you will see the following code:
Code:
// timer stuff for profiling
const int MAX_PROFILES = 10;
LARGE_INTEGER timeStart[MAX_PROFILES];
LARGE_INTEGER timeEnd;
LARGE_INTEGER timerFreq;
LARGE_INTEGER scoreTime;
float profileTimes[MAX_PROFILES];

//---------------------------------------------------------------------------
__fastcall TTextStuff::TTextStuff(TComponent* Owner)
        : TForm(Owner)
{
  InsertMode = true;
  SourceText->DefAttributes->Protected = true;
  QueryPerformanceFrequency(&timerFreq);    // set up high resolution timer
}

//---------------------------------------------------------------------------
void __fastcall TTextStuff::ProfileStart(unsigned int n)
{
  if (n >= MAX_PROFILES)
    return;
  QueryPerformanceCounter(&timeStart[n]);   // get starting time
}

//---------------------------------------------------------------------------
void __fastcall TTextStuff::ProfileEnd(unsigned int n)
{
  if (n >= MAX_PROFILES)
    return;
  QueryPerformanceCounter(&timeEnd);
  profileTimes[n] += ( (float)timeEnd.QuadPart - (float)timeStart[n].QuadPart ) / timerFreq.QuadPart;
}

//---------------------------------------------------------------------------
void __fastcall TTextStuff::ProfileClear()
{
  for (int i=0; i<MAX_PROFILES; i++)
    profileTimes[i] = 0.0f;
}


This is what I created to profile the color syntax highlighter. You use it like this:

Code:
  ProfileClear();    // do this to clear all times
  ..
  // start of code to be timed
  ProfileStart(n);   // start a timer, where n is 0 to MAX_PROFILES-1
  ..
  ..                 // code to be timed
  ProfileEnd(n);     // stop timing

The array profileTimes will contain the times. Yes it is crude. Feel free to add bells and whistles if you wish. I just looked at the contents of profileTimes using my C++ debugger. You need to include <time.h>

_________________
Prof. Kelly


Last edited by profkelly on Wed Aug 26, 2009 2:57 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon May 25, 2009 6:47 pm 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
Quote:
Maybe its different in your version but in the current version, it has been set the way you describe for some time now but it doesn't like some programs...

I'm using http://www.340mph.com/software/EASy68k% ... v0.0.9.zip which reports as v0.0.6 if you hit F1.

It fails on task 33 on matrix and task 71 on EASyZONE. It would be better if unimplememted tasks were either ignored, returned default values or returned error codes.

Lee


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 10, 2009 7:42 am 
Offline

Joined: Mon Jan 26, 2009 3:13 am
Posts: 32
Location: Monroe, MI
It is v0.0.9. I had forget to update the version number. I've been away from the project for several weeks... enjoying summer etc. I am posting a new version tonight. It ignores the trap failures.

There are MAJOR slowdowns in the drawing (EASYZONE) that I was trying to figure out before I took my hiatus. I was never able to figure it out and I got annoyed and quit working for a while...

_________________
The Age Old Question: To Be or Not To Be
Finally we have the answer: 2B | !2B = FF


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 10, 2009 8:04 am 
Offline

Joined: Mon Jan 26, 2009 3:13 am
Posts: 32
Location: Monroe, MI
Prof Kelly,
About your question a while back about a general release soon:
I would like to but as you were saying, the bug reports I will receive are almost guaranteed to be overwhelming. However, with that being said, I do NOT want to abandon this project, and I desire to work hard to get an acceptable release...

The slowdowns in EasyZone bother me to a great extent and get me down on myself. I fear that the port may just be slow overall... or perhaps this problem is just simply the wxWidgets drawing api. If it is the api, this could spell the demise of the project... I sure hope this is not so...

_________________
The Age Old Question: To Be or Not To Be
Finally we have the answer: 2B | !2B = FF


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 10, 2009 12:17 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1036
Location: Monroe County Community College, Monroe Michigan, U.S.A.
Is your source code available for download? I could take a look. Sometimes another set of eyes is helpful. If the source is not posted you can email it to me.

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 10, 2009 2:32 pm 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
MOVE.l from data register to data register sometimes changes the source register, e.g.

Code:
      ORG   $1000

start
      MOVEQ       #-$80,d7          * set value
      MOVE.l      d7,d2             * copy value

      NOP

      END   start

changes d7 and d2 to $7FFFFFFF

Lee.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 10, 2009 2:45 pm 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
On further investigation this happens for any sized move, .l, .w or .b, where b31 of the source register is set.

Lee.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 11, 2009 2:03 am 
Offline

Joined: Mon Jan 26, 2009 3:13 am
Posts: 32
Location: Monroe, MI
lee wrote:
On further investigation this happens for any sized move, .l, .w or .b, where b31 of the source register is set.

Lee.

I'll look into it

EDIT:
I fixed it (it will be corrected in next update). The culprit was the strtol function during the conversion from the string to long int in the text box control

_________________
The Age Old Question: To Be or Not To Be
Finally we have the answer: 2B | !2B = FF


Last edited by ajbonkoski on Thu Jun 11, 2009 2:51 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 11, 2009 2:05 am 
Offline

Joined: Mon Jan 26, 2009 3:13 am
Posts: 32
Location: Monroe, MI
profkelly wrote:
Is your source code available for download? I could take a look. Sometimes another set of eyes is helpful. If the source is not posted you can email it to me.

I'll package it up and post it to the site. FYI: my code needs A LOT of cleanup and some of the control names are ambiguous(i.e. TextCtrl12) Note: you might have difficulty compiling it if you try...

_________________
The Age Old Question: To Be or Not To Be
Finally we have the answer: 2B | !2B = FF


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 04, 2009 7:26 pm 
Offline

Joined: Mon Jan 26, 2009 3:13 am
Posts: 32
Location: Monroe, MI
The so-called BETA of my project is up... Labeled v0.1, it includes all editor functionality as the original, including options menus for both editor environment and the assembler. Revamped, fully operational syntax highlighter, loosely based off of original code. Also includes settings and template saving using the original file formats... note however that, because my new editor includes a few new features, the settings files are not compatible with Easy68k Original.

_________________
The Age Old Question: To Be or Not To Be
Finally we have the answer: 2B | !2B = FF


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 26, 2009 11:35 am 
Offline

Joined: Wed Aug 26, 2009 11:28 am
Posts: 2
Location: Croatia
what is the proper way to compile your code?
(i don't see cmake or configure scripts)

thanks for the port :D


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 01, 2009 4:36 pm 
Offline

Joined: Mon Jan 26, 2009 3:13 am
Posts: 32
Location: Monroe, MI
I use the Code::Blocks interface for compilation... A little cleanup has to be done for a new linux build - I will build it for linux soon and post it

_________________
The Age Old Question: To Be or Not To Be
Finally we have the answer: 2B | !2B = FF


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 01, 2009 5:48 pm 
Offline

Joined: Wed Aug 26, 2009 11:28 am
Posts: 2
Location: Croatia
It would be great if you could list dependencies.
Could you also write a Makefile?

I'll try to compile it and maybe make a gentoo ebuild file.

Have fun


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 12, 2009 2:48 am 
Offline

Joined: Sat Sep 12, 2009 2:46 am
Posts: 1
Hey,

I love the fact that you're making this more cross platform. If you could post a list of dependencies, and a makefile/how to make, I wouldn't mind creating a .deb for Ubuntu, Debian, etc distributions.

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 23, 2009 1:56 pm 
Offline

Joined: Mon Jan 26, 2009 3:13 am
Posts: 32
Location: Monroe, MI
I will soon... I'm a bit preoccupied at the momment with school starting up again but hopefully i'll get a chance soon. I will be sure to post onhere anouncing the update

_________________
The Age Old Question: To Be or Not To Be
Finally we have the answer: 2B | !2B = FF


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 58 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group