The instrumentation code in the instrumented runtime was replaced
with new APIs to gather runtime statistics and output them in a new format
(Common Trace Format).
This commit also exposes new functions in the Gc module to pause or resume
instrumentation during a program execution (Gc.eventlog_pause and
Gc.eventlog_resume).
runtime/caml/compatibility.h:
Add compatibility macros for globals that have been moved to Caml_state.
Some of these globals are used by 3rd-party libraries, e.g. delimcc
.gitattributes:
Tolerate long lines in runtime/caml/compatibility.h.
It's better to keep the "one #define per line" style than to introduce
line breaks there.
(cherry picked from commit 073fcbb14ab8c66009beb6ef49c240a24766feac)
* Make s-nt.h and m-nt.h more autoconf-like
* Add SIZEOF_LONGLONG to m-nt.h
It's not used, but autoconf will generate it.
* Sections of s-nt.h and m-nt moved to config.h
* Re-order lines of s-nt.h
Allows the output to be more readily compared with autoconf's generated
s.h. Lines are purely reordered so:
diff <(git cat-file --textconv HEAD~1:config/s-nt.h | sort) \
<(git cat-file --textconv HEAD:config/s-nt.h | sort)
should return no differences.
* Add extra defines to s-nt.h for mingw32
These match up with facts determined by autoconf. The following
additional HAS_ defines are made:
- HAS_UNISTD
Behaviour of otherlibs/unix/access.c and otherlibs/win32unix/lseek.c
is affected but the effect is correct.
Behaviour of runtime/fix_code.c affected, but unistd.h includes
io.h, so there's no effective change.
In other cases, unistd.h is simply included where before it wasn't.
- HAS_DIRENT
Used in Unix-only closedir.c, opendir.c, readdir.c and rewinddir.c
Used in runtime/unix.c, but that obviously won't affect Windows!
- HAS_REWINDDIR
Used in Unix-only rewinddir.c
- HAS_TRUNCATE
Used in Unix-only ftruncate.c, mmap.c and truncate.c
- HAS_NANOSLEEP
Used in Unix-only sleep.c
- HAS_GETTIMEOFDAY
Used in vmthreads and Unix-only gettimeofday.c
Used in runtime/sys.c, but in a branch guarded by #ifndef _WIN32
- HAS_MKSTEMP
Changes yacc/main.c to use the MinGW implementation of mkstemp
(part of mingwex, which is linked by flexdll)
* Remove the old DISTRIB variable
This variable was originally added in 1973b55 and 1596174 and was always
specifically for Windows for installing the README files.
This should have been renamed to INSTALL_DISTRIB in de4f4cf (which was
part of MPR#6358/GPR#27). It should then have been removed in 13bb9d2
(GPR#1033).
May it forever rest in peace.
* Tweak the config/Makefile.m* to match autoconf
* Build debug runtime by default on Windows
* Build raw_spacetime_lib on msvc64 & mingw64
* Set ENABLE_CALL_COUNTS to true for Windows
No-op, since spacetime is not enabled by default, but easier comparison
with autoconf
* Remove X11 definitions from old Makefiles
win32graph removed in #2318
* mingw ports should use gcc for CPP
* Correct MKEXEDEBUGFLAG for mingw ports
-g is ignored by flexlink, -link -g is passed on to GCC.
* Correct SO to be dll not s.obj/s.o
Pedantic correction - $(SO) is not used by the Windows ports.
* Re-order lines of config/Makefile.m*
This commit removes support for gprof-based profiling (the -p option to ocamlopt). It follows a discussion on the core developers' list, which indicated that removing gprof support was a reasonable thing to do. The rationale is that there are better easy-to-use profilers out there now, such as perf for Linux and Instruments on macOS; and the gprof support has always been patchy across targets. We save a whole build of the runtime and simplify some other parts of the codebase by removing it.
Before this change, check-typo would run on manual/Makefile for
example, while this file lives within a pruned directory so it
ought to be ignored by the tool.
Note: the check-typo code seems to assume that the only pruned things
are directory, it prints "pruned directory ..." when something is
pruned. I haven't changed this part of the logic; but note that normal
./check-typo invocation will only check pruning for directories.
This will be very useful for an upcoming PR implementing a different
unboxing check, which change the result for some of the tests. Without
the present change, the diff in test results was unreadable, which
is problematic for development and for code review.
typo.long-line can still be explicitly set in .gitattributes (and
typo.long-line typo.very-long-line=may will still issue unused if no
lines are more than 80 columns)
Before this patch, check-typo is directed by a single git attribute,
ocaml-typo, which is used as a key to set a value:
ocaml-typo=long-line,missing-header
(the value here is `long-line,missing-header`, and the code splits the
comma later)
This model is very fragile because .gitattributes does not allow to
give attribute keys a collecting/aggregating semantic: each new
setting of the key removes the previous setting, instead of adding to
them. For example,
testsuite/tests/** ocaml-typo=missing-header
testsuite/tests/win-unicode/*.ml ocaml-typo=utf8
and
testsuite/tests/win-unicode/*.ml ocaml-typo=utf8
testsuite/tests/** ocaml-typo=missing-header
are not equivalent, and instead of using either one we would introduce
redundancy for robustness:
testsuite/tests/** ocaml-typo=missing-header
testsuite/tests/win-unicode/*.ml ocaml-typo=missing-header,utf8
With this patch, we switch to a model where each ocaml-typo setting is
its own attribute, of the form `typo.<<attribute>>`. The lines above
would be written, in either order:
testsuite/tests/** typo.missing-header
testsuite/tests/win-unicode/*.ml typo.utf8
Not only does this approach make our .gitattributes more robust, it
allows for a more fine-grained treatment of the "unused-prop"
marker. This was used as an attribute to say: don't make it in an
error if the given typo-rule is in fact respected (by default, opting
out of a typo-rule gives an error if the typo-rule is respected). But
because of the single-key nature of ocaml-typo, unused-prop would
range over all settings, not just one of them. For example
emacs/caml.el ocaml-typo=long-line,unused-prop,missing-header
seems to suggest that 'unused-prop' only qualifies the 'long-line'
rule, but in fact it also ranges over 'missing-header'. In contrast,
with this patch, we write the following:
emacs/caml.el typo.long-line=may typo.missing-header
the `=may` value setting is used to make an exception to a typo-rule
optional.
Interestingly, most .gitattributes lines worked without extra error
when I turned each unused-prop in a =may setting over the rule just
before, instead of all rules: our checking is now more precise than
before, better capturing the intent of the .gitattributes author.
As I had to rewrite parts of the check-typo code for this, I took the
opportunity to rename a couple variables speaking about SVN (now long
defunct) into more meaningful names:
- `$is_svn` => `$path_in_index`
- `$svnrules` => `$attr_rules`
* add a release checklist
Currently this list isn't publicly available, it sits in various
different versions on @damiendoligez's filesystems. He sent me a copy
when I took care of some of the recent releases. The present
presentation is a result of significant cleanups and changes to the
checklist -- in particular, some mistakes may have jumped in.
This is not a scripted process, it is very informal and it is likely
that there are some mistakes/omissions in the list. Yet, it sounds
better to have it somewhere in the source repository than not have it
around at all. It was certainly helpful to me, and it probably would
be to other release-help volunteers.
(The list is put in tools/ because there isn't a clearly better place
for it. This choice was suggested by Damien.)
This subdirectory was used to store experimental patches on some older
version-control system where branching (or discussing branches?) was
inconvenient. It doesn't make much sense anymore now, and getting rid
of it simplifies a couple places that had to grow around it.
Suggested-by: Nicolás Ojeda Bär
(no change entry needed)