This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1359 from MartinNowak/profilegc
follow up for -profile=gc
- Loading branch information
Showing
15 changed files
with
212 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,129 +1,52 @@ | ||
$(VERSION 060, mmm dd, 2012, =================================================, | ||
Ddoc | ||
|
||
$(WHATSNEW | ||
$(LI core.time: Non-generic aliases for dur have been added (i.e seconds(), | ||
minutes(), etc.)) | ||
$(LI For functions which have a version which takes a core.time.Duration | ||
and another version which takes an integral value, the version which | ||
takes an integral value has now been deprecated.) | ||
$(LI clear() has been renamed to destroy(). clear() remains as an alias to | ||
destroy() but has been scheduled for deprecation. Please use destroy() | ||
instead.) | ||
$(LI Exception backtracing has been implemented for FreeBSD.) | ||
$(LI A FreeBSD-specific module (core.sys.freebsd.dlfcn) has been added for | ||
the dlfcn.h C header for that platform.) | ||
$(LI Modules for the execinfo.h C header have been added for FreeBSD, OS X, | ||
and Linux (core.sys.freebsd.execinfo, core.sys.osx.execinfo, and | ||
core.sys.linux.execinfo, respectively).) | ||
$(LI Several core.stdc modules have been annotated with safety attributes.) | ||
$(LI Most functions in core.bitop have been marked @safe pure nothrow.) | ||
$(LI thread_stackBottom() and thread_stackTop() now require the current | ||
thread to be attached to the runtime (with thread_attachThis()).) | ||
$(LI A new atomicFence() instruction has been added to core.atomic.) | ||
$(LI An experimental critical regions API has been added. See the functions | ||
thread_enterCriticalRegion(), thread_exitCriticalRegion(), and | ||
thread_inCriticalRegion() in core.thread. This API is not set in stone, so | ||
the documentation is not yet processed by Ddoc and the interface may | ||
change over time.) | ||
$(LI The capacity() and reserve() functions have been marked pure nothrow.) | ||
$(LI The thread_needLock() function has been removed. It was largely | ||
considered useless since single core systems are very rare today (and it | ||
didn't result in significant enough optimization anyway).) | ||
$(LI The thread_scanAll() function now scans the calling thread's stack | ||
and registers in addition to other threads'.) | ||
$(LI All of core.sys.posix.pthread has been marked nothrow.) | ||
$(LI A thread_setThis() function has been added to core.thread. This is a | ||
low-level function primarily useful when side-stepping DRuntime's threading | ||
infrastructure.) | ||
$(LI Some core.stdc.stdio functions have been marked pure.) | ||
$(LI Several core.memory functions have been marked pure and nothrow.) | ||
$(LI core.stdc.stdarg now supports vector types.) | ||
$(LI All core.sys.windows.windows functions are now nothrow. Some have been | ||
marked pure as well.) | ||
$(LI SYSTEM_INFO, GetSystemInfo(), and GetNativeSystemInfo() have been | ||
added to core.sys.windows.windows.) | ||
$(LI thread_attachThis() and thread_detachThis() are now more forgiving | ||
about attaching already-attached threads and detaching already-detached | ||
threads.) | ||
$(LI Thread.yield() now uses SwitchToThread() on Windows.) | ||
$(LI All core.atomic functions have been marked nothrow. Some have been | ||
marked pure.) | ||
$(LI Condition now has a mutex() property.) | ||
$(LI RWMutex's reader() and writer() functions have been marked @property.) | ||
$(LI 256-bit SIMD types have been added to core.simd.) | ||
$(LI Exceptions will no longer trap on Windows if a debugger is attached.) | ||
$(LI SetTimer() and KillTimer() have been added to core.sys.windows.windows.) | ||
$(LI Fiber.reset() now has overloads that allow resetting the function.) | ||
$(LI TypeInfo now has a new function rtInfo(). While this is now part of the | ||
public API, the information it provides is completely internal to the runtime.) | ||
) | ||
|
||
$(RUNTIMEBUGSFIXED | ||
$(LI Unlisted bug: An out of bounds error in the internal EH code has been fixed.) | ||
$(LI Unlisted bug: Some infinite recursions in core.memory functions have been fixed.) | ||
$(LI Unlisted bug: Fiber.reset()'s precondition has been fixed to allow State.HOLD.) | ||
$(LI Unlisted bug: Some memory leaks on shutdown have been fixed.) | ||
$(LI $(BUGZILLA 5206): stat_t is not the same as struct stat) | ||
$(LI $(BUGZILLA 5582): Improvements to the DLL startup code) | ||
$(LI $(BUGZILLA 5930): cas doesn't work when used in code compiled with -D) | ||
$(LI $(BUGZILLA 6631): core.time module constructor runs AFTER main program's module constructor) | ||
$(LI $(BUGZILLA 7704): RangeError when using key optainey by AA byKey() iteration) | ||
$(LI $(BUGZILLA 7923): Please remove 'deprecated' from setAssertHandler()) | ||
$(LI $(BUGZILLA 8274): thread_attachThis only works for main thread) | ||
) | ||
$(COMMENT Pending changelog for 2.068.1. | ||
) | ||
|
||
$(VERSION 059, mmm dd, 2012, =================================================, | ||
$(BUGSTITLE Library Changes, | ||
|
||
$(LI $(RELATIVE_LINK2 coverage-profile-config, Functions to configure coverage, profile, and profile=gc reports were added.)) | ||
|
||
$(RUNTIMEBUGSFIXED | ||
$(LI $(BUGZILLA 7606): core.time.TickDuration opCmp accepts only lvalues) | ||
) | ||
) | ||
|
||
$(VERSION 057, mmm dd, 2011, =================================================, | ||
$(BUGSTITLE Library Changes, | ||
|
||
$(LI $(LNAME2 coverage-profile-config, Functions to configure coverage, profile, and profile=gc reports were added.) | ||
|
||
$(RUNTIMEBUGSFIXED | ||
$(LI $(BUGZILLA 6909): incorrect definition of the OVERLAPPED struct in core.sys.windows.windows ?) | ||
$(P While they have been accessible through `extern(C)` linkage | ||
for a while, the functions to configure coverage, profile, and | ||
profile=gc reports where added to $(COREMODREF runtime, | ||
core.runtime). | ||
) | ||
) | ||
|
||
$(VERSION 055, mmm dd, 2011, =================================================, | ||
$(BOOKTABLE, | ||
$(TR $(TH Functions) $(TH Decscription)) | ||
$(TR $(TD $(CXREF runtime, dmd_coverSourcePath)) $(TD Set the directory which contains the source files.)) | ||
$(TR $(TD $(CXREF runtime, dmd_coverDestPath)) $(TD Set the directory where to write the -cov reports.)) | ||
$(TR $(TD $(CXREF runtime, dmd_coverSetMerge)) $(TD Set whether or not to merge results with existing -cov reports.)) | ||
$(TR $(TD $(CXREF runtime, trace_setlogfilename)) $(TD Set the output file for the -profile report.)) | ||
$(TR $(TD $(CXREF runtime, trace_setdeffilename)) $(TD Set the output file for the optimized -profile linker script.)) | ||
$(TR $(TD $(CXREF runtime, profilegc_setlogfilename)) $(TD Set the output file for the -profile=gc report.)) | ||
) | ||
|
||
$(RUNTIMEBUGSFIXED | ||
$(LI $(BUGZILLA 5967): Mangling of ArgClose for variadic function is swapped) | ||
$(LI $(BUGZILLA 6493): Source code for the doc of core.time points to std.datetime.) | ||
$(LI $(BUGZILLA 6466): core.demangle incorrect demangling of variables) | ||
$(P Note that these functions are specific to dmd, and might not | ||
be available on other compilers. | ||
) | ||
) | ||
|
||
$(VERSION 054, mmm dd, 2011, =================================================, | ||
) | ||
|
||
$(WHATSNEW | ||
$(LI Added core.sys.posix.netdb.) | ||
$(LI For functions which have a version which takes a core.time.Duration | ||
and another version which takes an integral value, the version which | ||
takes an integral value is now scheduled for deprecation.) | ||
) | ||
Macros: | ||
TITLE=Change Log | ||
|
||
$(RUNTIMEBUGSFIXED | ||
$(LI $(BUGZILLA 4323): std.demangle incorrectly handles template floating point numbers) | ||
$(LI $(BUGZILLA 5272): Postblit not called on copying due to array append) | ||
$(LI $(BUGZILLA 5956): Undocumented mangling of struct value) | ||
$(LI $(BUGZILLA 6135): Thread/GC interaction bug on OS X) | ||
) | ||
) | ||
BUGSTITLE = <div class="bugsfixed">$(H4 $1) $(OL $2 )</div> | ||
|
||
$(VERSION 053, mmm dd, 2011, =================================================, | ||
RELATIVE_LINK2=<a href="#$1">$+</a> | ||
LNAME2=<a class="anchor" title="Permalink to this section" id="$1" href="#$1">$+</a> | ||
|
||
$(WHATSNEW | ||
$(LI Added some GC benchmark apps.) | ||
$(LI Moved std.intrinsic to core.intrinsic.) | ||
$(LI Implemented $(I exception chaining), as described in TDPL for POSIX.) | ||
) | ||
STDMODREF = <a href="phobos/std_$1.html">$2</a> | ||
COREMODREF = <a href="phobos/core_$1.html">$2</a> | ||
XREF = <a href="phobos/std_$1.html#$2">$2</a> | ||
CXREF = <a href="phobos/core_$1.html#$2">$2</a> | ||
|
||
$(RUNTIMEBUGSFIXED | ||
$(LI $(BUGZILLA 5612): core.cpuid not implemented on 64) | ||
$(LI $(BUGZILLA 1001): print stack trace (in debug mode) when program die) | ||
$(LI $(BUGZILLA 5847): Threads started by core.thread should have same floating point state as main thread) | ||
) | ||
) | ||
BOOKTABLE = <table><caption>$1</caption>$+</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# set from top makefile | ||
OS:= | ||
MODEL:= | ||
DMD:= | ||
DRUNTIME:= | ||
DRUNTIMESO:= | ||
QUIET:= | ||
LINKDL:= | ||
|
||
SRC:=src | ||
ROOT:=./obj/$(OS)/$(MODEL) | ||
TESTS:=$(addprefix $(ROOT)/,$(addsuffix .done,profile profilegc both)) | ||
|
||
DIFF:=diff | ||
GREP:=grep | ||
|
||
ifneq (default,$(MODEL)) | ||
MODEL_FLAG:=-m$(MODEL) | ||
endif | ||
CFLAGS:=$(MODEL_FLAG) -Wall | ||
DFLAGS:=$(MODEL_FLAG) -w -I../../src -I../../import -I$(SRC) -L$(DRUNTIME) -defaultlib= -debuglib= | ||
|
||
.PHONY: all clean | ||
all: $(TESTS) | ||
|
||
$(ROOT)/profile.done: DFLAGS+=-profile | ||
$(ROOT)/profile.done: $(ROOT)/%.done: $(ROOT)/% | ||
@echo Testing $* | ||
@rm -f $(ROOT)/mytrace.log $(ROOT)/mytrace.def | ||
$(QUIET)$(ROOT)/$* $(ROOT)/mytrace.log $(ROOT)/mytrace.def | ||
$(QUIET)$(GREP) -q '1 .*_Dmain' $(ROOT)/mytrace.log | ||
$(QUIET)$(GREP) -q '1000 .*uint profile.foo(uint)' $(ROOT)/mytrace.log | ||
$(QUIET)$(DIFF) mytrace.def.exp $(ROOT)/mytrace.def | ||
@touch $@ | ||
|
||
$(ROOT)/profilegc.done: DFLAGS+=-profile=gc | ||
$(ROOT)/profilegc.done: $(ROOT)/%.done: $(ROOT)/% | ||
@echo Testing $* | ||
@rm -f $(ROOT)/myprofilegc.log | ||
$(QUIET)$(ROOT)/$* $(ROOT)/myprofilegc.log | ||
$(QUIET)$(DIFF) myprofilegc.log.exp $(ROOT)/myprofilegc.log | ||
@touch $@ | ||
|
||
$(ROOT)/both.done: DFLAGS+=-profile -profile=gc | ||
$(ROOT)/both.done: $(ROOT)/%.done: $(ROOT)/% | ||
@echo Testing $* | ||
@rm -f $(ROOT)/both.log $(ROOT)/both.def $(ROOT)/bothgc.log | ||
$(QUIET)$(ROOT)/$* $(ROOT)/both.log $(ROOT)/both.def $(ROOT)/bothgc.log | ||
$(QUIET)$(GREP) -q '1 .*_Dmain' $(ROOT)/mytrace.log | ||
$(QUIET)$(GREP) -q '1000 .*both.Num\* both.foo(uint)' $(ROOT)/both.log | ||
$(QUIET)$(DIFF) both.def.exp $(ROOT)/both.def | ||
$(QUIET)$(DIFF) bothgc.log.exp $(ROOT)/bothgc.log | ||
@touch $@ | ||
|
||
$(ROOT)/%: $(SRC)/%.d | ||
$(QUIET)$(DMD) $(DFLAGS) -of$(ROOT)/$* $< | ||
|
||
clean: | ||
rm -rf obj *.log *.def |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
FUNCTIONS | ||
_Dmain | ||
_D4both3fooFkZPS4both3Num | ||
_D4both3Num6__ctorMFNckZS4both3Num |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
bytes allocated, type, function, file:line | ||
4000 both.Num both.foo src/both.d:15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
bytes allocated, type, function, file:line | ||
4 uint D main src/profilegc.d:6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
FUNCTIONS | ||
_Dmain | ||
_D7profile3fooFkZk |
Oops, something went wrong.