diff options
author | Simon Marlow <simonmar@microsoft.com> | 2006-04-07 02:05:11 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2006-04-07 02:05:11 +0000 |
commit | 0065d5ab628975892cea1ec7303f968c3338cbe1 (patch) | |
tree | 8e2afe0ab48ee33cf95009809d67c9649573ef92 /utils/prof/cgprof/cgprof.h | |
parent | 28a464a75e14cece5db40f2765a29348273ff2d2 (diff) | |
download | haskell-0065d5ab628975892cea1ec7303f968c3338cbe1.tar.gz |
Reorganisation of the source tree
Most of the other users of the fptools build system have migrated to
Cabal, and with the move to darcs we can now flatten the source tree
without losing history, so here goes.
The main change is that the ghc/ subdir is gone, and most of what it
contained is now at the top level. The build system now makes no
pretense at being multi-project, it is just the GHC build system.
No doubt this will break many things, and there will be a period of
instability while we fix the dependencies. A straightforward build
should work, but I haven't yet fixed binary/source distributions.
Changes to the Building Guide will follow, too.
Diffstat (limited to 'utils/prof/cgprof/cgprof.h')
-rw-r--r-- | utils/prof/cgprof/cgprof.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/utils/prof/cgprof/cgprof.h b/utils/prof/cgprof/cgprof.h new file mode 100644 index 0000000000..e93f02b53e --- /dev/null +++ b/utils/prof/cgprof/cgprof.h @@ -0,0 +1,82 @@ +/* ------------------------------------------------------------------------ + * $Id: cgprof.h,v 1.2 2003/08/01 14:50:50 panne Exp $ + * + * Copyright (C) 1995-2000 University of Oxford + * + * Permission to use, copy, modify, and distribute this software, + * and to incorporate it, in whole or in part, into other software, + * is hereby granted without fee, provided that + * (1) the above copyright notice and this permission notice appear in + * all copies of the source code, and the above copyright notice + * appear in clearly visible form on all supporting documentation + * and distribution media; + * (2) modified versions of this software be accompanied by a complete + * change history describing author, date, and modifications made; + * and + * (3) any redistribution of the software, in original or modified + * form, be without fee and subject to these same conditions. + * --------------------------------------------------------------------- */ + +#include <stdlib.h> +#include <stdio.h> +#include <limits.h> +#include "symbol.h" +#include "matrix.h" + +/* ----------------------------------------------------------------------------- + * Data structures associated with parsed data + * -------------------------------------------------------------------------- */ + +/* ----------------------------------------------------------------------------- + * Cost attributes + * -------------------------------------------------------------------------- */ + +#ifndef _CGPROF_H_ +#define _CGPROF_H_ + +typedef struct { + double proc_comp; + double proc_comm; + double proc_comp_idle; + long int proc_hrel_in; + long int proc_hrel_out; +} object_cost_proc; + +typedef struct { + double comp_max, comp_avg, comp_min; + double comm_max, comm_avg, comm_min; + double comp_idle_max, comp_idle_avg, comp_idle_min; + long int hrel_max, hrel_avg, hrel_min; + object_cost_proc *proc; + int syncs; +} object_cost; + +/* ----------------------------------------------------------------------------- + * Sequence of cost centres + * -------------------------------------------------------------------------- */ + +typedef struct { + object_cost cost; + name_id *stack; + int stack_size; + int active; +} parsed_cost_object; + +#define RAW_PROFILE_INIT_SIZE 100 +extern int raw_profile_next; +extern int raw_profile_size; +extern parsed_cost_object *raw_profile; + +/* ----------------------------------------------------------------------------- + * Misc. + * -------------------------------------------------------------------------- */ + +extern int Verbose; +extern char *Pgm; +extern void readRawProfile(FILE *,int*,int); +extern void printRawProfile(); +extern void add_costs(object_cost *,object_cost); +extern void createConnectivityMatrix(int,Matrix *,Matrix *,int *,int); +extern void printConnectivityMatrix(Matrix,Matrix,int); +extern FILE* logFile; +#endif |