This repository was archived by the owner on Oct 12, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 413
follow up for -profile=gc #1359
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e6510d0
allow to configure file names for memory profile reports
MartinNowak 91a669b
allow to configure file names for profile reports
MartinNowak 7c05b9f
ensure null terminated filename
MartinNowak 5160b33
add tests for profile and trace output
MartinNowak c395612
remove old changelog
MartinNowak 89d836e
add changelog
MartinNowak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be changed to camel casing before going into a release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not repeat the discussion #1225 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The functions are already used, so we cannot simply rename them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think that the wrappers should at least use the proper druntime naming convention, but I accept that @WalterBright does not give a damn about having a consistent library experience, so feel free to merge. I strongly believe, also based on my personal experience, that inconsistent names are like – wait for it – barnacles on the bottom of a ship (this will make sense to those DConf attendees who stayed at the Hampton Inn). Too many of them, and a library slowly becomes unusable without constantly staring at the documentation.