summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2020-03-09 11:51:36 +0100
committerAndreas Klebinger <klebinger.andreas@gmx.at>2020-03-09 11:51:36 +0100
commit6bc16e25ca2caf8b4e3ed7887c5fb2c8a4e888f1 (patch)
tree152ab6ca04df0ad269cb7d094a037215d2c5b638
parent2a2f51d79f145e015cc089d97cf71c19dd27bee4 (diff)
downloadhaskell-wip/andreask/revert_posix_prof.tar.gz
Revert "rts: enforce POSIX numeric locale for heap profiles"wip/andreask/revert_posix_prof
This reverts commit 252e51179bd179f52e25dea762ef7b95bc56ce0a. It broke the windows build.
-rw-r--r--rts/ProfHeap.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c
index bc439c1678..4f82b0ba83 100644
--- a/rts/ProfHeap.c
+++ b/rts/ProfHeap.c
@@ -26,15 +26,8 @@
#include <fs_rts.h>
#include <string.h>
-#if defined(darwin_HOST_OS)
-#include <xlocale.h>
-#else
-#include <locale.h>
-#endif
-
FILE *hp_file;
static char *hp_filename; /* heap profile (hp2ps style) log file */
-static locale_t prof_locale = 0, saved_locale = 0;
/* -----------------------------------------------------------------------------
* era stores the current time period. It is the same as the
@@ -351,10 +344,6 @@ printSample(bool beginSample, StgDouble sampleValue)
void freeHeapProfiling (void)
{
- if (prof_locale) {
- freelocale(prof_locale);
- prof_locale = 0;
- }
}
/* --------------------------------------------------------------------------
@@ -367,15 +356,6 @@ initHeapProfiling(void)
return;
}
- if (! prof_locale) {
- prof_locale = newlocale(LC_NUMERIC_MASK, "POSIX", 0);
- if (! prof_locale) {
- sysErrorBelch("Couldn't allocate heap profiler locale");
- /* non-fatal: risk using an unknown locale, but won't crash */
- }
- }
- saved_locale = uselocale(prof_locale);
-
char *prog;
prog = stgMallocBytes(strlen(prog_name) + 1, "initHeapProfiling");
@@ -473,8 +453,6 @@ initHeapProfiling(void)
}
#endif
- uselocale(saved_locale);
-
traceHeapProfBegin(0);
}
@@ -487,8 +465,6 @@ endHeapProfiling(void)
return;
}
- saved_locale = uselocale(prof_locale);
-
#if defined(PROFILING)
if (doingRetainerProfiling()) {
endRetainerProfiling();
@@ -529,8 +505,6 @@ endHeapProfiling(void)
printSample(true, seconds);
printSample(false, seconds);
fclose(hp_file);
-
- uselocale(saved_locale);
}
@@ -785,8 +759,6 @@ dumpCensus( Census *census )
counter *ctr;
ssize_t count;
- saved_locale = uselocale(prof_locale);
-
printSample(true, census->time);
@@ -915,8 +887,6 @@ dumpCensus( Census *census )
traceHeapProfSampleEnd(era);
printSample(false, census->time);
-
- uselocale(saved_locale);
}