Track opcode memory space.
This commit is contained in:
parent
5792220dcb
commit
626f418ab0
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: codes.cc,v 1.10 2002/07/05 02:50:58 steve Exp $"
|
||||
#ident "$Id: codes.cc,v 1.11 2002/07/05 03:46:43 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "codes.h"
|
||||
|
|
@ -56,6 +56,8 @@ void codespace_init(void)
|
|||
cp->opcode = &of_ZOMBIE;
|
||||
|
||||
code_count = 1;
|
||||
size_opcodes += sizeof(struct code_index1);
|
||||
size_opcodes += sizeof(struct code_index0);
|
||||
}
|
||||
|
||||
vvp_cpoint_t codespace_allocate(void)
|
||||
|
|
@ -72,12 +74,14 @@ vvp_cpoint_t codespace_allocate(void)
|
|||
if (code_table[idx] == 0) {
|
||||
code_table[idx] = new struct code_index1;
|
||||
memset(code_table[idx], 0, sizeof(struct code_index1));
|
||||
size_opcodes += sizeof(struct code_index1);
|
||||
}
|
||||
|
||||
if (code_table[idx]->table[index1] == 0) {
|
||||
code_table[idx]->table[index1] = new struct code_index0;
|
||||
memset(code_table[idx]->table[index1],
|
||||
0, sizeof(struct code_index0));
|
||||
size_opcodes += sizeof(struct code_index0);
|
||||
}
|
||||
|
||||
vvp_cpoint_t res = code_count;
|
||||
|
|
@ -112,6 +116,9 @@ vvp_code_t codespace_index(vvp_cpoint_t point)
|
|||
|
||||
/*
|
||||
* $Log: codes.cc,v $
|
||||
* Revision 1.11 2002/07/05 03:46:43 steve
|
||||
* Track opcode memory space.
|
||||
*
|
||||
* Revision 1.10 2002/07/05 02:50:58 steve
|
||||
* Remove the vpi object symbol table after compile.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: main.cc,v 1.25 2002/07/05 02:50:58 steve Exp $"
|
||||
#ident "$Id: main.cc,v 1.26 2002/07/05 03:47:06 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -239,7 +239,8 @@ int main(int argc, char*argv[])
|
|||
|
||||
if (verbose_flag) {
|
||||
fprintf(stderr, " ... %8lu functors\n", count_functors);
|
||||
fprintf(stderr, " ... %8lu opcodes\n", count_opcodes);
|
||||
fprintf(stderr, " ... %8lu opcodes (%lu bytes)\n",
|
||||
count_opcodes, size_opcodes);
|
||||
fprintf(stderr, " ... %8lu nets\n", count_vpi_nets);
|
||||
}
|
||||
|
||||
|
|
@ -272,6 +273,9 @@ int main(int argc, char*argv[])
|
|||
|
||||
/*
|
||||
* $Log: main.cc,v $
|
||||
* Revision 1.26 2002/07/05 03:47:06 steve
|
||||
* Track opcode memory space.
|
||||
*
|
||||
* Revision 1.25 2002/07/05 02:50:58 steve
|
||||
* Remove the vpi object symbol table after compile.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,9 +17,11 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: statistics.cc,v 1.1 2002/07/05 02:50:58 steve Exp $"
|
||||
#ident "$Id: statistics.cc,v 1.2 2002/07/05 03:46:43 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "statistics.h"
|
||||
|
||||
/*
|
||||
* This is a count of the instruction opcodes that were created.
|
||||
*/
|
||||
|
|
@ -29,8 +31,15 @@ unsigned long count_functors = 0;
|
|||
|
||||
unsigned long count_vpi_nets = 0;
|
||||
|
||||
|
||||
size_t size_opcodes = 0;
|
||||
|
||||
|
||||
/*
|
||||
* $Log: statistics.cc,v $
|
||||
* Revision 1.2 2002/07/05 03:46:43 steve
|
||||
* Track opcode memory space.
|
||||
*
|
||||
* Revision 1.1 2002/07/05 02:50:58 steve
|
||||
* Remove the vpi object symbol table after compile.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -19,15 +19,22 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: statistics.h,v 1.1 2002/07/05 02:50:58 steve Exp $"
|
||||
#ident "$Id: statistics.h,v 1.2 2002/07/05 03:46:43 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include <stddef.h>
|
||||
|
||||
extern unsigned long count_opcodes;
|
||||
extern unsigned long count_functors;
|
||||
extern unsigned long count_vpi_nets;
|
||||
|
||||
extern size_t size_opcodes;
|
||||
|
||||
/*
|
||||
* $Log: statistics.h,v $
|
||||
* Revision 1.2 2002/07/05 03:46:43 steve
|
||||
* Track opcode memory space.
|
||||
*
|
||||
* Revision 1.1 2002/07/05 02:50:58 steve
|
||||
* Remove the vpi object symbol table after compile.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue