Commit 7fa716e2 authored by partain's avatar partain
Browse files

[project @ 1996-01-10 12:38:57 by partain]

Alleged 0.26-pl1 changes
parent a29ea442
......@@ -487,11 +487,14 @@ The above will create files named \tr{<something>.prof} and/or
\tr{<something>.time} {\em in your home directory}. You can
process the \tr{.time} files into PostScript using \tr{hp2ps},
\index{hp2ps}
as described elsewhere in this guide. The only thing is:
because of the weird file names, you probably need to use
\tr{hp2ps} as a filter; so:
as described elsewhere in this guide.
Because of the weird file names, you probably need to use
\tr{hp2ps} as a filter. Also, you probably want to give \tr{hp2ps}
a \tr{-t0} flag, so that no ``inconsequential'' data is ignored---in
parallel-land it's all consequential. So:
\begin{verbatim}
% hp2ps < fooo.001.time > temp.ps
% hp2ps -t0 < fooo.001.time > temp.ps
\end{verbatim}
%$$ The first line of the
......@@ -537,6 +540,21 @@ because of the weird file names, you probably need to use
%$$ option if you are only interested in using the \tr{hbcpp} profiling
%$$ tools.
%************************************************************************
%* *
\subsubsection{Other useful info about running parallel programs}
%* *
%************************************************************************
The ``garbage-collection statistics'' RTS options can be useful
for seeing what parallel programs are doing. If you do either
\tr{+RTS -Sstderr}\index{-Sstderr RTS option} or \tr{+RTS -sstderr},
then you'll get mutator, garbage-collection, etc., times on standard
error which, for PVM programs, appears in \tr{/tmp/pvml.nnn}.
Whether doing \tr{+RTS -Sstderr} or not, a handy way to watch
what's happening overall is: \tr{tail -f /tmp/pvml.nnn}.
%************************************************************************
%* *
\subsubsection[parallel-rts-opts]{RTS options for Concurrent/Parallel Haskell}
......
......@@ -81,7 +81,7 @@ sub mangle_asm {
# duplicated from the bottom
$chk[$i] .= $_;
} elsif ( /^\L\$C(\d+)$/ ) {
} elsif ( /^L\$C(\d+)$/ ) {
$chk[++$i] .= $_;
$chkcat[$i] = 'literal';
$chksymb[$i] = $1;
......@@ -353,7 +353,7 @@ sub mangle_asm {
# teach it to drop through to the fast entry point:
$c = $chk[$slowchk{$symb}];
if ( defined($fastchk{$symb}) ) {
$c =~ s/^\s+ldil.*\n\s+ldo.*\n\s+bv.*\n(.*\n)?\s+\.EXIT/\1\t.EXIT/;
$c =~ s/^\s+ldil.*\n\s+ldo.*\n\s+bv.*\n(.*\n)?\s+\.EXIT/$1\t.EXIT/;
}
print OUTASM "\t.SPACE \$TEXT\$\n\t.SUBSPA \$CODE\$\n\t\.align 4\n";
......
......@@ -405,11 +405,12 @@ gets whatever it's after.
REAL_NAME(f) "_wrapper:\n" \
"\tmovl %%esp,80(%%ebx)\n" \
"\tmovl 100(%%ebx),%%esp\n" \
"\tmovl %%eax,%0" : "=r" (args)); \
__asm__ volatile ( \
"movl %%esp,%0\n" \
"\tmovl %%eax,%0\n" \
"\tincl _SP_stack_ptr\n" \
"\tmovl _SP_stack_ptr,%%eax\n" \
"\tmovl %%esp,_SP_stack(,%%eax,4)\n" \
"\tsubl $64,%%esp" \
: "=r" (SP_stack[++SP_stack_ptr])); \
: "=r" (args)); \
SaveAllStgContext();
#define WRAPPER_RETURN(x) \
......
......@@ -141,13 +141,17 @@ filenames (with disastrous results). No more than 128 chars, please!
#define STATS_FILENAME_MAXLEN 128
#define TICKY_FILENAME_FMT "%0.121s.ticky"
#define STAT_FILENAME_FMT "%0.122s.stat"
#define GR_FILENAME_FMT "%0.124s.gr"
#define GR_FILENAME_FMT_GUM "%0.120s.%03d.gr"
#define HP_FILENAME_FMT "%0.124s.hp"
#define LIFE_FILENAME_FMT "%0.122s.life"
#define PROF_FILENAME_FMT "%0.122s.prof"
#define PROF_FILENAME_FMT_GUM "%0.118s.%03d.prof"
#define QP_FILENAME_FMT "%0.124s.qp"
#define STAT_FILENAME_FMT "%0.122s.stat"
#define TICKY_FILENAME_FMT "%0.121s.ticky"
#define TIME_FILENAME_FMT "%0.122s.time"
#define TIME_FILENAME_FMT_GUM "%0.118s.%03d.time"
#define HP_FILENAME_FMT "%0.124s.hp"
\end{code}
%************************************************************************
......
......@@ -1077,7 +1077,7 @@ CompilePreludishly(ghc/FiniteMap,lhs, -ighc -fhaskell-1.3)
CompilePreludishly(ghc/ListSetOps,lhs, )
CompilePreludishly(ghc/Maybes,lhs, -fhaskell-1.3)
CompilePreludishly(ghc/PackedString,lhs,)
CompilePreludishly(ghc/Regex,lhs, -fhaskell-1.3 '-#include"ghcRegex.h"')
CompilePreludishly(ghc/Regex,lhs, -fhaskell-1.3 '-#include"ghcRegex.h"' -monly-4-regs)
CompilePreludishly(ghc/MatchPS,lhs, -ighc -fhaskell-1.3)
CompilePreludishly(ghc/Pretty,lhs, -ighc -fhaskell-1.3)
#if GhcWithReadline == YES
......
......@@ -159,6 +159,7 @@ parseCommand = getTokens []
where
getTokens :: [String] -> String -> IO [String]
getTokens ts "" = return (reverse ts)
getTokens ts (c:cs) | isSpace c = getTokens ts cs
getTokens ts s =
getToken s >>= \ (t, s') ->
getTokens (t:ts) s'
......@@ -166,7 +167,6 @@ parseCommand = getTokens []
getToken :: String -> IO (String, String)
getToken (c:cs)
| c == '<' || c == '>' = return ([c], cs)
| isSpace c = getToken cs
| c == '"' || c == '\'' = accumQuote c "" cs
| otherwise = accumToken [c] cs
......
......@@ -16,7 +16,7 @@
#endif
/* A patchlevel change is something *very minor* */
#ifndef ProjectPatchLevel
#define ProjectPatchLevel patchlevel 0
#define ProjectPatchLevel patchlevel 1
#endif
/* GhcBuildeeVersion is something CPP-testable (ProjectVersion * 100) */
#ifndef GhcBuildeeVersion
......
......@@ -155,6 +155,7 @@ CLIB_LC = \
hooks/OutOfVM.lc \
hooks/PatErrorHdr.lc \
hooks/TraceHooks.lc \
hooks/SizeHooks.lc \
io/closeFile.lc \
io/createDirectory.lc \
io/env.lc \
......@@ -267,6 +268,7 @@ CompileClibishly(hooks/OutOfStk,)
CompileClibishly(hooks/OutOfVM,)
CompileClibishly(hooks/PatErrorHdr,)
CompileClibishly(hooks/TraceHooks,)
CompileClibishly(hooks/SizeHooks,)
CompileClibishly(io/closeFile,)
CompileClibishly(io/createDirectory,)
CompileClibishly(io/env,)
......
......@@ -292,8 +292,12 @@ P_ closure;
if (IS_THUNK(info) && IS_UPDATABLE(info)) {
#ifdef DEBUG
P_ rbh = convertToRBH(closure);
P_ rbh =
#else
(void)
#endif
convertToRBH(closure);
ASSERT(rbh != NULL);
}
}
......
\begin{code}
#include "rtsdefs.h"
#include "storage/SMinternal.h" /* DEFAULT_* here */
I_ SM_word_heap_size = DEFAULT_HEAP_SIZE;
StgFloat SM_pc_free_heap = DEFAULT_PC_FREE;
I_ SM_word_stk_size = DEFAULT_STACKS_SIZE;
\end{code}
......@@ -433,7 +433,7 @@ TIME v;
\begin{code}
#ifdef GRAN
char gr_filename[32]; /*ToDo: magic short filename constant????? WDP 95/07 */
char gr_filename[STATS_FILENAME_MAXLEN];
I_ do_gr_sim = 0;
int
......@@ -446,7 +446,7 @@ int prog_argc, rts_argc;
if (do_gr_sim) {
char *extension = do_gr_binary ? "gb" : "gr";
sprintf(gr_filename, "%0.28s.%0.2s", prog_argv[0], extension);
sprintf(gr_filename, GR_FILENAME_FMT, prog_argv[0], extension);
if ((gr_file = fopen(gr_filename, "w")) == NULL) {
fprintf(stderr, "Can't open granularity simulation report file %s\n", gr_filename);
......@@ -536,7 +536,7 @@ end_gr_simulation(STG_NO_ARGS)
#endif /* GRAN */
#ifdef PAR
char gr_filename[50]; /*ToDo: (small) magic constant alert!!!! WDP 95/07 */
char gr_filename[STATS_FILENAME_MAXLEN];
I_ do_gr_profile = 0;
I_ do_sp_profile = 0;
......@@ -551,7 +551,7 @@ int prog_argc, rts_argc;
char *extension = do_gr_binary ? "gb" : "gr";
sprintf(gr_filename, "%0.28s.%03d.%0.2s", prog_argv[0], thisPE, extension);
sprintf(gr_filename, GR_FILENAME_FMT_GUM, prog_argv[0], thisPE, extension);
if ((gr_file = fopen(gr_filename, "w")) == NULL) {
fprintf(stderr, "Can't open activity report file %s\n", gr_filename);
......
......@@ -2195,7 +2195,7 @@ PROC p;
#if defined(GRAN)
I_ do_gr_sim = 0;
FILE *gr_file = NULL;
char gr_filename[32];
char gr_filename[STATS_FILENAME_MAXLEN];
init_gr_simulation(rts_argc,rts_argv,prog_argc,prog_argv)
char *prog_argv[], *rts_argv[];
......@@ -2206,7 +2206,7 @@ int prog_argc, rts_argc;
if(do_gr_sim)
{
char *extension = do_gr_binary? "gb": "gr";
sprintf(gr_filename, "%0.28s.%0.2s", prog_argv[0],extension);
sprintf(gr_filename, GR_FILENAME_FMT, prog_argv[0],extension);
if ((gr_file = fopen(gr_filename,"w")) == NULL )
{
......@@ -2326,9 +2326,9 @@ static void
init_qp_profiling(STG_NO_ARGS)
{
I_ i;
char qp_filename[32];
char qp_filename[STATS_FILENAME_MAXLEN];
sprintf(qp_filename, "%0.24s.qp", prog_argv[0]);
sprintf(qp_filename, QP_FILENAME_FMT, prog_argv[0]);
if ((qp_file = fopen(qp_filename,"w")) == NULL ) {
fprintf(stderr, "Can't open quasi-parallel profile report file %s\n",
qp_filename);
......@@ -3646,9 +3646,9 @@ static void
init_qp_profiling(STG_NO_ARGS)
{
I_ i;
char qp_filename[32];
char qp_filename[STATS_FILENAME_MAXLEN];
sprintf(qp_filename, "%0.24s.qp", prog_argv[0]);
sprintf(qp_filename, QP_FILENAME_FMT, prog_argv[0]);
if ((qp_file = fopen(qp_filename,"w")) == NULL ) {
fprintf(stderr, "Can't open quasi-parallel profile report file %s\n",
qp_filename);
......
......@@ -676,8 +676,8 @@ char *argv[], *rts_argv[];
tickyfile = fopen(stats_filename,"w");
}
if (tickyfile == NULL) {
fprintf(stderr, "Can't open tickyfile %s (default %0.24s.ticky)\n",
rts_argv[arg]+2, argv[0]);
fprintf(stderr, "Can't open tickyfile %s\n",
rts_argv[arg]+2);
error = 1;
} else {
/* Write argv and rtsv into start of ticky file */
......@@ -709,7 +709,7 @@ char *argv[], *rts_argv[];
main_statsfile = fopen(stats_filename,"w");
}
if (main_statsfile == NULL) {
fprintf(stderr, "Can't open statsfile %s (default %0.24s.stat)\n", rts_argv[arg]+2, argv[0]);
fprintf(stderr, "Can't open statsfile %s\n", rts_argv[arg]+2);
error = 1;
} else {
/* Write argv and rtsv into start of stats file */
......
......@@ -157,7 +157,7 @@ life_profile_finish(alloc, prog_argv)
StgChar *prog_argv[];
{
I_ report, i;
StgChar life_filename[32];
StgChar life_filename[STATS_FILENAME_MAXLEN];
FILE *life_file;
W_ total_life, total_upd, total_interval,
accum_life, accum_upd;
......@@ -177,7 +177,7 @@ life_profile_finish(alloc, prog_argv)
life_older += prev_older;
/* Produce liftime reports */
sprintf(life_filename, "%0.24s.life", prog_argv[0]);
sprintf(life_filename, LIFE_FILENAME_FMT, prog_argv[0]);
if ( (life_file = fopen(life_filename,"w")) == NULL ) {
fprintf(stderr, "Can't open life profile report file %s\n", life_filename);
}
......
......@@ -19,18 +19,19 @@ A filehandle to which any storage-manager statistics should be written.
/* global vars to hold some storage-mgr details; */
/* decls for these are in SMinternal.h */
I_ SM_force_gc = 0;
I_ SM_word_heap_size = DEFAULT_HEAP_SIZE;
I_ SM_alloc_min = 0;
StgFloat SM_pc_free_heap = DEFAULT_PC_FREE;
I_ SM_alloc_size = 0;
I_ SM_alloc_min = 0;
I_ SM_major_gen_size = 0;
I_ SM_word_stk_size = DEFAULT_STACKS_SIZE;
FILE *SM_statsfile = NULL;
I_ SM_trace = 0;
I_ SM_stats_summary = 0;
I_ SM_stats_verbose = 0;
I_ SM_ring_bell = 0;
/*To SizeHooks: I_ SM_word_heap_size = DEFAULT_HEAP_SIZE; */
/*To SizeHooks: StgFloat SM_pc_free_heap = DEFAULT_PC_FREE; */
extern I_ SM_word_stk_size; /*To SizeHooks: = DEFAULT_STACKS_SIZE; */
I_ MaxResidency = 0; /* in words; for stats only */
I_ ResidencySamples = 0; /* for stats only */
......
......@@ -73,6 +73,10 @@ extern char *xmalloc PROTO((size_t));
/************************ Default HEAP and STACK sizes **********************/
/* A user can change these main defaults with a
"hooks" file equiv to runtime/hooks/SizeHooks.lc.
*/
#define DEFAULT_STACKS_SIZE 0x10002 /* 2^16 = 16Kwords = 64Kbytes */
#define DEFAULT_HEAP_SIZE 0x100002 /* 2^20 = 1Mwords = 4Mbytes */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment