summaryrefslogtreecommitdiff
path: root/TAO/performance-tests/Demux/CodeGen/perf.cpp
blob: a3cffc21d2f3f3a9eba2457ffaa40f41a7144221 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// $Id$

#include "tao.h"

ACE_RCSID(CodeGen, perf, "$Id$")

void GenGPERFCode()
{
  char command[500];

  // first generate code for object hash
  sprintf(command, 
    "gperf -c -C -D -E -T -f 0 -a -o -t -p -L C++ -Z Method_Hash %s >\
gperf_method.i", "gperf_methods.dat");
  system(command);
  
  // omit the -C switch for gperf because we will not know the address of the
  // objects until they are instantiated. But we do know the keys in advance.
  sprintf(command, 
    "gperf -c -D -E -T -f 0 -a -o -t -p -L C++ -Z Object_Hash %s >\
gperf_object.i", "gperf_objects.dat");
  system(command);

}