mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 11:21:08 -10:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
659458b3ad |
No files matched your search
@@ -1,45 +0,0 @@
|
||||
## Steps to Reproduce
|
||||
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
<!--
|
||||
You may drag & drop the attachment (repro code/solution, screenshot, etc.) onto the issue.
|
||||
-->
|
||||
|
||||
## Current Behavior
|
||||
|
||||
<!--
|
||||
What is the current behaviour?
|
||||
-->
|
||||
|
||||
## Expected Behavior
|
||||
|
||||
<!--
|
||||
Please describe the behaviour you are expecting
|
||||
-->
|
||||
|
||||
### On which platforms did you notice this
|
||||
|
||||
[ ] macOS
|
||||
[ ] Linux
|
||||
[ ] Windows
|
||||
|
||||
**Version Used**:
|
||||
|
||||
<!--
|
||||
You can use `mono --version` or About dialog to obtain this information.
|
||||
-->
|
||||
|
||||
### Stacktrace
|
||||
|
||||
```
|
||||
Please paste the stacktrace here if available.
|
||||
```
|
||||
|
||||
<!--
|
||||
|
||||
You can join us at https://gitter.im/mono/mono to discuss your reported issue
|
||||
|
||||
-->
|
||||
@@ -1,9 +0,0 @@
|
||||
|
||||
|
||||
<!--
|
||||
Thank you for your Pull Request!
|
||||
|
||||
If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.
|
||||
|
||||
Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
|
||||
-->
|
||||
@@ -44,7 +44,6 @@ Ankh.NoLoad
|
||||
# Tooling
|
||||
_ReSharper*/
|
||||
*.resharper
|
||||
.idea/*
|
||||
[Tt]est[Rr]esult*
|
||||
*.orig
|
||||
*.rej
|
||||
|
||||
+5
-12
@@ -35,7 +35,7 @@
|
||||
/llvm @vargaz
|
||||
|
||||
/man @marek-safar @miguel
|
||||
/man/*prof* @alexrp
|
||||
/man/mprof-report.1 @alexrp
|
||||
|
||||
/mcs @marek-safar
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
/mcs/errors @marek-safar
|
||||
/mcs/ilasm @marek-safar
|
||||
/mcs/jay @marek-safar
|
||||
/mcs/mcs @marek-safar @lewurm
|
||||
/mcs/mcs @marek-safar
|
||||
/mcs/tests @marek-safar
|
||||
/mcs/tools @marek-safar @akoeplinger
|
||||
|
||||
@@ -76,34 +76,27 @@
|
||||
/mono/metadata/threads* @luhenry @kumpera
|
||||
/mono/metadata/threadpool* @luhenry
|
||||
/mono/metadata/w32* @luhenry
|
||||
/mono/metadata/*-win* @lateralusX @luhenry
|
||||
|
||||
/mono/mini @vargaz @kumpera
|
||||
/mono/mini/*cfgdump* @lewurm
|
||||
/mono/mini/*exceptions* @lewurm
|
||||
/mono/mini/*ppc* @lewurm
|
||||
/mono/mini/*type-check* @lewurm
|
||||
/mono/mini/interp/* @lewurm @BrzVlad
|
||||
/mono/mini/interp/* @lewurm
|
||||
/mono/mini/*profiler* @alexrp
|
||||
/mono/mini/debugger-agent.c @DavidKarlas
|
||||
|
||||
/mono/profiler @alexrp @kumpera
|
||||
|
||||
/mono/sdks @luhenry
|
||||
/mono/sdks/android @luhenry @jonpryor
|
||||
/mono/sdks/ios @vargaz @rolfbjarne
|
||||
/mono/sdks/wasm @kumpera @lrz
|
||||
|
||||
/mono/sgen @BrzVlad @kumpera
|
||||
/mono/sgen @brzvlad @kumpera
|
||||
|
||||
/mono/utils @kumpera @vargaz
|
||||
/mono/utils/atomic* @alexrp
|
||||
/mono/utils/mono-hwcap* @alexrp
|
||||
/mono/utils/mono-mem* @alexrp
|
||||
/mono/utils/mono-threads* @luhenry @kumpera
|
||||
/mono/utils/*-win* @lateralusX @kumpera
|
||||
|
||||
/msvc @lateralusX
|
||||
/msvc @ntherning
|
||||
/msvc/*profiler* @alexrp
|
||||
/msvc/scripts @akoeplinger
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ file in this directory.
|
||||
CLA
|
||||
=======
|
||||
|
||||
Contributions are now taken under the [.NET Foundation CLA](https://cla.dotnetfoundation.org/).
|
||||
Contributions are now taken under the [.NET Foundation CLA](https://cla2.dotnetfoundation.org/).
|
||||
|
||||
Code Review
|
||||
=======
|
||||
@@ -46,7 +46,7 @@ embeddable runtime:
|
||||
|
||||
* mono/utils/bsearch.c: BSD license.
|
||||
|
||||
* mono/metadata/w32file-unix-glob.c, w32file-unix-glob.h: BSD license
|
||||
* mono/io-layer/wapi_glob.h, wapi_glob.c: BSD license
|
||||
|
||||
Class Library code
|
||||
==================
|
||||
|
||||
+4
-8
@@ -44,7 +44,6 @@ dist-hook:
|
||||
rm -rf `find $(top_distdir)/external -path '*\.git'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*'`
|
||||
rm -rf "$(top_distdir)/external/linker/linker/Tests"
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
noinst_DATA = mono-uninstalled.pc
|
||||
@@ -115,7 +114,7 @@ update-csproj:
|
||||
-rm msvc/scripts/order.xml
|
||||
-rm -rf msvc/scripts/inputs
|
||||
-mkdir msvc/scripts/inputs
|
||||
(cd runtime; $(MAKE) V=1 extra_targets=csproj-local)
|
||||
(cd runtime; make V=1 extra_targets=csproj-local)
|
||||
|
||||
package-inputs:
|
||||
echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
|
||||
@@ -144,9 +143,6 @@ update-llvm-version:
|
||||
|
||||
|
||||
update-solution-files:
|
||||
$(MAKE) update-csproj
|
||||
$(MAKE) package-inputs
|
||||
(cd msvc/scripts; $(MAKE) genproj.exe; mono genproj.exe $(GENPROJ_ARGS))
|
||||
|
||||
update-solution-files-with-tests:
|
||||
$(MAKE) "GENPROJ_ARGS=2012 true true" update-solution-files
|
||||
make update-csproj
|
||||
make package-inputs
|
||||
(cd msvc/scripts; make genproj.exe; mono genproj.exe)
|
||||
@@ -19,30 +19,30 @@ The Mono project is part of the [.NET Foundation](http://www.dotnetfoundation.or
|
||||
|
||||
| OS | Architecture | Status |
|
||||
|--------------|--------------------|------------------------------|
|
||||
| Debian 9 | amd64 | [![debian-9-amd64][1]][2] |
|
||||
| Debian 9 | i386 | [![debian-9-i386][3]][4] |
|
||||
| Debian 9 | armel | [![debian-9-armel][5]][6] |
|
||||
| Debian 9 | armhf | [![debian-9-armhf][7]][8] |
|
||||
| Debian 9 | arm64 | [![debian-9-arm64][9]][10] |
|
||||
| Ubuntu 14.04 | amd64 | [![ubuntu-1404-amd64][1]][2] |
|
||||
| Ubuntu 14.04 | i386 | [![ubuntu-1404-i386][3]][4] |
|
||||
| Debian 8 | armel | [![debian-8-armel][5]][6] |
|
||||
| Debian 8 | armhf | [![debian-8-armhf][7]][8] |
|
||||
| Debian 8 | arm64 | [![debian-8-arm64][9]][10] |
|
||||
| OS X | amd64 | [![osx-amd64][11]][12] |
|
||||
| OS X | i386 | [![osx-i386][13]][14] |
|
||||
| Windows | amd64 | [![windows-amd64][15]][16] |
|
||||
| Windows | i386 | [![windows-i386][17]][18] |
|
||||
| Windows | i386 | [![windows-amd64][17]][18] |
|
||||
| CentOS | s390x (cs) | [![centos-s390x][19]][20] |
|
||||
| Debian 8 | ppc64el (cs) | [![debian-8-ppc64el][21]][22]|
|
||||
|
||||
_(cs) = community supported architecture_
|
||||
|
||||
[1]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-9-amd64/badge/icon
|
||||
[2]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-9-amd64
|
||||
[3]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-9-i386/badge/icon
|
||||
[4]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-9-i386/
|
||||
[5]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-9-armel/badge/icon
|
||||
[6]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-9-armel/
|
||||
[7]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-9-armhf/badge/icon
|
||||
[8]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-9-armhf/
|
||||
[9]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-9-arm64/badge/icon
|
||||
[10]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-9-arm64/
|
||||
[1]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=ubuntu-1404-amd64/badge/icon
|
||||
[2]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=ubuntu-1404-amd64
|
||||
[3]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=ubuntu-1404-i386/badge/icon
|
||||
[4]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=ubuntu-1404-i386/
|
||||
[5]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-armel/badge/icon
|
||||
[6]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-armel/
|
||||
[7]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-armhf/badge/icon
|
||||
[8]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-armhf/
|
||||
[9]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-arm64/badge/icon
|
||||
[10]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-arm64/
|
||||
[11]: https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-amd64/badge/icon
|
||||
[12]: https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-amd64/
|
||||
[13]: https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-i386/badge/icon
|
||||
@@ -174,7 +174,8 @@ section.
|
||||
Reporting bugs
|
||||
==============
|
||||
|
||||
To submit bug reports, please [open an issue on the mono GitHub repo](https://github.com/mono/mono/issues/new).
|
||||
To submit bug reports, please use [Xamarin's
|
||||
Bugzilla](https://bugzilla.xamarin.com/)
|
||||
|
||||
Please use the search facility to ensure the same bug hasn't already
|
||||
been submitted and follow our
|
||||
@@ -307,6 +308,16 @@ should be used.
|
||||
|
||||
* Or you can specify a path to a libgdiplus.
|
||||
|
||||
* `--disable-shared-memory`
|
||||
|
||||
* Use this option to disable the use of shared memory in
|
||||
Mono (this is equivalent to setting the MONO_DISABLE_SHM
|
||||
environment variable, although this removes the feature
|
||||
completely).
|
||||
|
||||
* Disabling the shared memory support will disable certain
|
||||
features like cross-process named mutexes.
|
||||
|
||||
* `--enable-minimal=LIST`
|
||||
|
||||
* Use this feature to specify optional runtime
|
||||
@@ -541,7 +552,7 @@ file for information about Microsoft's patent grant.
|
||||
Mono Trademark Use Policy
|
||||
=========================
|
||||
|
||||
The use of trademarks and logos for Mono can be found [here](http://www.dotnetfoundation.org/legal/mono-tm).
|
||||
The use of trademarks and logos for Mono can be found [here] (http://www.dotnetfoundation.org/legal/mono-tm).
|
||||
|
||||
Maintaining the Class Library Solution Files
|
||||
============================================
|
||||
|
||||
@@ -14,7 +14,6 @@ RUNTIME = MONO_PATH=$(CLASS) $(abs_top_builddir)/runtime/mono-wrapper --debug
|
||||
TOOLS_RUNTIME = MONO_PATH=$(TOOLS_CLASS) $(abs_top_builddir)/runtime/mono-wrapper --debug
|
||||
MCS = $(TOOLS_RUNTIME) $(CSC) -nologo -noconfig -lib:$(CLASS) -r:System.dll -r:System.Core.dll -r:System.Xml.dll -r:Microsoft.CSharp.dll
|
||||
ILASM = $(TOOLS_RUNTIME) $(TOOLS_CLASS)/ilasm.exe
|
||||
XUNIT = $(RUNTIME) $(abs_top_builddir)/external/xunit-binaries/xunit.console.exe
|
||||
|
||||
include versions.mk
|
||||
include profiler-stress.mk
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
[
|
||||
{
|
||||
"name": "roslyn",
|
||||
"url": "git://github.com/mono/roslyn.git",
|
||||
"rev": "1d9895045041925490038c5df0d8f947d8dcbd7f",
|
||||
"remote-branch": "origin/mono-testing",
|
||||
"branch": "mono-testing",
|
||||
"url": "git://github.com/dotnet/roslyn.git",
|
||||
"rev": "322bd5b2bbf07df6a67de35cbcb2365484412f70",
|
||||
"remote-branch": "origin/master",
|
||||
"branch": "master",
|
||||
"directory": "roslyn"
|
||||
},
|
||||
{
|
||||
"name": "coreclr",
|
||||
"url": "git://github.com/mono/coreclr.git",
|
||||
"rev": "83d8279997d8ce4ad344ff9b937b2d13d074dcaa",
|
||||
"rev": "d0e6a36f782f5ee1ca0b7d3ec0c55725c3571b1f",
|
||||
"remote-branch": "origin/mono",
|
||||
"branch": "mono",
|
||||
"directory": "coreclr"
|
||||
@@ -18,7 +18,7 @@
|
||||
{
|
||||
"name": "ms-test-suite",
|
||||
"url": "[email protected]:xamarin/ms-test-suite.git",
|
||||
"rev": "67f29dfc0741b5311dd746c75760963a2915e648",
|
||||
"rev": "73c155f76b55839f26ba707d6d40091060e4f5d8",
|
||||
"remote-branch": "origin/master",
|
||||
"branch": "master",
|
||||
"directory": "ms-test-suite"
|
||||
|
||||
@@ -32,7 +32,7 @@ coreclr-runtest-coremanglib: coreclr-validate test-runner.exe $(CORECLR_COREMANG
|
||||
check-coreclr: coreclr-compile-tests coreclr-runtest-basic coreclr-runtest-coremanglib
|
||||
|
||||
coreclr-gcstress: coreclr-validate GCStressTests.exe $(CORECLR_STRESSTESTSI_CS)
|
||||
BVT_ROOT=$(realpath $(CORECLR_PATH)/tests/src/GC/Stress/Tests) $(RUNTIME) GCStressTests.exe $(CORECLR_PATH)/tests/src/GC/Stress/$(if $(CI_PR),testmix_gc_pr.config,testmix_gc.config); if [ $$? -ne 100 ]; then exit 1; fi
|
||||
BVT_ROOT=$(realpath $(CORECLR_PATH)/tests/src/GC/Stress/Tests) $(RUNTIME) GCStressTests.exe $(CORECLR_PATH)/tests/src/GC/Stress/testmix_gc.config; if [ $$? -ne 100 ]; then exit 1; fi
|
||||
|
||||
# Output a variable in $(2) to the file $(1), separated by newline characters
|
||||
# we need to do it in groups of 100 entries to make sure we don't exceed shell char limits
|
||||
@@ -2217,6 +2217,7 @@ CORECLR_COREMANGLIB_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/gc/gcgettotalmemory.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/gc/gckeepalive.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/gc/gcmaxgeneration.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/gc/gcsuppressfinalize.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/gc/gcwaitforpendingfinalizers.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/calendarweekrulefirstday.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/calendarweekrulefirstfourdayweek.cs \
|
||||
@@ -3981,10 +3982,6 @@ CORECLR_DISABLED_TEST_CS_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/newarr/newarr.cs \
|
||||
$(CORECLR_PATH)/tests/src/baseservices/exceptions/sharedexceptions/emptystacktrace/oomexception01.cs
|
||||
|
||||
# https://github.com/mono/mono/issues/7432
|
||||
CORECLR_DISABLED_TEST_CS_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/gc/gcsuppressfinalize.cs
|
||||
|
||||
CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/BBT/Scenario4/Not-Int32.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/Convert/implicitConv.il \
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
check-ms-test-suite: $(CLASS)/nunitlite.dll
|
||||
@if $(MAKE) validate-ms-test-suite RESET_VERSIONS=1; then \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/conformance build MCS="$(MCS) -debug:portable -t:library -warn:1 -r:$(CLASS)/nunitlite.dll" && \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup build MCS="$(MCS) -debug:portable -t:library -warn:1 -r:$(CLASS)/nunitlite.dll" && \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/System.Linq.Expressions build MCS="$(MCS) -debug:portable -t:library -warn:1 -r:$(CLASS)/nunitlite.dll" && \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/conformance run NUNIT-CONSOLE="$(RUNTIME) $(CLASS)/nunit-lite-console.exe -exclude=MonoBug,BadTest -format:nunit2" NUNIT_XML_RESULT="-result:$(abs_top_builddir)/acceptance-tests/TestResult-ms-test-suite-conformance.xml" || EXIT_CODE=1; \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup run NUNIT-CONSOLE="$(RUNTIME) $(CLASS)/nunit-lite-console.exe -exclude=MonoBug,BadTest -format:nunit2" NUNIT_XML_RESULT="-result:$(abs_top_builddir)/acceptance-tests/TestResult-ms-test-suite-systemruntimebringup.xml" || EXIT_CODE=1; \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/System.Linq.Expressions run NUNIT-CONSOLE="$(RUNTIME) $(CLASS)/nunit-lite-console.exe -exclude=MonoBug,BadTest -format:nunit2" NUNIT_XML_RESULT="-result:$(abs_top_builddir)/acceptance-tests/TestResult-ms-test-suite-systemlinqexpressions.xml" || EXIT_CODE=1; \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup build MCS="$(MCS) -debug:portable -warn:1" && \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup run MONO="$(RUNTIME)" || EXIT_CODE=1; \
|
||||
exit $$EXIT_CODE; \
|
||||
else \
|
||||
echo "*** [ms-test-suite] Getting the repository failed, you probably don't have access to this Xamarin-internal resource. Skipping."; \
|
||||
|
||||
@@ -40,7 +40,6 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
public int? ExitCode { get; set; }
|
||||
public string StandardOutput { get; set; }
|
||||
public string StandardError { get; set; }
|
||||
public string CombinedOutput { get; set; }
|
||||
}
|
||||
|
||||
static class Program {
|
||||
@@ -58,21 +57,21 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
"jit",
|
||||
};
|
||||
|
||||
static readonly TimeSpan _timeout = TimeSpan.FromHours (6);
|
||||
|
||||
const RegexOptions _regexOptions = RegexOptions.Compiled | RegexOptions.Singleline;
|
||||
static readonly TimeSpan _timeout = TimeSpan.FromHours (9);
|
||||
|
||||
static readonly Dictionary<string, Predicate<Benchmark>> _filters = new Dictionary<string, Predicate<Benchmark>> {
|
||||
{ "ironjs-v8", FilterNotOnArm },
|
||||
{ "msbiology", FilterNever },
|
||||
{ "ironjs-v8", FilterArmArchitecture },
|
||||
};
|
||||
|
||||
static bool FilterNever (Benchmark benchmark)
|
||||
{
|
||||
return false;
|
||||
static readonly Dictionary<string, Action<TestResult>> _processors = new Dictionary<string, Action<TestResult>> {
|
||||
{ "msbiology", Process32BitOutOfMemory },
|
||||
};
|
||||
|
||||
static string FilterInvalidXmlChars (string text) {
|
||||
return Regex.Replace (text, @"[^\x09\x0A\x0D\x20-\uD7FF\uE000-\uFFFD\u10000-\u10FFFF]", string.Empty);
|
||||
}
|
||||
|
||||
static bool FilterNotOnArm (Benchmark benchmark)
|
||||
static bool FilterArmArchitecture (Benchmark benchmark)
|
||||
{
|
||||
#if ARCH_arm || ARCH_arm64
|
||||
return false;
|
||||
@@ -81,61 +80,45 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
#endif
|
||||
}
|
||||
|
||||
static void Process32BitOutOfMemory (TestResult result)
|
||||
{
|
||||
if (Environment.Is64BitProcess)
|
||||
return;
|
||||
|
||||
if (result.ExitCode == null || result.ExitCode == 0)
|
||||
return;
|
||||
|
||||
if (result.StandardError.Contains ("OutOfMemoryException"))
|
||||
result.ExitCode = 0;
|
||||
}
|
||||
|
||||
static bool IsSupported (Benchmark benchmark)
|
||||
{
|
||||
return _filters.TryGetValue (benchmark.Name, out var filter) ? filter (benchmark) : true;
|
||||
}
|
||||
|
||||
static string ReplaceInvalidXmlChars (string text) {
|
||||
return Regex.Replace (text, @"[^\x09\x0A\x0D\x20-\uD7FF\uE000-\uFFFD\u10000-\u10FFFF]", string.Empty);
|
||||
}
|
||||
|
||||
static int Main ()
|
||||
{
|
||||
var regex = new Regex (".*", _regexOptions);
|
||||
|
||||
if (Environment.GetEnvironmentVariable ("MONO_PROFILER_STRESS_REGEX") is string envRegex)
|
||||
regex = new Regex (envRegex, _regexOptions);
|
||||
|
||||
var depDir = Path.Combine ("..", "external", "benchmarker");
|
||||
var benchDir = Path.Combine (depDir, "benchmarks");
|
||||
var testDir = Path.Combine (depDir, "tests");
|
||||
|
||||
var benchmarks = Directory.EnumerateFiles (benchDir, "*.benchmark")
|
||||
.Select (Benchmark.Load)
|
||||
.Where (b => !b.OnlyExplicit && b.ClientCommandLine == null && IsSupported (b) && regex.IsMatch (b.Name))
|
||||
.Where (b => !b.OnlyExplicit && b.ClientCommandLine == null && IsSupported (b))
|
||||
.OrderBy (b => b.Name)
|
||||
.ToArray ();
|
||||
|
||||
var monoPath = Path.GetFullPath (Path.Combine ("..", "..", "runtime", "mono-wrapper"));
|
||||
var classDir = Path.GetFullPath (Path.Combine ("..", "..", "mcs", "class", "lib", "net_4_x"));
|
||||
|
||||
var seed = Environment.TickCount;
|
||||
|
||||
if (Environment.GetEnvironmentVariable ("MONO_PROFILER_STRESS_SEED") is string envSeed)
|
||||
seed = int.Parse (envSeed);
|
||||
|
||||
var timeout = (int) _timeout.TotalMilliseconds;
|
||||
|
||||
if (Environment.GetEnvironmentVariable ("MONO_PROFILER_STRESS_TIMEOUT") is string envTimeout)
|
||||
timeout = (int) TimeSpan.Parse (envTimeout).TotalMilliseconds;
|
||||
|
||||
string options = null;
|
||||
|
||||
if (Environment.GetEnvironmentVariable ("MONO_PROFILER_STRESS_OPTIONS") is string envOptions)
|
||||
options = envOptions;
|
||||
|
||||
var rand = new Random (seed);
|
||||
var rand = new Random ();
|
||||
var cpus = Environment.ProcessorCount;
|
||||
|
||||
var sw = Stopwatch.StartNew ();
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.Magenta;
|
||||
Console.WriteLine ($"[{sw.Elapsed.ToString ("G")}] Starting test session with seed: {seed}");
|
||||
Console.ResetColor ();
|
||||
|
||||
var results = new List<TestResult> (benchmarks.Length);
|
||||
|
||||
var sw = Stopwatch.StartNew ();
|
||||
|
||||
for (var i = 0; i < benchmarks.Length; i++) {
|
||||
var bench = benchmarks [i];
|
||||
|
||||
@@ -144,24 +127,17 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
var maxSamples = rand.Next (0, cpus * 2000 + 1);
|
||||
var heapShotFreq = rand.Next (-10, 11);
|
||||
var maxFrames = rand.Next (0, 33);
|
||||
var flags = _options.ToDictionary (x => x, _ => rand.Next (0, 2) == 1)
|
||||
.Select (x => (x.Value ? string.Empty : "no") + x.Key)
|
||||
.ToArray ();
|
||||
var options = _options.ToDictionary (x => x, _ => rand.Next (0, 2) == 1)
|
||||
.Select (x => (x.Value ? string.Empty : "no") + x.Key)
|
||||
.ToArray ();
|
||||
|
||||
var profOptions = "nodefaults,output=/dev/null,";
|
||||
var profOptions = $"maxframes={maxFrames},{string.Join (",", options)},output=/dev/null";
|
||||
|
||||
if (options == null) {
|
||||
profOptions += $"maxframes={maxFrames},";
|
||||
if (sampleFreq > 0)
|
||||
profOptions += $",sample{sampleMode}={sampleFreq},maxsamples={maxSamples}";
|
||||
|
||||
if (sampleFreq > 0)
|
||||
profOptions += $"sample{sampleMode}={sampleFreq},maxsamples={maxSamples},";
|
||||
|
||||
if (heapShotFreq > 0)
|
||||
profOptions += $"heapshot={heapShotFreq}gc,";
|
||||
|
||||
profOptions += string.Join (",", flags);
|
||||
} else
|
||||
profOptions += options;
|
||||
if (heapShotFreq > 0)
|
||||
profOptions += $",heapshot={heapShotFreq}gc";
|
||||
|
||||
var info = new ProcessStartInfo {
|
||||
UseShellExecute = false,
|
||||
@@ -191,22 +167,17 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
|
||||
var stdout = new StringBuilder ();
|
||||
var stderr = new StringBuilder ();
|
||||
var combined = new StringBuilder ();
|
||||
|
||||
proc.OutputDataReceived += (sender, args) => {
|
||||
if (args.Data != null)
|
||||
lock (result) {
|
||||
lock (result)
|
||||
stdout.AppendLine (args.Data);
|
||||
combined.AppendLine (args.Data);
|
||||
}
|
||||
};
|
||||
|
||||
proc.ErrorDataReceived += (sender, args) => {
|
||||
if (args.Data != null)
|
||||
lock (result) {
|
||||
lock (result)
|
||||
stderr.AppendLine (args.Data);
|
||||
combined.AppendLine (args.Data);
|
||||
}
|
||||
};
|
||||
|
||||
result.Stopwatch.Start ();
|
||||
@@ -216,7 +187,7 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
proc.BeginOutputReadLine ();
|
||||
proc.BeginErrorReadLine ();
|
||||
|
||||
if (!proc.WaitForExit (timeout)) {
|
||||
if (!proc.WaitForExit ((int) _timeout.TotalMilliseconds)) {
|
||||
// Force a thread dump.
|
||||
Syscall.kill (proc.Id, Signum.SIGQUIT);
|
||||
Thread.Sleep (1000);
|
||||
@@ -233,7 +204,6 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
lock (result) {
|
||||
result.StandardOutput = stdout.ToString ();
|
||||
result.StandardError = stderr.ToString ();
|
||||
result.CombinedOutput = combined.ToString ();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,12 +215,21 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
|
||||
if (result.ExitCode != 0) {
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine ("===== stdout + stderr =====");
|
||||
Console.WriteLine ("===== stdout =====");
|
||||
Console.ResetColor ();
|
||||
|
||||
Console.WriteLine (result.CombinedOutput);
|
||||
Console.WriteLine (result.StandardOutput);
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine ("===== stderr =====");
|
||||
Console.ResetColor ();
|
||||
|
||||
Console.WriteLine (result.StandardError);
|
||||
}
|
||||
|
||||
if (_processors.TryGetValue (bench.Name, out var processor))
|
||||
processor (result);
|
||||
|
||||
results.Add (result);
|
||||
}
|
||||
|
||||
@@ -267,7 +246,7 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
|
||||
using (var writer = XmlWriter.Create ("TestResult-profiler-stress.xml", settings)) {
|
||||
writer.WriteStartDocument ();
|
||||
writer.WriteComment ($"This file represents the results of running a test suite (seed: {seed})");
|
||||
writer.WriteComment ("This file represents the results of running a test suite");
|
||||
|
||||
writer.WriteStartElement ("test-results");
|
||||
writer.WriteAttributeString ("name", "profiler-stress-tests.dummy");
|
||||
@@ -328,11 +307,11 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
writer.WriteStartElement ("failure");
|
||||
|
||||
writer.WriteStartElement ("message");
|
||||
writer.WriteCData (ReplaceInvalidXmlChars (result.StandardOutput));
|
||||
writer.WriteCData (FilterInvalidXmlChars (result.StandardOutput));
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteStartElement ("stack-trace");
|
||||
writer.WriteCData (ReplaceInvalidXmlChars (result.StandardError));
|
||||
writer.WriteCData (FilterInvalidXmlChars (result.StandardError));
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteEndElement ();
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
check-roslyn:
|
||||
@$(MAKE) validate-roslyn RESET_VERSIONS=1
|
||||
@if [ -z $$PREFIX ]; then echo "You need to set PREFIX to the prefix of the Mono installation that should be used for testing Roslyn." && exit 1; fi
|
||||
sed -i -e 's/\\4.5-api"/\\4.5"/g' $$PREFIX/lib/mono/xbuild-frameworks/.NETFramework/v4.5/RedistList/FrameworkList.xml; \
|
||||
export MSBuildExtensionsPath=$$PREFIX/lib/mono/xbuild; \
|
||||
MONO_DOTNET_PORTABLE_DIR=$$PREFIX/lib/mono/xbuild-frameworks/.NETPortable/; \
|
||||
if [ ! -d "$$MONO_DOTNET_PORTABLE_DIR/v4.6" ]; then \
|
||||
mkdir -p $$MONO_DOTNET_PORTABLE_DIR; \
|
||||
curl -SL "http://download.mono-project.com/third-party/RoslynBuildDependencies.zip" > /tmp/RoslynBuildDependencies.zip; \
|
||||
unzip -o /tmp/RoslynBuildDependencies.zip -d /tmp/RoslynBuildDependencies; \
|
||||
cp -r /tmp/RoslynBuildDependencies/PortableReferenceAssemblies/* $$MONO_DOTNET_PORTABLE_DIR; \
|
||||
fi; \
|
||||
cd $(ROSLYN_PATH); \
|
||||
./mono-testing.sh "$(XUNIT)" || exit; \
|
||||
echo "done"
|
||||
sed -i -e 'N; s/bootstrapArg=".*\n.*"/bootstrapArg=""/g' cibuild.sh; \
|
||||
sed -i -e 's#-xml Binaries/\$$BUILD_CONFIGURATION/xUnitResults/#-nunit $(abs_top_builddir)/acceptance-tests/TestResult-#g' cibuild.sh; \
|
||||
./cibuild.sh --mono-path $$PREFIX/bin || EXIT_CODE=1; \
|
||||
sed -i -e 's/\\4.5"/\\4.5-api"/g' $$PREFIX/lib/mono/xbuild-frameworks/.NETFramework/v4.5/RedistList/FrameworkList.xml; \
|
||||
exit $$EXIT_CODE
|
||||
+50
-372
@@ -1,8 +1,8 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
#AC_PREREQ([2.62])
|
||||
|
||||
AC_INIT(mono, [5.12.0],
|
||||
[https://github.com/mono/mono/issues/new])
|
||||
AC_INIT(mono, [5.7.0],
|
||||
[http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
|
||||
|
||||
AC_CONFIG_SRCDIR([README.md])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
@@ -40,7 +40,7 @@ MONO_VERSION_BUILD=`echo $VERSION | cut -d . -f 3`
|
||||
# This can be reset to 0 when Mono's version number is bumped
|
||||
# since it's part of the corlib version (the prefix '1' in the full
|
||||
# version number is to ensure the number isn't treated as octal in C)
|
||||
MONO_CORLIB_COUNTER=5
|
||||
MONO_CORLIB_COUNTER=1
|
||||
MONO_CORLIB_VERSION=`printf "1%02d%02d%02d%03d" $MONO_VERSION_MAJOR $MONO_VERSION_MINOR 0 $MONO_CORLIB_COUNTER`
|
||||
|
||||
AC_DEFINE_UNQUOTED(MONO_CORLIB_VERSION,$MONO_CORLIB_VERSION,[Version of the corlib-runtime interface])
|
||||
@@ -100,7 +100,7 @@ extra_runtime_ldflags=""
|
||||
# Hack for WASM
|
||||
# Current autotools (v1.15) doesn't have a triplet we can use for wasm so the kludge we do is to
|
||||
# work around it by using a feature flag instead
|
||||
AC_ARG_ENABLE(wasm,[ --enable-wasm Hack to set the current runtime to target wasm], enable_wasm=$enableval)
|
||||
AC_ARG_ENABLE(wasm,[ --enable-wasm Hack to set the current runtime to target wasm], enable_wasm=$enableval)
|
||||
|
||||
# Thread configuration inspired by sleepycat's db
|
||||
AC_MSG_CHECKING([host platform characteristics])
|
||||
@@ -113,8 +113,6 @@ ikvm_native=yes
|
||||
host_win32=no
|
||||
target_win32=no
|
||||
platform_android=no
|
||||
platform_tizen=no
|
||||
platform_ios=no
|
||||
host_darwin=no
|
||||
|
||||
|
||||
@@ -123,7 +121,6 @@ CFLAGS="$CFLAGS -D_REENTRANT -D_GNU_SOURCE -DNO_UNALIGNED_ACCESS -s WASM=1"
|
||||
CPPFLAGS="$CPPFLAGS -D_REENTRANT -DUSE_MMAP -D_GNU_SOURCE -DNO_UNALIGNED_ACCESS -s WASM=1"
|
||||
libdl="-ldl"
|
||||
libgc_threads=pthreads
|
||||
platform_wasm=yes
|
||||
|
||||
else
|
||||
|
||||
@@ -207,7 +204,6 @@ case "$host" in
|
||||
;;
|
||||
*-*-*openbsd*)
|
||||
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_OPENBSD_THREADS -DHOST_BSD -D_REENTRANT -DUSE_MMAP"
|
||||
LDFLAGS="${LDFLAGS} -Wl,-zwxneeded"
|
||||
if test "x$disable_munmap" != "xyes"; then
|
||||
CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP"
|
||||
fi
|
||||
@@ -217,7 +213,6 @@ case "$host" in
|
||||
AC_DEFINE(PTHREAD_POINTER_ID)
|
||||
libdl=
|
||||
libgc_threads=pthreads
|
||||
with_tls=pthread
|
||||
with_sigaltstack=no
|
||||
use_sigposix=yes
|
||||
with_sgen_default_concurrent=yes
|
||||
@@ -272,11 +267,6 @@ case "$host" in
|
||||
mono_cv_uscore=no
|
||||
fi
|
||||
case "$host" in
|
||||
*-tizen-linux-*)
|
||||
platform_tizen=yes
|
||||
;;
|
||||
esac
|
||||
case "$host" in
|
||||
aarch64-*)
|
||||
support_boehm=no
|
||||
with_gc=sgen
|
||||
@@ -354,12 +344,8 @@ case "$host" in
|
||||
with_sgen_default_concurrent=yes
|
||||
;;
|
||||
arm*-darwin*)
|
||||
platform_ios=yes
|
||||
has_dtrace=no
|
||||
;;
|
||||
aarch64*-darwin*)
|
||||
platform_ios=yes
|
||||
;;
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*-*-haiku*)
|
||||
@@ -371,32 +357,11 @@ case "$host" in
|
||||
AC_DEFINE(PTHREAD_POINTER_ID)
|
||||
dnl Haiku does not support static TLS with __thread
|
||||
with_tls=pthread
|
||||
dnl Boehm is too much work to backport Haiku support for
|
||||
support_boehm=no
|
||||
libgc_threads=pthreads
|
||||
use_sigposix=yes
|
||||
;;
|
||||
*-*-aix*|*-*-os400*)
|
||||
dnl Set up a 64-bit build
|
||||
CPPFLAGS="$CPPFLAGS -maix64 -DGC_AIX_THREADS -D_ALL_SOURCE -D_LARGE_FILES -D_REENTRANT"
|
||||
LDFLAGS="-maix64"
|
||||
libmono_cflags="-D_REENTRANT"
|
||||
dnl Would you believe GNU nm doesn't know how to process AIX libraries?
|
||||
dnl Hardcode IBM binutils in case GNU ones end up on our path. Also
|
||||
dnl specifiy 64-bit mode for tools.
|
||||
AR="/usr/bin/ar -X64"
|
||||
NM="/usr/bin/nm -X64"
|
||||
dnl SGen is the future (changes to Boehm support code would be
|
||||
dnl required if you wish to re-enable Boehm)
|
||||
support_boehm=no
|
||||
with_gc=sgen
|
||||
need_link_unlink=yes
|
||||
use_sigposix=yes
|
||||
dnl the valloc call to alloc the guard page bombs out, even with extending the data area
|
||||
with_sigaltstack=no
|
||||
dnl use pthread TLS, __thread has issues with the compiler flags we use
|
||||
with_tls=pthread
|
||||
dnl ppc Linux is the same? test further
|
||||
disable_munmap=yes
|
||||
;;
|
||||
*)
|
||||
AC_MSG_WARN([*** Please add $host to configure.ac checks!])
|
||||
libdl="-ldl"
|
||||
@@ -435,9 +400,6 @@ AM_CONDITIONAL(HOST_LINUX, echo x$target_os | grep -q linux)
|
||||
AM_CONDITIONAL(HOST_DARWIN, test x$host_darwin = xyes)
|
||||
AM_CONDITIONAL(HOST_SIGPOSIX, test x$use_sigposix = xyes)
|
||||
AM_CONDITIONAL(HOST_ANDROID, test x$platform_android = xyes)
|
||||
AM_CONDITIONAL(HOST_TIZEN, test x$platform_tizen = xyes)
|
||||
AM_CONDITIONAL(HOST_IOS, test x$platform_ios = xyes)
|
||||
AM_CONDITIONAL(HOST_WASM, test x$platform_wasm = xyes)
|
||||
|
||||
if test -z "$HOST_DARWIN_TRUE"; then :
|
||||
PLATFORM_AOT_SUFFIX=.dylib
|
||||
@@ -541,6 +503,7 @@ AC_CHECK_HEADER(zlib.h, [have_zlib=yes], [have_zlib=no])
|
||||
if test x$have_zlib = xyes; then
|
||||
AC_TRY_COMPILE([#include <zlib.h>], [
|
||||
#if defined(ZLIB_VERNUM) && (ZLIB_VERNUM >= 0x1230)
|
||||
return 0;
|
||||
#else
|
||||
#error No good zlib found
|
||||
#endif
|
||||
@@ -567,7 +530,6 @@ AC_CHECK_HEADERS(sys/poll.h)
|
||||
AC_CHECK_HEADERS(sys/wait.h)
|
||||
AC_CHECK_HEADERS(grp.h)
|
||||
AC_CHECK_HEADERS(syslog.h)
|
||||
AC_CHECK_FUNCS(vsyslog)
|
||||
|
||||
# for mono/dis
|
||||
AC_CHECK_HEADERS(wchar.h)
|
||||
@@ -592,72 +554,6 @@ AC_CHECK_FUNCS(_finite, , AC_MSG_CHECKING(for _finite in math.h)
|
||||
# for Linux statfs support
|
||||
AC_CHECK_HEADERS(linux/magic.h)
|
||||
|
||||
# For Android NDK unified headers
|
||||
if test x$platform_android = xyes; then
|
||||
AC_CHECK_HEADERS(machine/endian.h sys/endian.h)
|
||||
AC_CHECK_HEADERS(android/legacy_signal_inlines.h, [have_android_signal_inlines=yes], [have_android_signal_inlines=no])
|
||||
|
||||
# Make sure SIGRT{MIN,MAX} work - they will fail to work with unified headers if building for
|
||||
# API level < 21 *and* android/legacy_signal_inlines.h doesn't declare (and define) the required
|
||||
# libc APIs to obtain values for SIGRT{MIN,MAX}. We perform the check only if android/legacy_signal_inlines.h
|
||||
# is found because in other cases the macros will either work (for NDK < 14) or fail if the legacy header
|
||||
# doesn't contain the required definitions (NDK 14)
|
||||
if test x$have_android_signal_inlines = xyes; then
|
||||
AC_MSG_CHECKING([Whether Android SIGRTMIN/SGRTMAX macros are valid])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([#include <android/legacy_signal_inlines.h>],[
|
||||
int i;
|
||||
for (i = SIGRTMIN + 1; i < SIGRTMAX; ++i) {
|
||||
}
|
||||
])],[
|
||||
AC_MSG_RESULT(yes)
|
||||
android_sigrtminmax_work=yes
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
android_sigrtminmax_work=no
|
||||
]
|
||||
)
|
||||
|
||||
if test x$android_sigrtminmax_work = xno; then
|
||||
AC_MSG_ERROR([Android SIGRTMIN/SIGRTMAX macros don't work in this NDK])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Attempt to detect whether we're using Android NDK unified headers
|
||||
AC_CHECK_HEADERS(android/api-level.h, [have_android_api_level=yes], [have_android_api_level=no])
|
||||
AC_CHECK_HEADERS(android/versioning.h, [have_android_versioning=yes], [have_android_versioning=no])
|
||||
|
||||
android_unified_headers=no
|
||||
if test x$have_android_api_level = xyes; then
|
||||
if test x$have_android_versioning = xyes; then
|
||||
AC_MSG_CHECKING([whether using Android NDK unified headers])
|
||||
|
||||
# Both macros are defined only in the NDK unified headers
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([
|
||||
#include <android/api-level.h>
|
||||
#include <android/versioning.h>
|
||||
],[
|
||||
#if __ANDROID_API_O__ == 26 && defined(__INTRODUCED_IN)
|
||||
#else
|
||||
#error __ANDROID_API_O__ != 26 or the __INTRODUCED_IN macro not defined
|
||||
#endif
|
||||
])],[
|
||||
AC_MSG_RESULT(yes)
|
||||
android_unified_headers=yes
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
android_unified_headers=no
|
||||
]
|
||||
)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x$android_unified_headers = xyes; then
|
||||
AC_DEFINE(ANDROID_UNIFIED_HEADERS, 1, [Whether Android NDK unified headers are used])
|
||||
fi
|
||||
fi # Android
|
||||
|
||||
# not 64 bit clean in cross-compile
|
||||
if test "x$enable_wasm" = "xyes"; then
|
||||
AC_DEFINE(SIZEOF_VOID_P,4)
|
||||
@@ -679,6 +575,7 @@ AC_CACHE_CHECK([for clang],
|
||||
#else
|
||||
#error "FAILED"
|
||||
#endif
|
||||
return 0;
|
||||
],
|
||||
[mono_cv_clang=yes],
|
||||
[mono_cv_clang=no],
|
||||
@@ -714,6 +611,7 @@ if test x"$GCC" = xyes; then
|
||||
CFLAGS="$CFLAGS -Wunused-but-set-variable -Werror"
|
||||
AC_MSG_CHECKING(for -Wno-unused-but-set-variable option to gcc)
|
||||
AC_TRY_COMPILE([],[
|
||||
return 0;
|
||||
], [
|
||||
AC_MSG_RESULT(yes)
|
||||
CFLAGS="$ORIG_CFLAGS -Wno-unused-but-set-variable"
|
||||
@@ -875,7 +773,6 @@ fi
|
||||
AM_CONDITIONAL(STATIC_MONO, test x$with_static_mono != xno)
|
||||
AM_CONDITIONAL(SHARED_MONO, test x$with_shared_mono != xno)
|
||||
AC_ARG_ENABLE(mcs-build, [ --disable-mcs-build disable the build of the mcs directory], try_mcs_build=$enableval, enable_mcs_build=yes)
|
||||
AC_ARG_ENABLE(support-build, [ --disable-support-build disable the build of the support directory], try_support_build=$enableval, enable_support_build=yes)
|
||||
|
||||
AC_ARG_WITH(xen_opt, [ --with-xen_opt=yes,no Enable Xen-specific behaviour (defaults to yes)],[],[with_xen_opt=yes])
|
||||
if test "x$with_xen_opt" = "xyes" -a "x$mono_cv_clang" = "xno"; then
|
||||
@@ -884,6 +781,7 @@ if test "x$with_xen_opt" = "xyes" -a "x$mono_cv_clang" = "xno"; then
|
||||
CFLAGS="$CFLAGS -mno-tls-direct-seg-refs"
|
||||
AC_MSG_CHECKING(for -mno-tls-direct-seg-refs option to gcc)
|
||||
AC_TRY_COMPILE([], [
|
||||
return 0;
|
||||
], [
|
||||
AC_MSG_RESULT(yes)
|
||||
# Pass it to libgc as well
|
||||
@@ -934,75 +832,6 @@ if test $csc_compiler = default; then
|
||||
fi
|
||||
AC_MSG_RESULT($csc_compiler)
|
||||
|
||||
AC_ARG_WITH(jemalloc, [ --with-jemalloc=yes,no If jemalloc is enabled (defaults to no)], [], [with_jemalloc=no])
|
||||
AC_ARG_WITH(jemalloc-always, [ --with-jemalloc_always=yes,no If jemalloc is enabled and always used (defaults to yes)], [], [with_jemalloc_always=no])
|
||||
AC_ARG_WITH(jemalloc-assert, [ --with-jemalloc_assert=yes,no If jemalloc performs runtime checks for memory correctness (defaults to no)], [], [with_jemalloc_assert=no])
|
||||
|
||||
|
||||
if test x$target_win32 = xyes; then
|
||||
with_jemalloc=no
|
||||
with_jemalloc_assert=no
|
||||
with_jemalloc_always=no
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(MONO_JEMALLOC_ASSERT, [test "x$with_jemalloc_assert" = "xyes"])
|
||||
if test "x$with_jemalloc_assert" = "xyes"; then
|
||||
JEMALLOC_CFLAGS+=" -DMONO_JEMALLOC_ASSERT"
|
||||
AC_DEFINE(MONO_JEMALLOC_ASSERT, 1, [Make jemalloc assert for mono])
|
||||
AC_SUBST(MONO_JEMALLOC_ASSERT, 1)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(MONO_JEMALLOC_DEFAULT, [test "x$with_jemalloc_always" = "xyes"])
|
||||
if test "x$with_jemalloc_always" = "xyes"; then
|
||||
with_jemalloc=yes
|
||||
JEMALLOC_CFLAGS+=" -DMONO_JEMALLOC_DEFAULT"
|
||||
AC_DEFINE(MONO_JEMALLOC_DEFAULT, 1, [Make jemalloc default for mono])
|
||||
AC_SUBST(MONO_JEMALLOC_DEFAULT, 1)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(MONO_JEMALLOC_ENABLED, [test "x$with_jemalloc" = "xyes"])
|
||||
if test "x$with_jemalloc" = "xyes"; then
|
||||
JEMALLOC_LDFLAGS="-L`pwd`/mono/utils/jemalloc/jemalloc/lib -ljemalloc_pic"
|
||||
JEMALLOC_CFLAGS+=" -DMONO_JEMALLOC_ENABLED -I `pwd`/mono/utils/jemalloc/jemalloc/include"
|
||||
JEMALLOC_AUTOCONF_FLAGS=" --build=$target --host=$host"
|
||||
|
||||
if test "x$target_mach" = "xyes"; then
|
||||
JEMALLOC_CPPFLAGS=" -stdlib=libc++ "
|
||||
fi
|
||||
|
||||
AC_DEFINE(MONO_JEMALLOC_ENABLED, 1, [Enable jemalloc usage for mono])
|
||||
AC_SUBST(MONO_JEMALLOC_ENABLED, 1)
|
||||
|
||||
AC_SUBST(JEMALLOC_CFLAGS)
|
||||
AC_SUBST(JEMALLOC_CPPFLAGS)
|
||||
AC_SUBST(JEMALLOC_LDFLAGS)
|
||||
AC_SUBST(JEMALLOC_AUTOCONF_FLAGS)
|
||||
fi
|
||||
|
||||
|
||||
# Terminology:
|
||||
# Crash privacy - Attempts to not send identifying information in the crash dump / to protect the obscurity of the program control flow
|
||||
# MERP - The MS telemetry profile. Not for general use.
|
||||
# Structured crashes - crashes at runtime that trigger a stack walk by mono that happens cooperatively
|
||||
|
||||
# Structured crashes are not merp crashes. Structured crashes are json dumps made by mono during crashes. Merp upload is going to use the dumping code is a very specific way, and is enabled at runtime with an icall.
|
||||
|
||||
#--with-crash_privacy=yes --with-structured_crashes=no means we don't wanna dump in non-merp-enabled builds, and we want to not send symbol strings. This is going to be the default pair of settings for VS4Mac.
|
||||
#--with-crash_privacy=yes --with-structured_crashes=yes means you want to see crashes on your console, and you want to not see unmanaged symbol names. This is an option for proprietary apps that have manual bugs filed.
|
||||
#--with-crash_privacy=no --with-structured_crashes=no means you want to see no crash dumps on failure and you don't care about privacy. This is how you'd set a "don't want it, don't care" configuration.
|
||||
#--with-crash_privacy=no --with-structured_crashes=yes means you want full crashes and you want to see them in the terminal, not on telemetry. This is going to be how we build for CI.
|
||||
|
||||
AC_ARG_WITH(crash-privacy, [ --with-crash_privacy=yes,no If you want your crashes to not include names of symbols present in the binary. ], [], [with_crash_privacy=no])
|
||||
AC_ARG_WITH(structured-crashes, [ --with-structured_crashes=yes,no If you want your unmanaged crashes to result in a small crash dump file. ], [], [with_structured_crashes=yes])
|
||||
|
||||
if test "x$with_crash_privacy" = "xno"; then
|
||||
AC_DEFINE(MONO_PRIVATE_CRASHES,1,[Do not include names of unmanaged functions in the crash dump])
|
||||
fi
|
||||
|
||||
if test "x$with_structured_crashes" = "xno"; then
|
||||
AC_DEFINE(DISABLE_STRUCTURED_CRASH,1,[Do not create structured crash files during unmanaged crashes])
|
||||
fi
|
||||
|
||||
#
|
||||
# Set the build profiles and options before things which use them
|
||||
#
|
||||
@@ -1019,56 +848,9 @@ AC_ARG_WITH(testing_aot_full, [ --with-testing_aot_full=yes,no If you w
|
||||
AC_ARG_WITH(winaot, [ --with-winaot=yes,no If you want to build the Windows friendly AOT assemblies (defaults to no)], [], [with_winaot=default])
|
||||
AC_ARG_WITH(orbis, [ --with-orbis=yes,no If you want to build the Orbis assemblies (defaults to no)], [], [with_orbis=default])
|
||||
AC_ARG_WITH(unreal, [ --with-unreal=yes,no If you want to build the Unreal assemblies (defaults to no)], [], [with_unreal=default])
|
||||
AC_ARG_WITH(wasm, [ --with-wasm=yes,no If you want to build the WebAssembly (defaults to no)], [], [with_wasm=default])
|
||||
|
||||
|
||||
AC_ARG_WITH(runtime_preset, [ --with-runtime_preset=net_4_x,all,aot,hybridaot,fullaot,bitcode,unreal Which default profile to build (defaults to net_4_x)], [], [with_runtime_preset=net_4_x])
|
||||
AC_ARG_WITH(spectre-mitigation, [ --with-spectre-mitigation=yes,no If you want to build the runtime with compiler flags that enable Spectre mitigation (defaults to no)], [], [with_spectre_mitigation=default])
|
||||
AC_ARG_WITH(spectre-indirect-branch-choice, [ --with-spectre-indirect-branch-choice=keep,thunk,inline,extern Convert indirect branches to the specified kind of thunk (defaults to inline)], [], [with_spectre_indirect_branch_choice=inline])
|
||||
AC_ARG_WITH(spectre-function-return-choice, [ --with-spectre-function-return-choice=keep,thunk,inline,extern Convert function return instructions to the specified kind of thunk (defaults to inline)], [], [with_spectre_function_return_choice=inline])
|
||||
|
||||
dnl
|
||||
dnl Spectre compiler mitigation flag checks
|
||||
dnl
|
||||
if test "x$with_spectre_mitigation" = "xyes"; then
|
||||
AC_MSG_NOTICE([Compiler Spectre mitigation support checks])
|
||||
SPECTRE_CFLAGS=
|
||||
SPECTRE_INDIRECT_BRANCH_KIND=
|
||||
case "x$with_spectre_indirect_branch_choice" in
|
||||
xkeep) SPECTRE_INDIRECT_BRANCH_KIND=keep ;;
|
||||
xthunk) SPECTRE_INDIRECT_BRANCH_KIND=thunk ;;
|
||||
xinline) SPECTRE_INDIRECT_BRANCH_KIND=thunk-inline ;;
|
||||
xextern) SPECTRE_INDIRECT_BRANCH_KIND=thunk-extern ;;
|
||||
*) AC_MSG_ERROR([Invalid indirect jump thunk kind ($with_spectre_indirect_branch_choice)]) ;;
|
||||
esac
|
||||
|
||||
SPECTRE_FUNCTION_RETURN_KIND=""
|
||||
case "x$with_spectre_function_return_choice" in
|
||||
xkeep) SPECTRE_FUNCTION_RETURN_KIND=keep ;;
|
||||
xthunk) SPECTRE_FUNCTION_RETURN_KIND=thunk ;;
|
||||
xinline) SPECTRE_FUNCTION_RETURN_KIND=thunk-inline ;;
|
||||
xextern) SPECTRE_FUNCTION_RETURN_KIND=thunk-extern ;;
|
||||
*) AC_MSG_ERROR([Invalid function return thunk kind ($with_spectre_function_return_choice)]) ;;
|
||||
esac
|
||||
|
||||
AX_CHECK_COMPILE_FLAG(
|
||||
[ -mindirect-branch=$SPECTRE_INDIRECT_BRANCH_KIND ],
|
||||
[ SPECTRE_CFLAGS="$SPECTRE_CFLAGS -mindirect-branch=$SPECTRE_INDIRECT_BRANCH_KIND" ]
|
||||
)
|
||||
|
||||
AX_CHECK_COMPILE_FLAG(
|
||||
[ -mfunction-return=$SPECTRE_FUNCTION_RETURN_KIND ],
|
||||
[ SPECTRE_CFLAGS="$SPECTRE_CFLAGS -mfunction-return=$SPECTRE_FUNCTION_RETURN_KIND" ]
|
||||
)
|
||||
|
||||
if test "x$SPECTRE_CFLAGS" != "x" ; then
|
||||
CFLAGS="$CFLAGS $SPECTRE_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $SPECTRE_CFLAGS"
|
||||
spectre_mitigation_status="mitigation enabled"
|
||||
fi
|
||||
else
|
||||
spectre_mitigation_status="no mitigation"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl Profile defaults
|
||||
@@ -1087,14 +869,11 @@ with_testing_aot_full_default=no
|
||||
with_winaot_default=no
|
||||
with_orbis_default=no
|
||||
with_unreal_default=no
|
||||
with_wasm_default=no
|
||||
|
||||
with_bitcode_default=no
|
||||
with_cooperative_gc_default=no
|
||||
|
||||
INVARIANT_AOT_OPTIONS=nimt-trampolines=2000,ntrampolines=9000,nrgctx-fetch-trampolines=256,ngsharedvt-trampolines=4000
|
||||
|
||||
AOT_BUILD_ATTRS=$INVARIANT_AOT_OPTIONS
|
||||
INVARIANT_AOT_OPTIONS=nimt-trampolines=2000,ntrampolines=8000,nrgctx-fetch-trampolines=256,ngsharedvt-trampolines=4000
|
||||
|
||||
if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
@@ -1110,7 +889,6 @@ elif test x$with_runtime_preset = xall; then
|
||||
with_winaot_default=yes
|
||||
with_orbis_default=yes
|
||||
with_unreal_default=yes
|
||||
with_wasm_default=yes
|
||||
elif test x$with_runtime_preset = xfullaot; then
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
with_testing_aot_full_default=yes
|
||||
@@ -1123,8 +901,8 @@ elif test x$with_runtime_preset = xfullaot; then
|
||||
mono_feature_disable_appdomains='yes'
|
||||
|
||||
AOT_BUILD_FLAGS="--runtime=mobile -O=gsharedvt --aot=full,$INVARIANT_AOT_OPTIONS"
|
||||
|
||||
AOT_RUN_FLAGS="--runtime=mobile --full-aot"
|
||||
AOT_MODE="full"
|
||||
elif test x$with_runtime_preset = xbitcode; then
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
with_testing_aot_full_default=yes
|
||||
@@ -1141,7 +919,6 @@ elif test x$with_runtime_preset = xbitcode; then
|
||||
|
||||
AOT_BUILD_FLAGS="--runtime=mobile --aot=llvmonly,$INVARIANT_AOT_OPTIONS"
|
||||
AOT_RUN_FLAGS="--runtime=mobile --llvmonly"
|
||||
AOT_MODE="llvmonly"
|
||||
elif test x$with_runtime_preset = xhybridaot; then
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
with_testing_aot_hybrid_default=yes
|
||||
@@ -1169,7 +946,6 @@ elif test x$with_runtime_preset = xwinaot; then
|
||||
|
||||
AOT_BUILD_FLAGS="--runtime=mobile --aot=full,$INVARIANT_AOT_OPTIONS"
|
||||
AOT_RUN_FLAGS="--runtime=mobile --full-aot"
|
||||
AOT_MODE="llvmonly"
|
||||
elif test x$with_runtime_preset = xorbis; then
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
with_orbis_default=yes
|
||||
@@ -1183,7 +959,6 @@ elif test x$with_runtime_preset = xorbis; then
|
||||
|
||||
AOT_BUILD_FLAGS="--runtime=mobile --aot=full,$INVARIANT_AOT_OPTIONS"
|
||||
AOT_RUN_FLAGS="--runtime=mobile --full-aot"
|
||||
AOT_MODE="full"
|
||||
elif test x$with_runtime_preset = xunreal; then
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
with_unreal_default=yes
|
||||
@@ -1195,19 +970,6 @@ elif test x$with_runtime_preset = xunreal; then
|
||||
|
||||
AOT_BUILD_FLAGS="--runtime=mobile --aot=hybrid,$INVARIANT_AOT_OPTIONS"
|
||||
AOT_RUN_FLAGS="--runtime=mobile --hybrid-aot"
|
||||
elif test x$with_runtime_preset = xwasm; then
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
with_wasm_default=yes
|
||||
TEST_PROFILE=wasm
|
||||
|
||||
mono_feature_disable_com='yes'
|
||||
mono_feature_disable_remoting='yes'
|
||||
mono_feature_disable_reflection_emit_save='yes'
|
||||
mono_feature_disable_reflection_emit='yes'
|
||||
mono_feature_disable_appdomains='yes'
|
||||
|
||||
AOT_BUILD_FLAGS="--runtime=mobile --aot=full,$INVARIANT_AOT_OPTIONS"
|
||||
AOT_RUN_FLAGS="--runtime=mobile --full-aot"
|
||||
else
|
||||
with_profile4_x_default=yes
|
||||
fi
|
||||
@@ -1257,9 +1019,6 @@ fi
|
||||
if test "x$with_unreal" = "xdefault"; then
|
||||
with_unreal=$with_unreal_default
|
||||
fi
|
||||
if test "x$with_wasm" = "xdefault"; then
|
||||
with_wasm=$with_wasm_default
|
||||
fi
|
||||
|
||||
|
||||
AM_CONDITIONAL(INSTALL_4_x, [test "x$with_profile4_x" = "xyes"])
|
||||
@@ -1274,8 +1033,7 @@ AM_CONDITIONAL(INSTALL_TESTING_AOT_FULL, [test "x$with_testing_aot_full" != "xno
|
||||
AM_CONDITIONAL(INSTALL_WINAOT, [test "x$with_winaot" != "xno"])
|
||||
AM_CONDITIONAL(INSTALL_ORBIS, [test "x$with_orbis" != "xno"])
|
||||
AM_CONDITIONAL(INSTALL_UNREAL, [test "x$with_unreal" != "xno"])
|
||||
AM_CONDITIONAL(INSTALL_WASM, [test "x$with_wasm" != "xno"])
|
||||
AM_CONDITIONAL(FULL_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_full"] || [test "x$TEST_PROFILE" = "xwinaot"] || [test "x$TEST_PROFILE" = "xorbis"] || [test "x$TEST_PROFILE" = "xwasm"])
|
||||
AM_CONDITIONAL(FULL_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_full"] || [test "x$TEST_PROFILE" = "xwinaot"] || [test "x$TEST_PROFILE" = "xorbis"])
|
||||
AM_CONDITIONAL(HYBRID_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_hybrid"] || [test "x$TEST_PROFILE" = "xunreal"])
|
||||
|
||||
default_profile=net_4_x
|
||||
@@ -1303,9 +1061,6 @@ fi
|
||||
if test -z "$INSTALL_UNREAL_TRUE"; then :
|
||||
default_profile=unreal
|
||||
fi
|
||||
if test -z "$INSTALL_WASM_TRUE"; then :
|
||||
default_profile=wasm
|
||||
fi
|
||||
if test -z "$INSTALL_4_x_TRUE"; then :
|
||||
default_profile=net_4_x
|
||||
fi
|
||||
@@ -1336,7 +1091,7 @@ fi
|
||||
|
||||
AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsystems.
|
||||
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug, appdomains, verifier,
|
||||
reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, interpreter, simd, soft_debug, perfcounters, normalization, desktop_loader, shared_perfcounters, remoting,
|
||||
reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, perfcounters, normalization, desktop_loader, shared_perfcounters, remoting,
|
||||
security, lldb, mdb, sgen_remset, sgen_marksweep_par, sgen_marksweep_fixed, sgen_marksweep_fixed_par, sgen_copying.],
|
||||
[
|
||||
for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
|
||||
@@ -1432,25 +1187,12 @@ if test "x$mono_feature_disable_verifier" = "xyes"; then
|
||||
fi
|
||||
|
||||
if test "x$mono_feature_disable_jit" = "xyes"; then
|
||||
AC_DEFINE(DISABLE_JIT, 1, [Disable the JIT, only full-aot mode or interpreter will be supported by the runtime.])
|
||||
AC_MSG_NOTICE([Disabled the JIT engine, only full AOT or interpreter will be supported])
|
||||
AC_DEFINE(DISABLE_JIT, 1, [Disable the JIT, only full-aot mode will be supported by the runtime.])
|
||||
AC_MSG_NOTICE([Disabled the JIT engine, only full AOT will be supported])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(DISABLE_JIT, test x$mono_feature_disable_jit = xyes)
|
||||
|
||||
if test "x$mono_feature_disable_interpreter" = "xyes"; then
|
||||
AC_DEFINE(DISABLE_INTERPRETER, 1, [Disable the interpreter.])
|
||||
AC_MSG_NOTICE([Disabled the interpreter])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(DISABLE_INTERPRETER, test x$mono_feature_disable_interpreter = xyes)
|
||||
|
||||
if test "x$mono_feature_disable_interpreter" != "xyes" -o "x$mono_feature_disable_jit" != "xyes"; then
|
||||
AC_DEFINE(ENABLE_ILGEN, 1, [Some VES is available at runtime])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(ENABLE_ILGEN, test x$mono_feature_disable_interpreter != xyes -o x$mono_feature_disable_jit != xyes)
|
||||
|
||||
if test "x$mono_feature_disable_simd" = "xyes"; then
|
||||
AC_DEFINE(DISABLE_SIMD, 1, [Disable SIMD intrinsics related optimizations.])
|
||||
AC_MSG_NOTICE([Disabled SIMD support])
|
||||
@@ -1687,33 +1429,6 @@ if test x$platform_android = xyes; then
|
||||
fi
|
||||
|
||||
if test x$host_win32 = xno; then
|
||||
dnl *************************************
|
||||
dnl *** Checks for time capabilities ***
|
||||
dnl *************************************
|
||||
|
||||
AC_MSG_CHECKING(for CLOCK_MONOTONIC)
|
||||
AC_TRY_COMPILE([#include <time.h>], [
|
||||
const int foo = CLOCK_MONOTONIC;
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_CLOCK_MONOTONIC, 1, [CLOCK_MONOTONIC])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING(for CLOCK_MONOTONIC_COARSE)
|
||||
AC_TRY_COMPILE([#include <time.h>], [
|
||||
const int foo = CLOCK_MONOTONIC_COARSE;
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_CLOCK_MONOTONIC_COARSE, 1, [CLOCK_MONOTONIC_COARSE])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
AC_CHECK_FUNC(mach_absolute_time, [AC_DEFINE(HAVE_MACH_ABSOLUTE_TIME, 1, [mach_absolute_time])])
|
||||
AC_CHECK_FUNC(gethrtime, [AC_DEFINE(HAVE_GETHRTIME, 1, [gethrtime])])
|
||||
AC_CHECK_FUNC(read_real_time, [AC_DEFINE(HAVE_READ_REAL_TIME, 1, [read_real_time])])
|
||||
|
||||
dnl hires monotonic clock support
|
||||
AC_SEARCH_LIBS(clock_gettime, rt)
|
||||
@@ -1813,6 +1528,7 @@ if test x$host_win32 = xno; then
|
||||
AC_TRY_COMPILE([#include <sched.h>], [
|
||||
int mask = 1;
|
||||
sched_setaffinity(0, &mask);
|
||||
return 0;
|
||||
], [
|
||||
# Yes, we have it...
|
||||
AC_MSG_RESULT(yes)
|
||||
@@ -2396,7 +2112,11 @@ if test x$host_win32 = xno; then
|
||||
child ()
|
||||
{
|
||||
struct sigaction sa;
|
||||
#ifdef __APPLE__
|
||||
stack_t sas;
|
||||
#else
|
||||
struct sigaltstack sas;
|
||||
#endif
|
||||
pthread_t id;
|
||||
pthread_attr_t attr;
|
||||
|
||||
@@ -2791,7 +2511,7 @@ if test x$host_win32 = xno; then
|
||||
[#include <sys/types.h>
|
||||
#include <sys/vfs.h>])
|
||||
AC_CHECK_MEMBERS(
|
||||
[struct stat.st_atim, struct stat.st_mtim, struct stat.st_atimespec, struct stat.st_ctim],,,
|
||||
[struct stat.st_atim, struct stat.st_mtim, struct stat.st_ctim],,,
|
||||
[#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>])
|
||||
@@ -2833,14 +2553,6 @@ if test x$host_win32 = xno; then
|
||||
#endif
|
||||
])
|
||||
AC_CHECK_HEADERS([termios.h])
|
||||
|
||||
dnl *********************************
|
||||
dnl *** Checks for random ***
|
||||
dnl *********************************
|
||||
if test x$host_darwin = xno; then
|
||||
AC_CHECK_HEADERS(sys/random.h)
|
||||
AC_CHECK_FUNCS(getrandom getentropy)
|
||||
fi
|
||||
else
|
||||
dnl *********************************
|
||||
dnl *** Checks for Windows compilation ***
|
||||
@@ -3064,12 +2776,6 @@ case "{$build}" in
|
||||
NAME_DEV_RANDOM="/dev/srandom"
|
||||
;;
|
||||
|
||||
dnl IBM i does not have /dev/random, use unblocking only
|
||||
|
||||
*-*-os400*)
|
||||
NAME_DEV_RANDOM="/dev/urandom"
|
||||
;;
|
||||
|
||||
dnl Win32 does not have /dev/random, they have their own method...
|
||||
|
||||
*-mingw*|*-*-cygwin*)
|
||||
@@ -3391,6 +3097,7 @@ case "$host" in
|
||||
#if _MIPS_SIM != _ABIN32
|
||||
#error Not mips n32
|
||||
#endif
|
||||
return 0;
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
sizeof_register=8
|
||||
@@ -3440,9 +3147,6 @@ case "$host" in
|
||||
BTLS_PLATFORM=i386
|
||||
;;
|
||||
openbsd*|freebsd*|kfreebsd-gnu*)
|
||||
AOT_SUPPORTED="yes"
|
||||
BTLS_SUPPORTED=yes
|
||||
BTLS_PLATFORM=i386
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@@ -3467,9 +3171,6 @@ case "$host" in
|
||||
boehm_supported=false
|
||||
;;
|
||||
openbsd*|freebsd*|kfreebsd-gnu*)
|
||||
AOT_SUPPORTED="yes"
|
||||
BTLS_SUPPORTED=yes
|
||||
BTLS_PLATFORM=x86_64
|
||||
;;
|
||||
mingw*)
|
||||
;;
|
||||
@@ -3503,8 +3204,7 @@ case "$host" in
|
||||
INTL="intl"
|
||||
;;
|
||||
macppc-*-openbsd* | powerpc*-*-linux* | powerpc-*-openbsd* | \
|
||||
powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* | \
|
||||
powerpc-*-freebsd* | powerpc-*-aix* | powerpc-*-os400* )
|
||||
powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* | powerpc-*-freebsd* )
|
||||
if test "x$ac_cv_sizeof_void_p" = "x8"; then
|
||||
TARGET=POWERPC64;
|
||||
CPPFLAGS="$CPPFLAGS -D__mono_ppc__ -D__mono_ppc64__"
|
||||
@@ -3515,13 +3215,6 @@ case "$host" in
|
||||
fi
|
||||
arch_target=ppc;
|
||||
case $host_os in
|
||||
aix*|os400*)
|
||||
dnl on AIX/PASE, shared libraries can be inside archives
|
||||
dnl if they are, we specify them by lib.a(lib.so)
|
||||
dnl we may hardcode 64-bit names at times, but we don't do 32-bit AIX, so
|
||||
LIBC="libc.a(shr_64.o)"
|
||||
INTL="libintl.a(libintl.so.9)"
|
||||
;;
|
||||
linux*|darwin*)
|
||||
;;
|
||||
esac
|
||||
@@ -3585,7 +3278,6 @@ HOST=$TARGET
|
||||
if test "x$host" != "x$target"; then
|
||||
AC_DEFINE(MONO_CROSS_COMPILE,1,[The runtime is compiled for cross-compiling mode])
|
||||
enable_mcs_build=no
|
||||
enable_support_build=no
|
||||
BTLS_SUPPORTED=no
|
||||
case "$target" in
|
||||
arm*-darwin*)
|
||||
@@ -3865,6 +3557,7 @@ if test "x$target_mach" = "xyes"; then
|
||||
#if TARGET_IPHONE_SIMULATOR == 1 || TARGET_OS_IPHONE == 1
|
||||
#error fail this for ios
|
||||
#endif
|
||||
return 0;
|
||||
], [
|
||||
AC_DEFINE(TARGET_OSX,1,[The JIT/AOT targets OSX])
|
||||
CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_OSX"
|
||||
@@ -3909,6 +3602,14 @@ if test "x$have_deprecated" = "xyes"; then
|
||||
AC_DEFINE(HAVE_DEPRECATED, 1, [Support for the deprecated attribute])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(interpreter, [ --enable-interpreter Enable Interpreter], enable_interpreter=$enableval, enable_interpreter=no)
|
||||
|
||||
if test "x$enable_interpreter" = "xyes"; then
|
||||
AC_DEFINE(ENABLE_INTERPRETER, 1, [Enable Interpreter])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(ENABLE_INTERPRETER, [test x$enable_interpreter = xyes])
|
||||
|
||||
dnl
|
||||
dnl Simple Generational checks (sgen)
|
||||
dnl
|
||||
@@ -4098,19 +3799,7 @@ AC_SEARCH_LIBS(nanosleep, rt)
|
||||
|
||||
AC_SEARCH_LIBS(dlopen, dl)
|
||||
old_ldflags="${LDFLAGS}"
|
||||
# GNU specific option, this confuses IBM ld, but do offer alternatives when possible
|
||||
if test $lt_cv_prog_gnu_ld = yes; then
|
||||
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
|
||||
else
|
||||
case $host in
|
||||
*-*-aix*|*-*-os400*)
|
||||
;;
|
||||
*)
|
||||
dnl Try to use export-dynamic anyways
|
||||
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
|
||||
AC_TRY_LINK(, [int i;], found_export_dynamic=yes, found_export_dynamic=no)
|
||||
if test $found_export_dynamic = no; then
|
||||
LDFLAGS="${old_ldflags}"
|
||||
@@ -4132,7 +3821,7 @@ fi
|
||||
AC_SUBST(G_HAVE_ISO_VARARGS)
|
||||
|
||||
AC_CHECK_HEADERS(getopt.h sys/select.h sys/time.h sys/wait.h pwd.h iconv.h localcharset.h sys/types.h sys/resource.h)
|
||||
AC_CHECK_LIB([iconv], [locale_charset],[],[AC_CHECK_LIB([charset], [locale_charset],[LIBS+=" -liconv -lcharset"])])
|
||||
AC_CHECK_LIB([iconv], [locale_charset],[],[AC_CHECK_LIB([charset], [locale_charset],[LIBS+="-liconv -lcharset"])])
|
||||
AC_CHECK_HEADER(alloca.h, [HAVE_ALLOCA_H=1], [HAVE_ALLOCA_H=0])
|
||||
AC_SUBST(HAVE_ALLOCA_H)
|
||||
|
||||
@@ -4224,8 +3913,6 @@ if test "x$icall_tables" = "xno"; then
|
||||
AC_DEFINE(DISABLE_ICALL_TABLES, 1, [Icall tables disabled])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(DISABLE_ICALL_TABLES, test x$icall_tables = xno)
|
||||
|
||||
if test "x$with_tls" = "x__thread"; then
|
||||
AC_DEFINE(HAVE_KW_THREAD, 1, [Have __thread keyword])
|
||||
# Pass the information to libgc
|
||||
@@ -4276,6 +3963,7 @@ if test ${TARGET} = ARM; then
|
||||
#ifndef __ARM_PCS_VFP
|
||||
#error "Float ABI is not 'hard'"
|
||||
#endif
|
||||
return 0;
|
||||
], [
|
||||
fpu=VFP_HARD
|
||||
], [
|
||||
@@ -4289,6 +3977,7 @@ if test ${TARGET} = ARM; then
|
||||
#ifdef __SOFTFP__
|
||||
#error "Float ABI is not 'softfp'"
|
||||
#endif
|
||||
return 0;
|
||||
], [
|
||||
fpu=VFP
|
||||
], [
|
||||
@@ -4313,6 +4002,7 @@ if test ${TARGET} = ARM; then
|
||||
#if !defined(__ARM_ARCH_5T__) && !defined(__ARM_ARCH_5TE__) && !defined(__ARM_ARCH_5TEJ__)
|
||||
#error Not on ARM v5.
|
||||
#endif
|
||||
return 0;
|
||||
], [
|
||||
arm_v5=yes
|
||||
|
||||
@@ -4323,6 +4013,7 @@ if test ${TARGET} = ARM; then
|
||||
#if !defined(__ARM_ARCH_6J__) && !defined(__ARM_ARCH_6ZK__) && !defined(__ARM_ARCH_6K__) && !defined(__ARM_ARCH_6T2__) && !defined(__ARM_ARCH_6M__)
|
||||
#error Not on ARM v6.
|
||||
#endif
|
||||
return 0;
|
||||
], [
|
||||
arm_v5=yes
|
||||
arm_v6=yes
|
||||
@@ -4334,6 +4025,7 @@ if test ${TARGET} = ARM; then
|
||||
#if !defined(__ARM_ARCH_7A__) && !defined(__ARM_ARCH_7R__) && !defined(__ARM_ARCH_7EM__) && !defined(__ARM_ARCH_7M__) && !defined(__ARM_ARCH_7S__)
|
||||
#error Not on ARM v7.
|
||||
#endif
|
||||
return 0;
|
||||
], [
|
||||
arm_v5=yes
|
||||
arm_v6=yes
|
||||
@@ -4545,14 +4237,9 @@ dnl *** Btls ***
|
||||
dnl **************
|
||||
|
||||
AC_ARG_ENABLE(btls, [ --disable-btls Disable the BoringTls provider], enable_btls=$enableval, enable_btls=$BTLS_SUPPORTED)
|
||||
AC_ARG_ENABLE(btls-lib, [ --disable-btls-lib Disable building the BTLS native library], enable_btls_lib=$enableval, enable_btls_lib=$BTLS_SUPPORTED)
|
||||
AC_ARG_WITH(btls_android_ndk, [ --with-btls-android-ndk Android NDK for BoringTls])
|
||||
|
||||
if test "x$enable_btls" = "xno"; then
|
||||
enable_btls_lib=no
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(BTLS, test x$enable_btls_lib = xyes)
|
||||
AM_CONDITIONAL(BTLS, test x$enable_btls = xyes)
|
||||
|
||||
btls_android=no
|
||||
if test "x$enable_btls" = "xyes"; then
|
||||
@@ -4591,22 +4278,22 @@ if test "x$enable_btls" = "xyes"; then
|
||||
btls_arch=aarch64
|
||||
;;
|
||||
android-armv5)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=14"
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=12"
|
||||
;;
|
||||
android-armv6)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=14"
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=12"
|
||||
;;
|
||||
android-armv7)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi-v7a\" -DANDROID_NATIVE_API_LEVEL=14"
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi-v7a\" -DANDROID_NATIVE_API_LEVEL=12"
|
||||
;;
|
||||
android-v8a)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"arm64-v8a\" -DANDROID_NATIVE_API_LEVEL=21"
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"arm64-v8a\" -DANDROID_NATIVE_API_LEVEL=12"
|
||||
;;
|
||||
android-x86)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"x86\" -DANDROID_NATIVE_API_LEVEL=14"
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"x86\" -DANDROID_NATIVE_API_LEVEL=12"
|
||||
;;
|
||||
android-x64)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"x86_64\" -DANDROID_NATIVE_API_LEVEL=21"
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"x86_64\" -DANDROID_NATIVE_API_LEVEL=12"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(Invalid BTLS platform)
|
||||
@@ -4648,7 +4335,6 @@ AC_SUBST(docs_dir)
|
||||
|
||||
## Maybe should also disable if mcsdir is invalid. Let's punt the issue for now.
|
||||
AM_CONDITIONAL(BUILD_MCS, [test x$cross_compiling = xno && test x$enable_mcs_build != xno])
|
||||
AM_CONDITIONAL(BUILD_SUPPORT, [test x$enable_support_build != xno])
|
||||
|
||||
libmono_ldflags="$libmono_ldflags $LIBS"
|
||||
|
||||
@@ -4696,7 +4382,7 @@ AC_SUBST(mono_build_root)
|
||||
mono_runtime=mono/mini/mono
|
||||
AC_SUBST(mono_runtime)
|
||||
|
||||
CSC_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/Microsoft.Net.Compilers.2.6.0/tools/csc.exe
|
||||
CSC_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/Microsoft.Net.Compilers.2.3.2/tools/csc.exe
|
||||
|
||||
if test $csc_compiler = mcs; then
|
||||
CSC=$mcs_topdir/class/lib/build/mcs.exe
|
||||
@@ -4892,7 +4578,6 @@ scripts/mono-find-requires
|
||||
mono/Makefile
|
||||
mono/btls/Makefile
|
||||
mono/utils/Makefile
|
||||
mono/utils/jemalloc/Makefile
|
||||
mono/metadata/Makefile
|
||||
mono/dis/Makefile
|
||||
mono/cil/Makefile
|
||||
@@ -5075,11 +4760,6 @@ fi
|
||||
if test "x$AOT_BUILD_FLAGS" != "x" ; then
|
||||
echo "AOT_RUN_FLAGS=$AOT_RUN_FLAGS" >> $srcdir/$mcsdir/build/config.make
|
||||
echo "AOT_BUILD_FLAGS=$AOT_BUILD_FLAGS" >> $srcdir/$mcsdir/build/config.make
|
||||
echo "AOT_BUILD_ATTRS=$AOT_BUILD_ATTRS" >> $srcdir/$mcsdir/build/config.make
|
||||
fi
|
||||
|
||||
if test "x$AOT_MODE" != "x" ; then
|
||||
echo "AOT_MODE=$AOT_MODE" >> $srcdir/$mcsdir/build/config.make
|
||||
fi
|
||||
|
||||
if test "x$enable_btls" = "xyes"; then
|
||||
@@ -5115,7 +4795,7 @@ echo "
|
||||
BigArrays: $enable_big_arrays
|
||||
DTrace: $enable_dtrace
|
||||
LLVM Back End: $enable_llvm (dynamically loaded: $enable_loadedllvm)
|
||||
Spectre: $spectre_mitigation_status
|
||||
Interpreter: $enable_interpreter
|
||||
|
||||
Libraries:
|
||||
.NET 4.x: $with_profile4_x
|
||||
@@ -5127,13 +4807,11 @@ echo "
|
||||
Windows AOT: $with_winaot
|
||||
Orbis: $with_orbis
|
||||
Unreal: $with_unreal
|
||||
WebAssembly: $with_wasm
|
||||
Test profiles: AOT Full ($with_testing_aot_full), AOT Hybrid ($with_testing_aot_hybrid)
|
||||
JNI support: $jdk_headers_found
|
||||
libgdiplus: $libgdiplus_msg
|
||||
zlib: $zlib_msg
|
||||
BTLS: $enable_btls$btls_platform_string
|
||||
jemalloc: $with_jemalloc (always use: $with_jemalloc_always)
|
||||
$disabled
|
||||
"
|
||||
if test x$with_static_mono = xno -a "x$host_win32" != "xyes"; then
|
||||
|
||||
+2
-2
@@ -11,9 +11,9 @@ def print_frames(thread, num_frames, current_thread):
|
||||
pc = str(frame.addr)
|
||||
var = frame
|
||||
function_name = frame.GetFunctionName()
|
||||
if function_name == "interp_exec_method_full":
|
||||
if function_name == "ves_exec_method_with_context":
|
||||
try:
|
||||
s = 'frame->imethod->method'
|
||||
s = 'frame->runtime_method->method'
|
||||
klassname = frame.EvaluateExpression('(char*) ' + s + '->klass->name').summary[1:-1]
|
||||
methodname = frame.EvaluateExpression('(char*) ' + s + '->name').summary[1:-1]
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
<section name="assemblyBinding" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
|
||||
<section name="satelliteassemblies" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
|
||||
<section name="startup" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false"/>
|
||||
<section name="system.codedom" type="System.CodeDom.Compiler.CodeDomConfigurationHandler, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="system.data" type="System.Data.Common.DbProviderFactoriesConfigurationHandler, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="system.diagnostics" type="System.Diagnostics.SystemDiagnosticsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="system.runtime.remoting" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
|
||||
<section name="system.windows.forms" type="System.Windows.Forms.WindowsFormsSection, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="system.codedom" type="System.CodeDom.Compiler.CodeDomConfigurationHandler, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="windows" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
|
||||
<section name="strongNames" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
|
||||
<sectionGroup name="system.runtime.serialization" type="System.Runtime.Serialization.Configuration.SerializationSectionGroup, System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
|
||||
@@ -43,16 +43,6 @@
|
||||
line-height: 0px;
|
||||
}
|
||||
|
||||
.mapi-codeblock {
|
||||
display: block;
|
||||
padding: 5pt 5pt;
|
||||
margin: 10pt;
|
||||
white-space: pre;
|
||||
font-family: monospace;
|
||||
border: 1px solid rgba(233,233,233,1);
|
||||
background-color: rgba(249,249,249,1);
|
||||
}
|
||||
|
||||
.mapi-entry code {
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
|
||||
+1
-1
@@ -69,5 +69,5 @@ object for filters is passed in a local variable (cfg->exvar).
|
||||
throw: we first save all regs into a sigcontext struct and then call the stack
|
||||
unwinding code.
|
||||
|
||||
catch handler: catch handlers are always called from the stack unwinding
|
||||
catch handler: catch hanlders are always called from the stack unwinding
|
||||
code. The exception object is passed in a local variable (cfg->exvar).
|
||||
+4
-20
@@ -124,7 +124,6 @@ sub process_function {
|
||||
my $body = '';
|
||||
my $returns = '';
|
||||
my $prototype = '';
|
||||
my $codeblock = 'false';
|
||||
|
||||
while (<$file>) {
|
||||
|
||||
@@ -157,6 +156,7 @@ sub process_function {
|
||||
if (defined($deprecated)) {
|
||||
process_formatting(\$deprecated, $file_path, $.);
|
||||
}
|
||||
$body =~ s/\n/ /g;
|
||||
|
||||
if (exists($docs->{body}->{$name})) {
|
||||
my $origin = $docs->{origin}->{$name};
|
||||
@@ -180,16 +180,8 @@ sub process_function {
|
||||
chomp;
|
||||
s/^ +\*//;
|
||||
|
||||
if (/\s*\\code$/) {
|
||||
$codeblock = 'true';
|
||||
} elsif (/\s*\\endcode$/) {
|
||||
$codeblock = 'false';
|
||||
}
|
||||
|
||||
# Replace blank lines with paragraph breaks if we're not in a code block.
|
||||
if (/^\s*$/) {
|
||||
$_ = '<p>' if $codeblock eq 'false';
|
||||
}
|
||||
# Replace blank lines with paragraph breaks.
|
||||
$_ = '<p>' if /^\s*$/;
|
||||
|
||||
if ($section == $PARAMETER_SECTION) {
|
||||
if (/\s*\\param +(\w+)(.*)/) {
|
||||
@@ -218,7 +210,7 @@ sub process_function {
|
||||
$returns = "\t$_\n";
|
||||
$section = $RETURN_SECTION;
|
||||
} else {
|
||||
$body .= "\n$_";
|
||||
$body .= "\n\t$_";
|
||||
}
|
||||
} elsif ($section == $RETURN_SECTION) {
|
||||
$returns .= "\n\t$_";
|
||||
@@ -235,12 +227,6 @@ sub process_formatting {
|
||||
my ($content, $file_path, $current_line) = @_;
|
||||
$_ = $$content;
|
||||
|
||||
# General formatting
|
||||
s{\\b +(\w+)}{<strong>$1</strong>}g;
|
||||
s{\\a +(\w+)}{<i>$1</i>}g;
|
||||
s{\\e +(\w+)}{<i>$1</i>}g;
|
||||
s{\\em +(\w+)}{<i>$1</i>}g;
|
||||
|
||||
# Constants
|
||||
s{NULL}{<code>NULL</code>}g;
|
||||
s{TRUE}{<code>TRUE</code>}g;
|
||||
@@ -257,8 +243,6 @@ sub process_formatting {
|
||||
warn "$file_path:$current_line: Old-style monodoc notation '`code`' used\n"
|
||||
if s{\`((?!api:)[:.\w\*]+)\`}{<code>$1</code>}g && $WARNINGS;
|
||||
s{\\c +(\S+(?<![.,:;]))}{<code>$1</code>}g;
|
||||
s{\\code}{<pre><code class="mapi-codeblock">}g;
|
||||
s{\\endcode}{</code></pre>}g;
|
||||
|
||||
$$content = $_;
|
||||
}
|
||||
|
||||
@@ -1,193 +1,73 @@
|
||||
<h1>Runtime Profiler API</h1>
|
||||
<h1>Profiling Interface</h1>
|
||||
|
||||
<p>The profiler API can be used by dynamically loaded profiler
|
||||
modules to monitor different aspects of a running program. The
|
||||
API is also usable by embedders without having to compile a
|
||||
profiler module.
|
||||
<h3>Profiler Operation</h3>
|
||||
|
||||
<h2>Profiler Modules</h2>
|
||||
<p>The following methods can be used by dynamic profiler
|
||||
methods to monitor different aspects of the program.
|
||||
|
||||
<p>A profiler module is simply a shared library with a single
|
||||
exported function which is the entry point that Mono calls at
|
||||
startup. It must have the following signature:
|
||||
<p>A custom profiler will have one public method defined in
|
||||
the shared library which is the entry point that Mono calls at
|
||||
startup, it has the following signature:
|
||||
|
||||
<pre><code class="mapi-codeblock">
|
||||
void mono_profiler_startup_example (const char *desc)
|
||||
</code></pre>
|
||||
<pre>
|
||||
void mono_profiler_startup (const char *desc)
|
||||
</pre>
|
||||
|
||||
<p>Here, the <code>example</code> portion of the function name is
|
||||
the name of the profiler module. It must match the shared library
|
||||
name (i.e. <code>libmono-profiler-example.so</code>). <i>desc</i>
|
||||
is the set of arguments that were passed from the command line.
|
||||
<p>Where "desc" is the set of arguments that were passed from
|
||||
the command line. This routine will call
|
||||
<tt>mono_profiler_install</tt> to activate the profiler and
|
||||
will install one or more filters (one of the various
|
||||
<tt>mono_profiler_install_</tt> functions).
|
||||
|
||||
<p>For example, a bare bones profiler module might look like this
|
||||
(<code>example.c</code>):
|
||||
<p>In addition, a profiler developer will typically call
|
||||
<tt>mono_profiler_set_events</tt> to register which kinds of
|
||||
traces should be enabled, these can be an OR-ed combination of
|
||||
the following:
|
||||
|
||||
<pre><code class="mapi-codeblock">
|
||||
#include <mono/metadata/profiler.h>
|
||||
#include <stdio.h>
|
||||
<pre>
|
||||
MONO_PROFILE_NONE
|
||||
MONO_PROFILE_APPDOMAIN_EVENTS
|
||||
MONO_PROFILE_ASSEMBLY_EVENTS
|
||||
MONO_PROFILE_MODULE_EVENTS
|
||||
MONO_PROFILE_CLASS_EVENTS
|
||||
MONO_PROFILE_JIT_COMPILATION
|
||||
MONO_PROFILE_INLINING
|
||||
MONO_PROFILE_EXCEPTIONS
|
||||
MONO_PROFILE_ALLOCATIONS
|
||||
MONO_PROFILE_GC
|
||||
MONO_PROFILE_THREADS
|
||||
MONO_PROFILE_REMOTING
|
||||
MONO_PROFILE_TRANSITIONS
|
||||
MONO_PROFILE_ENTER_LEAVE
|
||||
MONO_PROFILE_COVERAGE
|
||||
MONO_PROFILE_INS_COVERAGE
|
||||
MONO_PROFILE_STATISTICAL
|
||||
</pre>
|
||||
|
||||
struct _MonoProfiler {
|
||||
int dummy;
|
||||
}
|
||||
<p>Developers can change the set of monitored events at
|
||||
runtime by calling <tt>mono_profiler_set_events</tt>.
|
||||
|
||||
<h4><a name="api:mono_profiler_install">mono_profiler_install</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_allocation">mono_profiler_install_allocation</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_appdomain">mono_profiler_install_appdomain</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_assembly">mono_profiler_install_assembly</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_class">mono_profiler_install_class</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_coverage_filter">mono_profiler_install_coverage_filter</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_enter_leave">mono_profiler_install_enter_leave</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_jit_compile">mono_profiler_install_jit_compile</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_module">mono_profiler_install_module</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_thread">mono_profiler_install_thread</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_transition">mono_profiler_install_transition</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_gc">mono_profiler_install_gc</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_statistical">mono_profiler_install_statistical</a></h4>
|
||||
<h4><a name="api:mono_profiler_set_events">mono_profiler_set_events</a></h4>
|
||||
<h4><a name="api:mono_profiler_get_events">mono_profiler_get_events</a></h4>
|
||||
|
||||
static MonoProfiler profiler;
|
||||
<h3>Coverage</h3>
|
||||
|
||||
static void
|
||||
runtime_inited (MonoProfiler *prof)
|
||||
{
|
||||
printf ("Hello World");
|
||||
}
|
||||
<p>To support profiling modules that need to do code coverage
|
||||
analysis, the following routines is provided:
|
||||
|
||||
<h4><a name="api:mono_profiler_coverage_get">mono_profiler_coverage_get</a></h4>
|
||||
|
||||
void
|
||||
mono_profiler_init_example (const char *desc)
|
||||
{
|
||||
MonoProfilerHandle handle = mono_profiler_create (&profiler);
|
||||
mono_profiler_set_runtime_initialized_callback (handle, runtime_inited);
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p>To compile this module, a C compiler must be invoked in a
|
||||
similar fashion to this, on Linux:
|
||||
|
||||
<pre><code class="mapi-codeblock">
|
||||
gcc -fPIC -shared -o libmono-profiler-example.so example.c `pkg-config --cflags mono-2`
|
||||
</code></pre>
|
||||
|
||||
<p>Or on OS X:
|
||||
|
||||
<pre><code class="mapi-codeblock">
|
||||
gcc -undefined suppress -flat_namespace -o libmono-profiler-example.so example.c `pkg-config --cflags mono-2`
|
||||
</code></pre>
|
||||
|
||||
<p>You can then load the module using:
|
||||
|
||||
<pre><code class="mapi-codeblock">
|
||||
mono --profile=example hello.exe
|
||||
</code></pre>
|
||||
|
||||
<p>(Note that adjusting <code>LD_LIBRARY_PATH</code> may be
|
||||
necessary in order for the dynamic linker to find the module.)
|
||||
|
||||
<h2>Profiler Functions</h2>
|
||||
|
||||
<p>These are the functions usable for profiling programs.
|
||||
|
||||
<p>Each function has a note indicating whether they're async
|
||||
safe. An async safe function can be invoked in a signal handler
|
||||
or when the world is stopped by the GC. Conversely, a function
|
||||
that is not async safe must not be invoked in such a context or
|
||||
undefined behavior can occur (crashes, deadlocks, etc).
|
||||
|
||||
<p>Some functions may only be invoked from a profiler module's
|
||||
init function (or prior to running managed code in the case of
|
||||
embedding). This is noted explicitly only if applicable to a
|
||||
function.
|
||||
|
||||
<h3>Basic Functions</h3>
|
||||
|
||||
<p>These functions are used to load and install profilers.
|
||||
|
||||
<h4><a name="api:mono_profiler_load">mono_profiler_load</a></h4>
|
||||
<h4><a name="api:mono_profiler_create">mono_profiler_create</a></h4>
|
||||
<h4><a name="api:mono_profiler_set_cleanup_callback">mono_profiler_set_cleanup_callback</a></h4>
|
||||
|
||||
<h3>Code Coverage</h3>
|
||||
|
||||
<p>These functions provide access to the JIT compiler's code
|
||||
coverage support. This functionality can be used to collect
|
||||
information about how many times certain code paths have been
|
||||
executed.
|
||||
|
||||
<h4><a name="api:mono_profiler_enable_coverage">mono_profiler_enable_coverage</a></h4>
|
||||
<h4><a name="api:mono_profiler_set_coverage_filter_callback">mono_profiler_set_coverage_filter_callback</a></h4>
|
||||
<h4><a name="api:mono_profiler_get_coverage_data">mono_profiler_get_coverage_data</a></h4>
|
||||
|
||||
<h3>Statistical Sampling</h3>
|
||||
|
||||
<p>Statistical sampling can be used to interrupt managed threads
|
||||
based on a certain mode and frequency for the purpose of
|
||||
collecting data about their current work.
|
||||
|
||||
<p>One common use case for this functionality, usually referred
|
||||
to as call sampling, is to collect a backtrace from every thread
|
||||
when a sampling hit event arrives. This data can then be compiled
|
||||
into a report indicating where a program spends most of its time.
|
||||
|
||||
<h4><a name="api:mono_profiler_enable_sampling">mono_profiler_enable_sampling</a></h4>
|
||||
<h4><a name="api:mono_profiler_set_sample_mode">mono_profiler_set_sample_mode</a></h4>
|
||||
<h4><a name="api:mono_profiler_get_sample_mode">mono_profiler_get_sample_mode</a></h4>
|
||||
|
||||
<p>A callback must be registered to receive sample hit events.
|
||||
Please see the <i>Callback Registration</i> section below.
|
||||
|
||||
<h3>GC Allocations</h3>
|
||||
|
||||
<p>Profilers can be notified about all GC allocations performed
|
||||
by a program or the Mono runtime.
|
||||
|
||||
<h4><a name="api:mono_profiler_enable_allocations">mono_profiler_enable_allocations</a></h4>
|
||||
|
||||
<p>A callback must be registered to receive allocation events.
|
||||
Please see the <i>Callback Registration</i> section below.
|
||||
|
||||
<h3>Call Instrumentation</h3>
|
||||
|
||||
<p>The JIT compiler supports instrumenting managed method entry
|
||||
and exit points so that a profiler callback will be invoked.
|
||||
|
||||
<p>While such callbacks by themselves have traditionally only
|
||||
been useful for call count profiling and the like, Mono gives
|
||||
these callbacks access to the arguments, locals, and return
|
||||
value of instrumented methods (together referred to as the 'call
|
||||
context'). This enables many profiling scenarios that would
|
||||
otherwise have required explicit hooks in the base class
|
||||
libraries.
|
||||
|
||||
<h4><a name="api:mono_profiler_set_call_instrumentation_filter_callback">mono_profiler_set_call_instrumentation_filter_callback</a></h4>
|
||||
<h4><a name="api:mono_profiler_enable_call_context_introspection">mono_profiler_enable_call_context_introspection</a></h4>
|
||||
<h4><a name="api:mono_profiler_call_context_get_this">mono_profiler_call_context_get_this</a></h4>
|
||||
<h4><a name="api:mono_profiler_call_context_get_argument">mono_profiler_call_context_get_argument</a></h4>
|
||||
<h4><a name="api:mono_profiler_call_context_get_local">mono_profiler_call_context_get_local</a></h4>
|
||||
<h4><a name="api:mono_profiler_call_context_get_result">mono_profiler_call_context_get_result</a></h4>
|
||||
<h4><a name="api:mono_profiler_call_context_free_buffer">mono_profiler_call_context_free_buffer</a></h4>
|
||||
|
||||
<p>Callbacks must be registered to receive method entry and exit
|
||||
events. Please see the <i>Callback Registration</i> section
|
||||
below.
|
||||
|
||||
<h3>Callback Registration</h3>
|
||||
|
||||
<p>In addition to the above functions, there's a large set of
|
||||
functions for installing generic profiler event callbacks. These
|
||||
are generated from C macros and so are not documented here.
|
||||
Please refer to the <code>mono/metadata/profiler.h</code> and
|
||||
<code>mono/metadata/profiler-events.h</code> headers for a full
|
||||
listing of these.
|
||||
|
||||
<p>Callback registration functions are all async safe and can be
|
||||
safely invoked from multiple threads at the same time, with the
|
||||
caveat that altering a registered callback from one thread will
|
||||
not immediately affect another thread that is already invoking
|
||||
the current callback.
|
||||
|
||||
<h2>API Stability</h2>
|
||||
|
||||
<p>The profiler API does not have the same API stability
|
||||
garantees that the rest of the Mono embedding API does. While
|
||||
a breaking change to the profiler API is extremely rare, it has
|
||||
happened in the past when changing the API in a backwards
|
||||
compatible way was deemed to be too much work for too little
|
||||
gain.
|
||||
|
||||
<p>Therefore, developers of profiler modules may rarely need to
|
||||
update their code to work with new versions of the profiler API.
|
||||
|
||||
<p>Developers who wish to support older versions of the API can
|
||||
perform a compile time check of the
|
||||
<code>MONO_PROFILER_API_VERSION</code> macro and maintain code
|
||||
for both old and new versions.
|
||||
|
||||
<p>To aid with transitioning to a new version of the profiler
|
||||
API, the Mono runtime will detect and reject loading profiler
|
||||
modules which were compiled against older profiler API versions.
|
||||
Vendored
+1
-1
Submodule external/api-snapshot updated: 747f69d6d9...08ec62bbd3.
Vendored
+1
-1
Submodule external/binary-reference-assemblies updated: e048fe4a88...9c5cc7f051.
Vendored
+1
-1
Submodule external/bockbuild updated: cee494cc15...f2c8f2e7fb.
Vendored
+1
-1
Submodule external/boringssl updated: 2ba8564f8b...3e0770e188.
Vendored
+1
-1
Submodule external/cecil updated: b6c50e3d34...bc11f47295.
Vendored
+1
-1
Submodule external/corefx updated: f2c0be7e62...cb1b049c95.
Vendored
+1
-1
Submodule external/corert updated: aa64b376c1...48dba73801.
Vendored
+1
-1
Submodule external/ikdasm updated: 465c081555...3aef9cdd60.
Vendored
+1
-1
Submodule external/linker updated: dccb0d2378...99354bf5c1.
Vendored
+1
-1
Submodule external/nuget-buildtasks updated: b2c30bc81b...9e04cc7f41.
Vendored
+1
-1
Submodule external/nunit-lite updated: 00e259a4bd...764656cdaf.
Vendored
+1
-1
Submodule external/roslyn-binaries updated: ab3485efcd...1904c7d068.
Vendored
+1
-1
Submodule external/xunit-binaries updated: 9df2dda529...d4433b0972.
+1
-1
@@ -49,7 +49,7 @@ obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
|
||||
solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c \
|
||||
backgraph.c win32_threads.c \
|
||||
pthread_support.c pthread_stop_world.c darwin_stop_world.c \
|
||||
mach_dep.c $(asm_libgc_sources)
|
||||
openbsd_stop_world.c mach_dep.c $(asm_libgc_sources)
|
||||
|
||||
# Include THREADDLLIBS here to ensure that the correct versions of
|
||||
# linuxthread semaphore functions get linked:
|
||||
|
||||
@@ -104,10 +104,6 @@ case "$THREADS" in
|
||||
AC_DEFINE(GC_AIX_THREADS)
|
||||
AC_DEFINE(_REENTRANT)
|
||||
;;
|
||||
*-*-haiku*)
|
||||
AC_DEFINE(GC_HAIKU_THREADS)
|
||||
AC_DEFINE(_REENTRANT)
|
||||
;;
|
||||
*-*-hpux*)
|
||||
AC_MSG_WARN("Only HP/UX 11 threads are supported.")
|
||||
AC_DEFINE(GC_HPUX_THREADS)
|
||||
|
||||
+1
-18
@@ -59,7 +59,7 @@
|
||||
!(defined(FREEBSD) && defined(__ELF__)) && \
|
||||
!(defined(OPENBSD) && (defined(__ELF__) || defined(M68K))) && \
|
||||
!(defined(NETBSD) && defined(__ELF__)) && !defined(HURD) && \
|
||||
!defined(DARWIN) && !defined(HAIKU)
|
||||
!defined(DARWIN)
|
||||
--> We only know how to find data segments of dynamic libraries for the
|
||||
--> above. Additional SVR4 variants might not be too
|
||||
--> hard to add.
|
||||
@@ -1258,23 +1258,6 @@ GC_bool GC_register_main_static_data()
|
||||
|
||||
#endif /* DARWIN */
|
||||
|
||||
#if defined(HAIKU)
|
||||
|
||||
#include <kernel/image.h>
|
||||
|
||||
void GC_register_dynamic_libraries()
|
||||
{
|
||||
image_info info;
|
||||
int32 cookie = 0;
|
||||
while (get_next_image_info(0, &cookie, &info) == B_OK)
|
||||
{
|
||||
void *data = info.data;
|
||||
GC_add_roots_inner(data, data + info.data_size, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* HAIKU */
|
||||
|
||||
#else /* !DYNAMIC_LOADING */
|
||||
|
||||
#ifdef PCR
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) || \
|
||||
defined(GC_DGUX386_THREADS) || defined(GC_DARWIN_THREADS) || \
|
||||
defined(GC_AIX_THREADS) || defined(GC_NETBSD_THREADS) || \
|
||||
defined(GC_OPENBSD_THREADS) || defined(GC_HAIKU_THREADS) ||\
|
||||
defined(GC_OPENBSD_THREADS) || \
|
||||
(defined(GC_WIN32_THREADS) && defined(__CYGWIN32__))
|
||||
# define GC_PTHREADS
|
||||
# endif
|
||||
|
||||
@@ -1979,8 +1979,6 @@ void GC_err_puts GC_PROTO((GC_CONST char *s));
|
||||
/* Linuxthreads itself uses SIGUSR1 and SIGUSR2. */
|
||||
# define SIG_SUSPEND SIGPWR
|
||||
# endif
|
||||
# elif defined(GC_OPENBSD_THREADS)
|
||||
# define SIG_SUSPEND SIGXFSZ
|
||||
# else /* !GC_LINUX_THREADS */
|
||||
# if defined(_SIGRTMIN)
|
||||
# define SIG_SUSPEND _SIGRTMIN + 6
|
||||
|
||||
@@ -238,16 +238,6 @@
|
||||
# define BEOS
|
||||
# define mach_type_known
|
||||
# endif
|
||||
# if defined(__HAIKU__) && defined(_X86_)
|
||||
# define I386
|
||||
# define HAIKU
|
||||
# define mach_type_known
|
||||
# endif
|
||||
# if defined(__HAIKU__) && defined(__amd64__)
|
||||
# define X86_64
|
||||
# define HAIKU
|
||||
# define mach_type_known
|
||||
# endif
|
||||
# if defined(LINUX) && (defined(i386) || defined(__i386__))
|
||||
# define I386
|
||||
# define mach_type_known
|
||||
@@ -1174,15 +1164,6 @@
|
||||
extern int etext[];
|
||||
# define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))
|
||||
# endif
|
||||
# ifdef HAIKU
|
||||
# define OS_TYPE "HAIKU"
|
||||
# include <OS.h>
|
||||
# define GETPAGESIZE() B_PAGE_SIZE
|
||||
extern int etext[];
|
||||
# define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))
|
||||
# define DYNAMIC_LOADING
|
||||
# define MPROTECT_VDB
|
||||
# endif
|
||||
# ifdef SUNOS5
|
||||
# define OS_TYPE "SUNOS5"
|
||||
extern int _etext[], _end[];
|
||||
@@ -2153,15 +2134,6 @@
|
||||
/* There seems to be some issues with trylock hanging on darwin. This
|
||||
should be looked into some more */
|
||||
# endif
|
||||
# ifdef HAIKU
|
||||
# define OS_TYPE "HAIKU"
|
||||
# include <OS.h>
|
||||
# define GETPAGESIZE() B_PAGE_SIZE
|
||||
extern int etext[];
|
||||
# define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))
|
||||
# define DYNAMIC_LOADING
|
||||
# define MPROTECT_VDB
|
||||
# endif
|
||||
# ifdef FREEBSD
|
||||
# define OS_TYPE "FREEBSD"
|
||||
# ifndef GC_FREEBSD_THREADS
|
||||
@@ -2279,7 +2251,7 @@
|
||||
# if defined(SVR4) || defined(LINUX) || defined(IRIX5) || defined(HPUX) \
|
||||
|| defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) \
|
||||
|| defined(DGUX) || defined(BSD) || defined(SUNOS4) \
|
||||
|| defined(_AIX) || defined(DARWIN) || defined(OSF1) || defined(HAIKU)
|
||||
|| defined(_AIX) || defined(DARWIN) || defined(OSF1)
|
||||
# define UNIX_LIKE /* Basic Unix-like system calls work. */
|
||||
# endif
|
||||
|
||||
@@ -2535,9 +2507,6 @@
|
||||
# if defined(SN_TARGET_PS3)
|
||||
extern void *ps3_get_mem (size_t size);
|
||||
# define GET_MEM(bytes) (struct hblk*) ps3_get_mem (bytes)
|
||||
# elif defined(HAIKU)
|
||||
ptr_t GC_haiku_get_mem(GC_word bytes);
|
||||
# define GET_MEM(bytes) (struct hblk*)GC_haiku_get_mem(bytes)
|
||||
# else
|
||||
extern ptr_t GC_unix_get_mem(word size);
|
||||
# define GET_MEM(bytes) (struct hblk *)GC_unix_get_mem(bytes)
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef GC_OPENBSD_STOP_WORLD_H
|
||||
#define GC_OPENBSD_STOP_WORLD_H
|
||||
|
||||
#if !defined(GC_OPENBSD_THREADS)
|
||||
#error openbsd_stop_world.h included without GC_OPENBSD_THREADS defined
|
||||
#endif
|
||||
|
||||
struct thread_stop_info {
|
||||
ptr_t stack_ptr; /* Valid only when stopped. */
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
#if defined(GC_DARWIN_THREADS)
|
||||
# include "private/darwin_stop_world.h"
|
||||
#elif defined(GC_OPENBSD_THREADS)
|
||||
# include "private/openbsd_stop_world.h"
|
||||
#else
|
||||
# include "private/pthread_stop_world.h"
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
#include "private/pthread_support.h"
|
||||
|
||||
/* derived from pthread_stop_world.c */
|
||||
|
||||
# if defined(GC_OPENBSD_THREADS)
|
||||
|
||||
#define THREAD_EQUAL(id1, id2) pthread_equal(id1, id2)
|
||||
|
||||
/* We hold allocation lock. Should do exactly the right thing if the */
|
||||
/* world is stopped. Should not fail if it isn't. */
|
||||
void GC_push_all_stacks()
|
||||
{
|
||||
GC_bool found_me = FALSE;
|
||||
size_t nthreads = 0;
|
||||
int i;
|
||||
GC_thread p;
|
||||
ptr_t lo, hi;
|
||||
pthread_t me = pthread_self();
|
||||
|
||||
if (!GC_thr_initialized) GC_thr_init();
|
||||
# if DEBUG_THREADS
|
||||
GC_printf("Pushing stacks from thread 0x%x\n", (unsigned) me);
|
||||
# endif
|
||||
for (i = 0; i < THREAD_TABLE_SZ; i++) {
|
||||
for (p = GC_threads[i]; p != 0; p = p -> next) {
|
||||
if (p -> flags & FINISHED) continue;
|
||||
++nthreads;
|
||||
if (THREAD_EQUAL(p -> id, me)) {
|
||||
# ifdef SPARC
|
||||
lo = (ptr_t)GC_save_regs_in_stack();
|
||||
# else
|
||||
lo = GC_approx_sp();
|
||||
# endif
|
||||
found_me = TRUE;
|
||||
} else {
|
||||
lo = p -> stop_info.stack_ptr;
|
||||
}
|
||||
if ((p -> flags & MAIN_THREAD) == 0) {
|
||||
hi = p -> stack_end;
|
||||
} else {
|
||||
/* The original stack. */
|
||||
hi = GC_stackbottom;
|
||||
}
|
||||
# if DEBUG_THREADS
|
||||
GC_printf("Stack for thread 0x%x = [%p,%p)\n",
|
||||
(unsigned)(p -> id), lo, hi);
|
||||
# endif
|
||||
if (0 == lo) ABORT("GC_push_all_stacks: sp not set!\n");
|
||||
# ifdef STACK_GROWS_UP
|
||||
/* We got them backwards! */
|
||||
GC_push_all_stack(hi, lo);
|
||||
# else
|
||||
GC_push_all_stack(lo, hi);
|
||||
# endif
|
||||
}
|
||||
}
|
||||
if (!found_me && !GC_in_thread_creation)
|
||||
ABORT("Collecting from unknown thread.");
|
||||
}
|
||||
|
||||
/* We hold the allocation lock. Suspend all threads that might */
|
||||
/* still be running. */
|
||||
void GC_suspend_all()
|
||||
{
|
||||
int i;
|
||||
GC_thread p;
|
||||
int result;
|
||||
pthread_t my_thread = pthread_self();
|
||||
|
||||
for (i = 0; i < THREAD_TABLE_SZ; i++) {
|
||||
for (p = GC_threads[i]; p != 0; p = p -> next) {
|
||||
if (!THREAD_EQUAL(p -> id, my_thread)) {
|
||||
if (p -> flags & FINISHED) continue;
|
||||
if (p -> thread_blocked) /* Will wait */ continue;
|
||||
# if DEBUG_THREADS
|
||||
GC_printf("Suspending thread 0x%x\n",
|
||||
(unsigned)(p -> id));
|
||||
# endif
|
||||
|
||||
if (pthread_suspend_np(p -> id) != 0)
|
||||
ABORT("pthread_suspend_np failed");
|
||||
|
||||
/*
|
||||
* This will only work for userland pthreads. It will
|
||||
* fail badly on rthreads. Perhaps we should consider
|
||||
* a pthread_sp_np() function that returns the stack
|
||||
* pointer for a suspended thread and implement in
|
||||
* both pthreads and rthreads.
|
||||
*/
|
||||
p -> stop_info.stack_ptr = *(ptr_t*)((char *)p -> id + UTHREAD_SP_OFFSET);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GC_stop_world()
|
||||
{
|
||||
int i;
|
||||
|
||||
GC_ASSERT(I_HOLD_LOCK());
|
||||
# if DEBUG_THREADS
|
||||
GC_printf("Stopping the world from 0x%x\n", (unsigned)pthread_self());
|
||||
# endif
|
||||
|
||||
/* Make sure all free list construction has stopped before we start. */
|
||||
/* No new construction can start, since free list construction is */
|
||||
/* required to acquire and release the GC lock before it starts, */
|
||||
/* and we have the lock. */
|
||||
# ifdef PARALLEL_MARK
|
||||
GC_acquire_mark_lock();
|
||||
GC_ASSERT(GC_fl_builder_count == 0);
|
||||
/* We should have previously waited for it to become zero. */
|
||||
# endif /* PARALLEL_MARK */
|
||||
|
||||
GC_suspend_all();
|
||||
|
||||
# ifdef PARALLEL_MARK
|
||||
GC_release_mark_lock();
|
||||
# endif
|
||||
#if DEBUG_THREADS
|
||||
GC_printf("World stopped from 0x%x\n", (unsigned)pthread_self());
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Caller holds allocation lock, and has held it continuously since */
|
||||
/* the world stopped. */
|
||||
void GC_start_world()
|
||||
{
|
||||
pthread_t my_thread = pthread_self();
|
||||
register int i;
|
||||
register GC_thread p;
|
||||
register int result;
|
||||
|
||||
# if DEBUG_THREADS
|
||||
GC_printf("World starting\n");
|
||||
# endif
|
||||
|
||||
for (i = 0; i < THREAD_TABLE_SZ; i++) {
|
||||
for (p = GC_threads[i]; p != 0; p = p -> next) {
|
||||
if (!THREAD_EQUAL(p -> id, my_thread)) {
|
||||
if (p -> flags & FINISHED) continue;
|
||||
if (p -> thread_blocked) continue;
|
||||
#if DEBUG_THREADS
|
||||
GC_printf("Resuming thread 0x%x\n",
|
||||
(unsigned)(p -> id));
|
||||
#endif
|
||||
|
||||
if (pthread_resume_np(p -> id) != 0)
|
||||
ABORT("pthread_kill failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
# if DEBUG_THREADS
|
||||
GC_printf("World started\n");
|
||||
# endif
|
||||
}
|
||||
|
||||
void GC_stop_init() {
|
||||
}
|
||||
|
||||
#endif
|
||||
+9
-31
@@ -609,7 +609,7 @@ void GC_enable_signals(void)
|
||||
&& !defined(MACOS) && !defined(DJGPP) && !defined(DOS4GW) \
|
||||
&& !defined(NOSYS) && !defined(ECOS) && !defined(SN_TARGET_PS3)
|
||||
|
||||
# if defined(sigmask) && !defined(UTS4) && !defined(HURD) && !defined(HAIKU)
|
||||
# if defined(sigmask) && !defined(UTS4) && !defined(HURD)
|
||||
/* Use the traditional BSD interface */
|
||||
# define SIGSET_T int
|
||||
# define SIG_DEL(set, signal) (set) &= ~(sigmask(signal))
|
||||
@@ -764,14 +764,14 @@ ptr_t GC_get_stack_base()
|
||||
|
||||
# endif /* MS Windows */
|
||||
|
||||
# ifdef HAIKU
|
||||
# ifdef BEOS
|
||||
# include <kernel/OS.h>
|
||||
ptr_t GC_get_stack_base(){
|
||||
thread_info th;
|
||||
get_thread_info(find_thread(NULL),&th);
|
||||
return th.stack_end;
|
||||
}
|
||||
# endif /* HAIKU */
|
||||
# endif /* BEOS */
|
||||
|
||||
|
||||
# ifdef OS2
|
||||
@@ -1122,7 +1122,7 @@ void *GC_set_stackbottom = NULL;
|
||||
|
||||
#endif /* FREEBSD_STACKBOTTOM */
|
||||
|
||||
#if !defined(HAIKU) && !defined(AMIGA) && !defined(MSWIN32) \
|
||||
#if !defined(BEOS) && !defined(AMIGA) && !defined(MSWIN32) \
|
||||
&& !defined(MSWINCE) && !defined(OS2) && !defined(NOSYS) && !defined(ECOS) \
|
||||
&& !defined(GC_OPENBSD_THREADS)
|
||||
|
||||
@@ -1182,7 +1182,7 @@ ptr_t GC_get_stack_base()
|
||||
# endif /* STACKBOTTOM */
|
||||
}
|
||||
|
||||
# endif /* ! AMIGA, !OS 2, ! MS Windows, !HAIKU, !NOSYS, !ECOS */
|
||||
# endif /* ! AMIGA, !OS 2, ! MS Windows, !BEOS, !NOSYS, !ECOS */
|
||||
|
||||
#if defined(GC_OPENBSD_THREADS)
|
||||
|
||||
@@ -1957,19 +1957,6 @@ word bytes;
|
||||
}
|
||||
# endif
|
||||
|
||||
#if defined(HAIKU)
|
||||
#include <stdlib.h>
|
||||
|
||||
ptr_t GC_haiku_get_mem(word bytes)
|
||||
{
|
||||
void* mem;
|
||||
if (posix_memalign(&mem, GC_page_size, bytes) == 0)
|
||||
return mem;
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_MUNMAP
|
||||
|
||||
/* For now, this only works on Win32/WinCE and some Unix-like */
|
||||
@@ -2406,9 +2393,7 @@ GC_bool is_ptrfree;
|
||||
|
||||
# include <sys/mman.h>
|
||||
# include <signal.h>
|
||||
# if !defined(HAIKU)
|
||||
# include <sys/syscall.h>
|
||||
# endif
|
||||
# include <sys/syscall.h>
|
||||
|
||||
# define PROTECT(addr, len) \
|
||||
if (mprotect((caddr_t)(addr), (size_t)(len), \
|
||||
@@ -2465,13 +2450,13 @@ GC_bool is_ptrfree;
|
||||
#endif /* SUNOS4 || (FREEBSD && !SUNOS5SIGS) */
|
||||
|
||||
#if defined(SUNOS5SIGS) || defined(OSF1) || defined(LINUX) \
|
||||
|| defined(HURD) || defined(HAIKU)
|
||||
|| defined(HURD)
|
||||
# ifdef __STDC__
|
||||
typedef void (* SIG_PF)(int);
|
||||
# else
|
||||
typedef void (* SIG_PF)();
|
||||
# endif
|
||||
#endif /* SUNOS5SIGS || OSF1 || LINUX || HURD || HAIKU */
|
||||
#endif /* SUNOS5SIGS || OSF1 || LINUX || HURD */
|
||||
|
||||
#if defined(MSWIN32)
|
||||
typedef LPTOP_LEVEL_EXCEPTION_FILTER SIG_PF;
|
||||
@@ -2649,13 +2634,6 @@ SIG_PF GC_old_segv_handler; /* Also old MSWIN32 ACCESS_VIOLATION filter */
|
||||
/* architectures. */
|
||||
# endif /* LINUX */
|
||||
|
||||
# if defined(HAIKU)
|
||||
# include <errno.h>
|
||||
# define CODE_OK TRUE
|
||||
# define SIG_OK (sig == SIGSEGV)
|
||||
void GC_write_failt_handler(int sig, siginfo_t *scp, void * context)
|
||||
#endif /* HAIKU */
|
||||
|
||||
# if defined(SUNOS5SIGS)
|
||||
# ifdef __STDC__
|
||||
void GC_write_fault_handler(int sig, SIGINFO_T *scp, void * context)
|
||||
@@ -2701,7 +2679,7 @@ SIG_PF GC_old_segv_handler; /* Also old MSWIN32 ACCESS_VIOLATION filter */
|
||||
# if defined(OSF1) && defined(ALPHA)
|
||||
char * addr = (char *) (scp -> sc_traparg_a0);
|
||||
# endif
|
||||
# if defined(SUNOS5SIGS) || defined(HAIKU)
|
||||
# ifdef SUNOS5SIGS
|
||||
char * addr = (char *) (scp -> si_addr);
|
||||
# endif
|
||||
# ifdef LINUX
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
#if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
|
||||
&& !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS) \
|
||||
&& !defined(GC_DARWIN_THREADS) && !defined(GC_AIX_THREADS)
|
||||
&& !defined(GC_DARWIN_THREADS) && !defined(GC_AIX_THREADS) \
|
||||
&& !defined(GC_OPENBSD_THREADS)
|
||||
|
||||
#include <signal.h>
|
||||
#include <semaphore.h>
|
||||
|
||||
@@ -1135,7 +1135,7 @@ void GC_thr_init()
|
||||
# if defined(GC_HPUX_THREADS)
|
||||
GC_nprocs = pthread_num_processors_np();
|
||||
# endif
|
||||
# if defined(GC_OSF1_THREADS) || defined(GC_AIX_THREADS) || defined(GC_HAIKU_THREADS)
|
||||
# if defined(GC_OSF1_THREADS) || defined(GC_AIX_THREADS)
|
||||
GC_nprocs = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
if (GC_nprocs <= 0) GC_nprocs = 1;
|
||||
# endif
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check whether the given FLAG works with the current language's compiler
|
||||
# or gives an error. (Warnings, however, are ignored)
|
||||
#
|
||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||
# success/failure.
|
||||
#
|
||||
# If EXTRA-FLAGS is defined, it is added to the current language's default
|
||||
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
|
||||
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
|
||||
# force the compiler to issue an error when a bad flag is given.
|
||||
#
|
||||
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
|
||||
#
|
||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
||||
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Guido U. Draheim <[email protected]>
|
||||
# Copyright (c) 2011 Maarten Bosmans <[email protected]>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 5
|
||||
|
||||
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
||||
[AC_PREREQ(2.63)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
||||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
|
||||
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
|
||||
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
||||
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
|
||||
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||
[AS_VAR_SET(CACHEVAR,[no])])
|
||||
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
|
||||
AS_VAR_IF(CACHEVAR,yes,
|
||||
[m4_default([$2], :)],
|
||||
[m4_default([$3], :)])
|
||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||
])dnl AX_CHECK_COMPILE_FLAGS
|
||||
+1
-3
@@ -13,7 +13,6 @@ man_MANS = \
|
||||
genxs.1 \
|
||||
httpcfg.1 \
|
||||
ilasm.1 \
|
||||
illinkanalyzer.1 \
|
||||
lc.1 \
|
||||
macpack.1 \
|
||||
makecert.1 \
|
||||
@@ -59,7 +58,6 @@ man_MANS = \
|
||||
mono-configuration-crypto.1 \
|
||||
ccrewrite.1 \
|
||||
cccheck.1 \
|
||||
mono-symbolicate.1 \
|
||||
mono-profilers.1
|
||||
mono-symbolicate.1
|
||||
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
@@ -1,132 +0,0 @@
|
||||
.TH illinkanalyzer 1
|
||||
.SH NAME
|
||||
illinkanalyzer \- Mono's linker analyzer tool
|
||||
.SH SYNOPSIS
|
||||
.B illinkanalyzer
|
||||
\fR[\fIoptions\fR] <\fIlinker-dependency-file.xml.gz\fR>
|
||||
.SH DESCRIPTION
|
||||
Linker analyzer is a command line tool to analyze dependencies, which
|
||||
were recorded during linker processing, and led linker to mark an item
|
||||
to keep it in the resulting linked assembly.
|
||||
.PP
|
||||
It works on an oriented graph of dependencies, which are collected and
|
||||
dumped during the linker run. The vertices of this graph are the items
|
||||
of interest like assemblies, types, methods, fields, linker steps,
|
||||
etc. The edges represent the dependencies.
|
||||
.SH HOW TO DUMP DEPENDENCIES
|
||||
The linker analyzer needs a linker dependencies file as an input. It
|
||||
can be retrieved by enabling dependencies dumping during linking of a
|
||||
Xamarin.Android or a Xamarin.iOS project.
|
||||
.PP
|
||||
That can be done on the command line by setting LinkerDumpDependencies
|
||||
property to true and building the project. (make sure the
|
||||
LinkAssemblies task is called, it might require cleaning the project
|
||||
sometimes) Usually it is enough to build the project like this:
|
||||
.PP
|
||||
.nf
|
||||
.RS
|
||||
rm -f obj/Release/link.flag
|
||||
msbuild /p:LinkerDumpDependencies=true /p:Configuration=Release YourAppProject.csproj
|
||||
.RE
|
||||
.fi
|
||||
.PP
|
||||
After a successful build, there will be a linker-dependencies.xml.gz
|
||||
file created, containing the information for the analyzer.
|
||||
.SH OPTIONS
|
||||
.nf
|
||||
.RS
|
||||
-a, --alldeps show all dependencies
|
||||
--csvoutput=VALUE outputs types and optionally size analysis to CSV
|
||||
file
|
||||
-h, --help show this message and exit.
|
||||
-l, --linkedpath=VALUE sets the linked assemblies directory path. Enables
|
||||
displaying size estimates.
|
||||
-r, --rawdeps=VALUE show raw vertex dependencies. Raw vertex VALUE is
|
||||
in the raw format written by linker to the
|
||||
dependency XML file. VALUE can be regular
|
||||
expression
|
||||
--roots show root dependencies.
|
||||
--stat show statistic of loaded dependencies.
|
||||
--tree reduce the dependency graph to the tree.
|
||||
--types show all types dependencies.
|
||||
-t, --typedeps=VALUE show type dependencies. The VALUE can be regular
|
||||
expression
|
||||
-f, --flat show all dependencies per vertex and their distance
|
||||
-v, --verbose be more verbose. Enables stat and roots options.
|
||||
.RE
|
||||
.fi
|
||||
.SH EXAMPLES
|
||||
Let say you would like to know, why a type, Android.App.Activity for
|
||||
example, was marked by the linker. So run the analyzer like this:
|
||||
.PP
|
||||
.nf
|
||||
.RS
|
||||
illinkanalyzer -t Android.App.Activity linker-dependencies.xml.gz
|
||||
.fi
|
||||
.RE
|
||||
.PP
|
||||
Output:
|
||||
.PP
|
||||
.nf
|
||||
.RS
|
||||
Loading dependency tree from: linker-dependencies.xml.gz
|
||||
|
||||
--- Type dependencies: 'Android.App.Activity' -----------------------
|
||||
|
||||
--- TypeDef:Android.App.Activity dependencies -----------------------
|
||||
Dependency #1
|
||||
TypeDef:Android.App.Activity
|
||||
| TypeDef:XA.App.MainActivity [2 deps]
|
||||
| Assembly:XA.App, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null [3 deps]
|
||||
| Other:Mono.Linker.Steps.ResolveFromAssemblyStep
|
||||
.fi
|
||||
.RE
|
||||
.PP
|
||||
The output contains dependencies string(s), starting with the type and
|
||||
continuing with the item of interest, which depends on the type. The
|
||||
dependency could be result of multiple reasons. For example the type
|
||||
was referenced from a method, or the type was listed in the linker xml
|
||||
file to be protected.
|
||||
.PP
|
||||
In our example there is only one dependency string called Dependency
|
||||
#1. It shows us that the type Android.App.Activity was marked during
|
||||
processing of type XA.App.MainActivity by the linker. In this case
|
||||
because the MainActivity type is based on the Activity type and thus
|
||||
the linker marked it and kept it in the linked assembly. We can also
|
||||
see that there are 2 dependencies for the MainActivity class. Note
|
||||
that in the string (above) we see only 1st dependency of the 2, the
|
||||
dependency on the assembly XA.App. And finally the assembly vertex
|
||||
depends on the ResolveFromAssemblyStep vertex. So we see that the
|
||||
assembly was processed in the ResolveFromAssembly linker step.
|
||||
.PP
|
||||
Now we might want to see the MainActivity dependencies. That could be done by the following analyzer run:
|
||||
.PP
|
||||
.nf
|
||||
.RS
|
||||
illinkanalyzer -r TypeDef:XA.App.MainActivity linker-dependencies.xml.gz
|
||||
.fi
|
||||
.RE
|
||||
.PP
|
||||
Output:
|
||||
.PP
|
||||
.nf
|
||||
.RS
|
||||
Loading dependency tree from: linker-dependencies.xml.gz
|
||||
|
||||
--- Raw dependencies: 'TypeDef:XA.App.MainActivity' -----------------
|
||||
|
||||
--- TypeDef:XA.App.MainActivity dependencies ------------------------
|
||||
Dependency #1
|
||||
TypeDef:XA.App.MainActivity
|
||||
| Assembly:XA.App, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null [3 deps]
|
||||
| Other:Mono.Linker.Steps.ResolveFromAssemblyStep
|
||||
Dependency #2
|
||||
TypeDef:XA.App.MainActivity
|
||||
| TypeDef:XA.App.MainActivity/<>c__DisplayClass1_0 [2 deps]
|
||||
| TypeDef:XA.App.MainActivity [2 deps]
|
||||
| Assembly:XA.App, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null [3 deps]
|
||||
| Other:Mono.Linker.Steps.ResolveFromAssemblyStep
|
||||
.fi
|
||||
.RE
|
||||
.SH SEE ALSO
|
||||
\fBmsbuild\fR(1)
|
||||
@@ -188,18 +188,6 @@ as precompiled binaries on the Mono distribution server.
|
||||
.I "--local-targets"
|
||||
Lists all of the available local cross compilation targets.
|
||||
.TP
|
||||
.I "--cil-strip PATH"
|
||||
Provides a CIL stripper that mkbundle will use if able to.
|
||||
The intended use is to help reduce file size on AOT.
|
||||
.TP
|
||||
.I "--in-tree path/to/mono/source/root"
|
||||
Provides mkbundle with a mono source repository from which to pull the necessary headers for compilation.
|
||||
This allows mkbundle to run out of the project's source tree, useful for working with multiple runtimes and for
|
||||
testing without installing.
|
||||
.TP
|
||||
.I "--managed-linker PATH"
|
||||
Provides mkbundle access to a managed linker to preprocess the assemblies.
|
||||
.TP
|
||||
.I "--machine-config FILE"
|
||||
Uses the given FILE as the machine.config file for the generated
|
||||
application.
|
||||
@@ -320,25 +308,6 @@ causes it to statically link instead.
|
||||
Compresses the assemblies before embedding. This results in smaller
|
||||
executable files, but increases startup time and requires zlib to be
|
||||
installed on the target system.
|
||||
|
||||
.SH AOT Options
|
||||
These options support an mkbundle using AOT compilation with static linking. A native compiler
|
||||
toolchain is required.
|
||||
.TP
|
||||
.I "--aot-runtime PATH"
|
||||
Provide the path to the mono runtime to use for AOTing assemblies.
|
||||
.TP
|
||||
.I "--aot-dedup"
|
||||
(Experimental) Deduplicate AOT'ed methods based on a unique mangling of method names.
|
||||
.TP
|
||||
.I "--aot-mode MODE"
|
||||
MODE can be either "full" or "llvmonly" at this time.
|
||||
Currently, mkbundle supports three AOT modes. The default mode (this option unset)
|
||||
will AOT methods but will fall back on runtime codegen where it is much faster or offers
|
||||
a more full compatibility profile. The "full" setting will generate the necessary stubs to
|
||||
not require runtime code generation. The "llvmonly" setting does the same, but forces all codegen
|
||||
to go through the llvm backend.
|
||||
|
||||
.SH WINDOWS
|
||||
If you are using the old embedding on Windows systems, it it necessary
|
||||
to have Unix-like toolchain to be installed for \fImkbundle\fP to
|
||||
|
||||
@@ -1,375 +0,0 @@
|
||||
.TH mono-profilers 1
|
||||
.SH NAME
|
||||
mono\-profilers \- Mono's bundled profiler modules
|
||||
.SH SYNOPSIS
|
||||
\fBmono\ \-\-profile=log\fR[:\fIoption\fR,...] \fIprogram.exe\fR [\fIargs\fR]...
|
||||
.PP
|
||||
\fBmono\ \-\-profile=coverage\fR[:\fIoption\fR,...] \fIprogram.exe\fR [\fIargs\fR]...
|
||||
.PP
|
||||
\fBmono\ \-\-profile=aot\fR[:\fIoption\fR,...] \fIprogram.exe\fR [\fIargs\fR]...
|
||||
.SH DESCRIPTION
|
||||
Mono ships with a few profiler modules that enable most typical
|
||||
profiling scenarios. This page describes each of them in the sections
|
||||
below.
|
||||
.SH LOG PROFILER
|
||||
The log profiler is Mono's general-purpose performance profiler. It
|
||||
can collect a wide variety of data that can be analyzed by tools such
|
||||
as \fBmprof\-report\fR(1) or the Xamarin Profiler.
|
||||
.PP
|
||||
By default, the log profiler writes its output to \fIoutput.mlpd\fR.
|
||||
Refer to the \fImono/profiler/log.h\fR file in the Mono source tree
|
||||
for documentation on the log profiler's file format.
|
||||
.PP
|
||||
A default invocation of the log profiler gathers only basic data:
|
||||
Metadata load and unload events, thread start and stop events,
|
||||
performance counter samples, exception throws, etc. Most users will
|
||||
want to enable some of the heavier features such as GC allocation
|
||||
recording, statistical sampling, heap snapshotting (heapshots), or
|
||||
method entry and exit instrumentation. See the \fBOptions\fR
|
||||
sub-section.
|
||||
.PP
|
||||
Note that, in most realistic scenarios, the log profiler will record
|
||||
a vast amount of data. This can lead to very large log files. (The
|
||||
\fBzip\fR and \fBreport\fR options can help deal with this.)
|
||||
.SS Options
|
||||
The log profiler supports the following options:
|
||||
.TP
|
||||
\fBhelp\fR
|
||||
Print usage instructions.
|
||||
.TP
|
||||
\fBoutput\fR=[\fI+\fR|\fI#\fR|\fI|\fR]\fIfile\fR
|
||||
Write log data to \fIfile\fR. The optional modifiers are:
|
||||
.RS
|
||||
.ne 8
|
||||
.TP
|
||||
\fB+\fR
|
||||
The program PID is appended to the file name. For example,
|
||||
\fBoutput=+out.mlpd\fR outputs to \fIout.mlpd.1234\fR if the PID is
|
||||
\fB1234\fR.
|
||||
.TP
|
||||
\fB#\fR
|
||||
\fIfile\fR is parsed as a file descriptor number, which is opened
|
||||
with \fBfdopen\fR(3). This is mainly useful in embedding scenarios.
|
||||
.TP
|
||||
\fB|\fR
|
||||
\fIfile\fR is treated as a program name. It will be started with
|
||||
\fBpopen\fR(3) and the log data will be piped to its standard input.
|
||||
.RE
|
||||
.TP
|
||||
\fBreport\fR
|
||||
Generate a report directly instead of writing the log data to a file.
|
||||
If this option is used together with the \fBoutput\fR option, the
|
||||
report will be written to the specified file instead of the log data.
|
||||
.TP
|
||||
\fBzip\fR
|
||||
Compress the output file with \fBgzip\fR(1).
|
||||
.TP
|
||||
\fBport\fR=\fIport\fR
|
||||
Use \fIport\fR to listen for command server connections. See the
|
||||
\fBCommand server\fR sub-section.
|
||||
.TP
|
||||
\fBnodefaults\fR
|
||||
Disables pre Mono 5.6 compatibility. In particular, this disables
|
||||
exception events and performance counter sampling by default. It also
|
||||
makes it so that GC move events won't be enabled by default when
|
||||
heapshots are enabled. To use this option, it must be the first
|
||||
option given to the log profiler.
|
||||
.IP
|
||||
This option will be the default in a future version of the log
|
||||
profiler.
|
||||
.TP
|
||||
[\fBno\fR]\fIevent\fR
|
||||
Enable or disable gathering data for \fIevent\fR, which can be one
|
||||
of:
|
||||
.RS
|
||||
.TP
|
||||
\fBexception\fR
|
||||
Exception throw and clause (\fBcatch\fR, \fBfinally\fR, etc)
|
||||
evaluation events. Enabled by default unless \fBnodefaults\fR is
|
||||
used.
|
||||
.TP
|
||||
\fBmonitor\fR
|
||||
Monitor lock contention, acquisition, and release events.
|
||||
.TP
|
||||
\fBgc\fR
|
||||
GC start, progress, stop, and resize events.
|
||||
.TP
|
||||
\fBgcalloc\fR
|
||||
GC allocation events.
|
||||
.TP
|
||||
\fBgcmove\fR
|
||||
GC move events.
|
||||
.TP
|
||||
\fBgcroot\fR
|
||||
GC root report events. Generated on every collection if enabled,
|
||||
unless \fBnodefaults\fR is used, in which case, they're only
|
||||
generated on heapshots.
|
||||
.TP
|
||||
\fBgchandle\fR
|
||||
GC handle creation and deletion events.
|
||||
.TP
|
||||
\fBfinalization\fR
|
||||
Object finalization events.
|
||||
.TP
|
||||
\fBcounter\fR
|
||||
Performance counter sample events. Enabled by default unless
|
||||
\fBnodefaults\fR is used.
|
||||
.TP
|
||||
\fBjit\fR
|
||||
JIT code buffer events.
|
||||
.TP
|
||||
\fBalloc\fR
|
||||
Alias for \fBgc\fR, \fBgcalloc\fR, and \fBgcmove\fR.
|
||||
.TP
|
||||
\fBlegacy\fR
|
||||
Alias for \fBexception\fR, \fBmonitor\fR, \fBgc\fR, \fBgcmove\fR,
|
||||
\fBgcroot\fR, \fBgchandle\fR, \fBfinalization\fR, and \fBcounter\fR.
|
||||
.RE
|
||||
.TP
|
||||
\fBsample\fR[\fB\-real\fR][=\fIfreq\fR]
|
||||
Enable statistical sampling. The default is to sample at a frequency
|
||||
of 100 Hz, but \fIfreq\fR can be used to override this.
|
||||
.IP
|
||||
By default, sampling uses process time (i.e., the more work a process
|
||||
does, the more samples are collected). The \fB-real\fR variant uses
|
||||
wall clock time instead. Wall clock time is better for programs that
|
||||
are I/O-bound.
|
||||
.TP
|
||||
\fBmaxsamples\fR=\fInum\fR
|
||||
Limit the number of reusable sample events to \fInum\fR allocations.
|
||||
A value of zero means no limit. By default, the value of this setting
|
||||
is based on the number of CPU cores. Some tinkering with this setting
|
||||
may be necessary for programs with an unusually high amount of
|
||||
threads.
|
||||
.TP
|
||||
\fBcalls\fR
|
||||
Enable method entry and exit instrumentation. This is an alternative
|
||||
to statistical sampling when you need more precise information. Note
|
||||
that this mode is extremely heavy and can slow most programs to a
|
||||
crawl.
|
||||
.TP
|
||||
\fBcallspec\fR=\fIspec\fR
|
||||
Limit method entry and exit instrumentation to methods matching the
|
||||
specified call spec. This uses the same syntax as the \fB--trace\fR
|
||||
option for \fBmono\fR(1), so refer to that page for more information.
|
||||
.TP
|
||||
\fBcalldepth\fR=\fInum\fR
|
||||
Limit method entry and exit event collection to a call depth of
|
||||
\fInum\fR.
|
||||
.TP
|
||||
\fBmaxframes\fR=\fInum\fR
|
||||
Limit backtraces in various events (including statistical samples) to
|
||||
\fInum\fR frames.
|
||||
.TP
|
||||
\fBheapshot\fR[=\fImode\fR]
|
||||
Enable heap snapshots. \fImode\fR, if given, can be one of:
|
||||
.RS
|
||||
.TP
|
||||
\fBondemand\fR
|
||||
Only perform a heapshot when receiving a command via the command
|
||||
server or when triggered through the managed library.
|
||||
.TP
|
||||
\fInum\fR\fBgc\fR
|
||||
Perform a heapshot on every \fInum\fR collections of the major
|
||||
generation.
|
||||
.TP
|
||||
\fInum\fR\fBms\fR
|
||||
Perform a heapshot on a major generation collection if \fInum\fR
|
||||
milliseconds have passed since the last heapshot.
|
||||
.RE
|
||||
.IP
|
||||
If \fImode\fR is not given, a heapshot will be performed on every
|
||||
collection of the major generation.
|
||||
.TP
|
||||
\fBheapshot-on-shutdown\fR
|
||||
In addition to any other heapshot settings, also perform a heapshot
|
||||
on runtime shutdown.
|
||||
.TP
|
||||
\fBdebug\fR
|
||||
Print detailed debugging information. Most users should not use this
|
||||
option.
|
||||
.SS Command server
|
||||
The log profiler features a simple command server that currently is
|
||||
only used to trigger manual heapshots (typcally when using the
|
||||
on-demand mode, but also usable with the other modes). A random port
|
||||
will be used to listen for connections unless the \fBport\fR option
|
||||
is used. To trigger a heapshot, open a TCP connection to the command
|
||||
server and send the C string \fB"heapshot\\n"\fR.
|
||||
.PP
|
||||
The command server supports multiple simultaneous connections.
|
||||
.SS Managed library
|
||||
The log profiler comes with a managed library called
|
||||
\fBMono.Profiler.Log\fR. This library allows easily reading log files
|
||||
in managed code (e.g., C#) as well as interacting with the profiler
|
||||
at run-time.
|
||||
.PP
|
||||
With the ability to easily read log files, users can write all sorts
|
||||
of interesting analyses that might not be provided by the standard
|
||||
tools (e.g., \fBmprof\-report\fR(1)).
|
||||
.PP
|
||||
The \fBLogProfiler\fR class allows users to reconfigure profiler
|
||||
settings at run-time. For example, certain event types can be toggled
|
||||
on or off, the mode and frequency of heapshots and sampling can be
|
||||
changed, etc. Heapshots can also be triggered manually.
|
||||
.PP
|
||||
To use this library, simply pass \fB\-r:Mono.Profiler.Log\fR when
|
||||
compiling your code.
|
||||
.SS Example
|
||||
Collect GC allocation and sampling data for a program, then generate
|
||||
a report:
|
||||
.PP
|
||||
.nf
|
||||
.RS
|
||||
mono \-\-profile=log:alloc,sample program.exe
|
||||
mprof\-report output.mlpd
|
||||
.RE
|
||||
.fi
|
||||
.PP
|
||||
Perform a heapshot on every 5th collection and generate a report
|
||||
directly:
|
||||
.PP
|
||||
.nf
|
||||
.RS
|
||||
mono \-\-profile=log:heapshot=5gc,report program.exe
|
||||
.RE
|
||||
.fi
|
||||
.PP
|
||||
.SH COVERAGE PROFILER
|
||||
The code coverage profiler collects information about how often code
|
||||
paths are executed. This is done by instrumenting JIT-compiled code
|
||||
at all sequence points. On program exit, the coverage profiler
|
||||
collects all execution count information and outputs it to an XML
|
||||
file. The main use case for the coverage profiler is unit testing: By
|
||||
running unit test suites with the coverage profiler, it is possible
|
||||
to determine whether the unit tests actually cover all the code that
|
||||
they should.
|
||||
.PP
|
||||
By default, the coverage profiler writes its output to
|
||||
\fIcoverage.xml\fR. Refer to the \fImono/profiler/coverage.c\fR file
|
||||
in the Mono source tree for documentation on the schema.
|
||||
.PP
|
||||
Please note that the coverage profiler currently does not support
|
||||
instrumenting AOT-compiled code. When collecting coverage data, one
|
||||
may wish to run Mono with the \fB-O=-aot\fR option to disable loading
|
||||
AOT-compiled code.
|
||||
.SS Options
|
||||
The coverage profiler supports the following options:
|
||||
.TP
|
||||
\fBhelp\fR
|
||||
Print usage instructions.
|
||||
.TP
|
||||
\fBoutput\fR=[\fI+\fR|\fI#\fR|\fI|\fR]\fIfile\fR
|
||||
Write coverage data to \fIfile\fR. The optional modifiers are:
|
||||
.RS
|
||||
.ne 8
|
||||
.TP
|
||||
\fB+\fR
|
||||
The program PID is appended to the file name. For example,
|
||||
\fBoutput=+cov.xml\fR outputs to \fIcov.xml.1234\fR if the PID is
|
||||
\fB1234\fR.
|
||||
.TP
|
||||
\fB#\fR
|
||||
\fIfile\fR is parsed as a file descriptor number, which is opened
|
||||
with \fBfdopen\fR(3). This is mainly useful in embedding scenarios.
|
||||
.TP
|
||||
\fB|\fR
|
||||
\fIfile\fR is treated as a program name. It will be started with
|
||||
\fBpopen\fR(3) and the coverage data will be piped to its standard
|
||||
input.
|
||||
.RE
|
||||
.TP
|
||||
\fBcovfilter-file\fR=\fIfile\fR
|
||||
Supply a coverage filter file. This option can be given multiple
|
||||
times. See the \fBFilter files\fR sub-section.
|
||||
.SS Filter files
|
||||
Filter files can be used to pick and choose which types should be
|
||||
considered for coverage instrumentation. A filter file consists of a
|
||||
series of lines of the form:
|
||||
.PP
|
||||
.nf
|
||||
.RS
|
||||
\fB+\fR|\fB\-\fR\fB[\fR\fIimage_name\fR\fB]\fR\fItype_name_prefix\fR
|
||||
.RE
|
||||
.fi
|
||||
.PP
|
||||
Here, \fIimage_name\fR is something like \fBmscorlib\fR.
|
||||
\fItype_name_prefix\fR can be something like \fBSystem.Int32\fR for
|
||||
a specific type or \fBSystem.App\fR to pick all types starting with
|
||||
\fBApp\fR in the \fBSystem\fR namespace.
|
||||
.PP
|
||||
Lines starting with \fB+\fR indicate that a type should be
|
||||
instrumented for coverage, whereas lines starting with \fB\-\fR
|
||||
indicate the opposite. Lines starting with \fB+\fR always override
|
||||
lines starting with \fB\-\fR regardless of the order they appear in.
|
||||
.PP
|
||||
Lines not starting with either character are ignored. This can be
|
||||
used to write comments. For example, this is a valid file:
|
||||
.PP
|
||||
.nf
|
||||
.RS
|
||||
# Ignore coverage in network-related code, except HTTP client code.
|
||||
-[MyProgram]MyProgram.Net
|
||||
+[MyProgram]MyProgram.Net.Http.HttpClient
|
||||
.RE
|
||||
.fi
|
||||
.SS Example
|
||||
Coverage data for a program can be collected like this:
|
||||
.PP
|
||||
.nf
|
||||
.RS
|
||||
mono \-O=\-aot \-\-profile=coverage:output=cov.xml program.exe
|
||||
.RE
|
||||
.fi
|
||||
.PP
|
||||
\fIcov.xml\fR will now contain the coverage data.
|
||||
.SH AOT PROFILER
|
||||
The AOT profiler will record which generic instantiations a program
|
||||
makes use of and save the information to a specified file. This data
|
||||
can then be used by the AOT compiler to compile those generic
|
||||
instantiations ahead of time to reduce program startup time.
|
||||
.PP
|
||||
By default, the AOT profiler writes its output to
|
||||
\fIoutput.aotprofile\fR. Refer to the \fImono/profiler/aot.h\fR file
|
||||
in the Mono source tree for documentation on the AOT profiler's file
|
||||
format.
|
||||
.SS Options
|
||||
The AOT profiler supports the following options:
|
||||
.TP
|
||||
\fBhelp\fR
|
||||
Print usage instructions.
|
||||
.TP
|
||||
\fBoutput\fR=[\fI+\fR|\fI#\fR|\fI|\fR]\fIfile\fR
|
||||
Write output data to \fIfile\fR. The optional modifiers are:
|
||||
.RS
|
||||
.ne 8
|
||||
.TP
|
||||
\fB+\fR
|
||||
The program PID is appended to the file name. For example,
|
||||
\fBoutput=+out.aotprofile\fR outputs to \fIout.aotprofile.1234\fR if
|
||||
the PID is \fB1234\fR.
|
||||
.TP
|
||||
\fB#\fR
|
||||
\fIfile\fR is parsed as a file descriptor number, which is opened
|
||||
with \fBfdopen\fR(3). This is mainly useful in embedding scenarios.
|
||||
.TP
|
||||
\fB|\fR
|
||||
\fIfile\fR is treated as a program name. It will be started with
|
||||
\fBpopen\fR(3) and the log data will be piped to its standard input.
|
||||
.RE
|
||||
.TP
|
||||
\fBverbose\fR
|
||||
Print detailed debugging information. Most users should not use this
|
||||
option.
|
||||
.SS Example
|
||||
A profile can be collected and used like this:
|
||||
.PP
|
||||
.nf
|
||||
.RS
|
||||
mono \-\-profile=aot:output=program.aotprofile program.exe
|
||||
mono \-\-aot=profile=program.aotprofile program.exe
|
||||
mono program.exe
|
||||
.RE
|
||||
.fi
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
\fBmono\fR(1), \fBmprof\-report\fR(1)
|
||||
@@ -26,6 +26,11 @@ and execution can be resumed by sending the SIGUSR2 signal. The
|
||||
service can be cleanly shutdown by sending the SIGTERM signal to the
|
||||
process.
|
||||
.PP
|
||||
Mono programs started with mono-service run with the
|
||||
.B MONO_DISABLE_SHM
|
||||
variable set. This means that certain Mono features that depend on
|
||||
it are not available to services.
|
||||
.PP
|
||||
The following options can be used to control the service:
|
||||
.TP
|
||||
.I "-d:DIRECTORY"
|
||||
|
||||
+156
-138
@@ -65,45 +65,6 @@ and
|
||||
See the description for
|
||||
.B MONO_IOMAP
|
||||
in the environment variables section for more details.
|
||||
.SH METHOD DESCRIPTIONS
|
||||
A number of diagnostic command line options take as argument a method
|
||||
description. A method description is a textual representation that
|
||||
can be used to uniquely identify a method. The syntax is as follows:
|
||||
.nf
|
||||
[namespace]classname:methodname[(arguments)]
|
||||
.fi
|
||||
.PP
|
||||
The values in brackets are optional, like the namespace and the
|
||||
arguments. The arguments themselves are either empty, or a
|
||||
comma-separated list of arguments. Both the
|
||||
\fBclassname\fR
|
||||
and
|
||||
\fBmethodname\fR
|
||||
can be set to the special value '*' to match any values (Unix shell
|
||||
users should escape the argument to avoid the shell interpreting
|
||||
this).
|
||||
.PP
|
||||
The arguments, if present should be a comma separated list of types
|
||||
either a full typename, or for built-in types it should use the
|
||||
low-level ILAsm type names for the built-in types,
|
||||
like 'void', 'char', 'bool', 'byte', 'sbyte', 'uint16', 'int16', 'uint',
|
||||
'int', 'ulong', 'long', 'uintptr', 'intptr', 'single', 'double', 'string', 'object'.
|
||||
.PP
|
||||
Pointer types should be the name of the type, followed by a '*',
|
||||
arrays should be the typename followed by '[' one or more commas (to
|
||||
indicate the rank of the array), and ']'.
|
||||
.PP
|
||||
Generic values should use '<', one or more type names, separated by
|
||||
both a comma and a space and '>'.
|
||||
.PP
|
||||
By-reference arguments should include a "&" after the typename.
|
||||
.PP
|
||||
Examples:
|
||||
.nf
|
||||
*:ctor(int) // All constructors that take an int as an argument
|
||||
*:Main // Methods named Main in any class
|
||||
*:Main(string[]) // Methods named Main that take a string array in any class
|
||||
.fi
|
||||
.SH RUNTIME OPTIONS
|
||||
The following options are available:
|
||||
.TP
|
||||
@@ -216,17 +177,6 @@ options. This feature is experimental.
|
||||
.TP
|
||||
.I llvm-outfile=[filename]
|
||||
Gives the path for the temporary LLVM bitcode file created during AOT.
|
||||
.I dedup
|
||||
Each AOT module will typically contain the code for inflated methods and wrappers that
|
||||
are called by code in that module. In dedup mode, we identify and skip compiling all of those
|
||||
methods. When using this mode with fullaot, dedup-include is required or these methods will
|
||||
remain missing.
|
||||
.TP
|
||||
.I dedup-include=[filename]
|
||||
In dedup-include mode, we are in the pass of compilation where we compile the methods
|
||||
that we had previously skipped. All of them are emitted into the assembly that is passed
|
||||
as this option. We consolidate the many duplicate skipped copies of the same method into one.
|
||||
.TP
|
||||
.TP
|
||||
.I info
|
||||
Print the architecture the AOT in this copy of Mono targets and quit.
|
||||
@@ -301,14 +251,14 @@ If the AOT compiler cannot compile a method for any reason, enabling this flag
|
||||
will output the skipped methods to the console.
|
||||
.TP
|
||||
.I profile=[file]
|
||||
Specify a file to use for profile-guided optimization. See the \fBAOT profiler\fR sub-section. To specify multiple files, include the
|
||||
Specify a file to use for profile-guided optimization. See the "AOT PROFILING" section. To specify multiple files, include the
|
||||
.I profile
|
||||
option multiple times.
|
||||
.TP
|
||||
.I profile-only
|
||||
AOT *only* the methods described in the files specified with the
|
||||
.I profile
|
||||
option. See the \fBAOT profiler\fR sub-section.
|
||||
option. See the "AOT PROFILING" section.
|
||||
.TP
|
||||
.I readonly-value=namespace.typename.fieldname=type/value
|
||||
Override the value of a static readonly field. Usually, during JIT
|
||||
@@ -494,11 +444,6 @@ will switch to '/bin/mono64' iff '/bin/mono' is a 32-bit build).
|
||||
\fB--help\fR, \fB-h\fR
|
||||
Displays usage instructions.
|
||||
.TP
|
||||
\fB--interpreter\fR
|
||||
The Mono runtime will use its interpreter to execute a given assembly.
|
||||
The interpreter is usually slower than the JIT, but it can be useful on
|
||||
platforms where code generation at runtime is not allowed.
|
||||
.TP
|
||||
\fB--hybrid-aot\fR
|
||||
This flag allows the Mono runtime to run assemblies
|
||||
that have been stripped of IL, for example using mono-cil-strip. For this to
|
||||
@@ -680,12 +625,14 @@ platforms, and only when using gdb 7.0 or later.
|
||||
.ne
|
||||
.RE
|
||||
.TP
|
||||
\fB\-\-profile\fR[=\fIprofiler\fR[:\fIprofiler_args\fR]]\fR
|
||||
Loads a profiler module with the given arguments. For more information,
|
||||
see the \fBPROFILING\fR section.
|
||||
\fB--profile[=profiler[:profiler_args]]\fR
|
||||
Turns on profiling. For more information about profiling applications
|
||||
and code coverage see the sections "PROFILING" and "CODE COVERAGE"
|
||||
below.
|
||||
.Sp
|
||||
This option can be used multiple times; each time will load an additional
|
||||
profiler module.
|
||||
This option can be used multiple times, each time will load an
|
||||
additional profiler. This allows developers to use modules that
|
||||
extend the JIT through the Mono profiling interface.
|
||||
.TP
|
||||
\fB--trace[=expression]\fR
|
||||
Shows method names as they are invoked. By default all methods are
|
||||
@@ -864,81 +811,125 @@ create its own threads and return after invocation.
|
||||
This support allows for example debugging applications by having the
|
||||
csharp shell attach to running processes.
|
||||
.SH PROFILING
|
||||
The Mono runtime includes a profiler API that dynamically loaded
|
||||
profiler modules and embedders can use to collect performance-related
|
||||
data about an application. Profiler modules are loaded by passing the
|
||||
\fB\-\-profile\fR command line argument to the Mono runtime.
|
||||
The mono runtime includes a profiler that can be used to explore
|
||||
various performance related problems in your application. The
|
||||
profiler is activated by passing the --profile command line argument
|
||||
to the Mono runtime, the format is:
|
||||
.nf
|
||||
|
||||
--profile[=profiler[:profiler_args]]
|
||||
|
||||
.fi
|
||||
Mono has a built-in profiler called 'default' (and is also the default
|
||||
if no arguments are specified), but developers can write custom
|
||||
profilers, see the section "CUSTOM PROFILERS" for more details.
|
||||
.PP
|
||||
Mono ships with a few profiler modules, of which the \fBlog\fR profiler
|
||||
is the most feature-rich. It is also the default profiler if the
|
||||
\fIprofiler\fR argument is not given, or if \fBdefault\fR is given.
|
||||
It is possible to write your own profiler modules; see the
|
||||
\fBCustom profilers\fR sub-section.
|
||||
.SS Log profiler
|
||||
The log profiler can be used to collect a lot of information about
|
||||
a program running in the Mono runtime. This data can be used (both
|
||||
while the process is running and later) to do analyses of the
|
||||
program behavior, determine resource usage, performance issues or
|
||||
even look for particular execution patterns.
|
||||
If a
|
||||
.I profiler
|
||||
is not specified, the default profiler is used.
|
||||
.Sp
|
||||
The
|
||||
.I profiler_args
|
||||
is a profiler-specific string of options for the profiler itself.
|
||||
.Sp
|
||||
The default profiler accepts the following options 'alloc' to profile
|
||||
memory consumption by the application; 'time' to profile the time
|
||||
spent on each routine; 'jit' to collect time spent JIT-compiling methods
|
||||
and 'stat' to perform sample statistical profiling.
|
||||
If no options are provided the default is 'alloc,time,jit'.
|
||||
.PP
|
||||
By default the
|
||||
profile data is printed to stdout: to change this, use the 'file=filename'
|
||||
option to output the data to filename.
|
||||
.Sp
|
||||
For example:
|
||||
.nf
|
||||
|
||||
mono --profile program.exe
|
||||
|
||||
.fi
|
||||
.Sp
|
||||
That will run the program with the default profiler and will do time
|
||||
and allocation profiling.
|
||||
.Sp
|
||||
.nf
|
||||
|
||||
mono --profile=default:stat,alloc,file=prof.out program.exe
|
||||
|
||||
.fi
|
||||
Will do sample statistical profiling and allocation profiling on
|
||||
program.exe. The profile data is put in prof.out.
|
||||
.Sp
|
||||
Note that the statistical profiler has a very low overhead and should
|
||||
be the preferred profiler to use (for better output use the full path
|
||||
to the mono binary when running and make sure you have installed the
|
||||
addr2line utility that comes from the binutils package).
|
||||
.SH LOG PROFILER
|
||||
This is the most advanced profiler.
|
||||
.PP
|
||||
The Mono \f[I]log\f[] profiler can be used to collect a lot of
|
||||
information about a program running in the Mono runtime.
|
||||
This data can be used (both while the process is running and later)
|
||||
to do analyses of the program behaviour, determine resource usage,
|
||||
performance issues or even look for particular execution patterns.
|
||||
.PP
|
||||
This is accomplished by logging the events provided by the Mono
|
||||
runtime through the profiler API and periodically writing them to a
|
||||
file which can later be inspected with the \fBmprof\-report\fR(1)
|
||||
tool.
|
||||
runtime through the profiling interface and periodically writing
|
||||
them to a file which can be later inspected with the mprof-report(1)
|
||||
tool.
|
||||
.PP
|
||||
More information about how to use the log profiler is available on
|
||||
the \fBmono\-profilers\fR(1) page, under the \fBLOG PROFILER\fR
|
||||
section, as well as the \fBmprof\-report\fR(1) page.
|
||||
.SS Coverage profiler
|
||||
The code coverage profiler can instrument a program to help determine
|
||||
which classes, methods, code paths, etc are actually executed. This
|
||||
is most useful when running a test suite to determine whether the
|
||||
tests actually cover the code they're expected to.
|
||||
.PP
|
||||
More information about how to use the coverage profiler is available
|
||||
on the \fBmono\-profilers\fR(1) page, under the \fBCOVERAGE
|
||||
PROFILER\fR section.
|
||||
.SS AOT profiler
|
||||
The AOT profiler can help improve startup performance by logging
|
||||
which generic instantiations are used by a program, which the AOT
|
||||
compiler can then use to compile those instantiations ahead of time
|
||||
so that they won't have to be JIT compiled at startup.
|
||||
.PP
|
||||
More information about how to use the AOT profiler is available on
|
||||
the \fBmono\-profilers\fR(1) page, under the \fBAOT PROFILER\fR
|
||||
section.
|
||||
.SS Custom profilers
|
||||
Custom profiler modules can be loaded in exactly the same way as the
|
||||
standard modules that ship with Mono. They can also access the same
|
||||
profiler API to gather all kinds of information about the code being
|
||||
executed.
|
||||
.PP
|
||||
For example, to use a third-party profiler called \fBcustom\fR, you
|
||||
would load it like this:
|
||||
More information about how to use the log profiler is available on the
|
||||
mprof-report(1) page.
|
||||
.SH CUSTOM PROFILERS
|
||||
Mono provides a mechanism for loading other profiling modules which in
|
||||
the form of shared libraries. These profiling modules can hook up to
|
||||
various parts of the Mono runtime to gather information about the code
|
||||
being executed.
|
||||
.PP
|
||||
To use a third party profiler you must pass the name of the profiler
|
||||
to Mono, like this:
|
||||
.nf
|
||||
.RS
|
||||
mono --profile=custom program.exe
|
||||
.RE
|
||||
|
||||
mono --profile=custom program.exe
|
||||
|
||||
.fi
|
||||
.PP
|
||||
You could also pass arguments to it:
|
||||
In the above sample Mono will load the user defined profiler from the
|
||||
shared library `mono-profiler-custom.so'. This profiler module must
|
||||
be on your dynamic linker library path.
|
||||
.PP
|
||||
A list of other third party profilers is available from Mono's web
|
||||
site (www.mono-project.com/docs/advanced/performance-tips/)
|
||||
.PP
|
||||
Custom profiles are written as shared libraries. The shared library
|
||||
must be called `mono-profiler-NAME.so' where `NAME' is the name of
|
||||
your profiler.
|
||||
.PP
|
||||
For a sample of how to write your own custom profiler look in the
|
||||
Mono source tree for in the samples/profiler.c.
|
||||
.SH CODE COVERAGE
|
||||
Mono ships with a code coverage module in the \f[I]log\f[] profiler.
|
||||
Check the `coverage' option on the mprof-report(1) page for more details.
|
||||
.SH AOT PROFILING
|
||||
You can improve startup performance by using the AOT profiler.
|
||||
.PP
|
||||
Typically the AOT compiler (\fBmono --aot\fR) will not generate code
|
||||
for generic instantiations. To solve this, you can run Mono with the
|
||||
AOT profiler to find out all the generic instantiations that are used,
|
||||
and then instructing the AOT compiler to produce code for these.
|
||||
.PP
|
||||
This command will run the specified app.exe and produce the
|
||||
\fBout.aotprof\fR file with the data describing the generic
|
||||
instantiations that are needed:
|
||||
.nf
|
||||
.RS
|
||||
mono --profile=custom:arg1,arg2=arg3 program.exe
|
||||
.RE
|
||||
$ mono --profile=aot:output=out.aotprof app.exe
|
||||
.fi
|
||||
.PP
|
||||
In the above example, Mono will load the profiler from the shared
|
||||
library called \fIlibmono\-profiler\-custom.so\fR (name varies based
|
||||
on platform, e.g., \fIlibmono\-profiler\-custom.dylib\fR on OS X).
|
||||
This profiler module must be on your dynamic linker library path
|
||||
(\fBLD_LIBRARY_PATH\fR on most systems, \fBDYLD_LIBRARY_PATH\fR on
|
||||
OS X).
|
||||
.PP
|
||||
For a sample of how to write your own custom profiler, look at the
|
||||
\fIsamples/profiler/sample.c\fR file in the Mono source tree.
|
||||
Once you have this data, you can pass this to Mono's AOT compiler to
|
||||
instruct it to generate code for it:
|
||||
.nf
|
||||
$ mono --aot=profile=out.aotprof
|
||||
.fi
|
||||
.SH DEBUGGING AIDS
|
||||
To debug managed applications, you can use the
|
||||
.B mdb
|
||||
@@ -989,10 +980,8 @@ If set, the log mask is changed to the set value. Possible values are
|
||||
"asm" (assembly loader), "type", "dll" (native library loader), "gc"
|
||||
(garbage collector), "cfg" (config file loader), "aot" (precompiler),
|
||||
"security" (e.g. Moonlight CoreCLR support), "threadpool" (thread pool generic),
|
||||
"io-selector" (async socket operations), "io-layer" (I/O layer - processes, files,
|
||||
sockets, events, semaphores, mutexes and handles), "io-layer-process",
|
||||
"io-layer-file", "io-layer-socket", "io-layer-event", "io-layer-semaphore",
|
||||
"io-layer-mutex", "io-layer-handle" and "all".
|
||||
"io-threadpool" (thread pool I/O), "io-layer" (I/O layer - sockets, handles, shared memory etc)
|
||||
and "all".
|
||||
The default value is "all". Changing the mask value allows you to display only
|
||||
messages for a certain component. You can use multiple masks by comma
|
||||
separating them. For example to see config file messages and assembly loader
|
||||
@@ -1142,6 +1131,18 @@ internally disables managed collation functionality invoked via the
|
||||
members of System.Globalization.CompareInfo class. Collation is
|
||||
enabled by default.
|
||||
.TP
|
||||
\fBMONO_DISABLE_SHM\fR
|
||||
Unix only: If set, disables the shared memory files used for
|
||||
cross-process handles: process have only private handles. This means
|
||||
that process and thread handles are not available to other processes,
|
||||
and named mutexes, named events and named semaphores are not visible
|
||||
between processes.
|
||||
.Sp
|
||||
This is can also be enabled by default by passing the
|
||||
"--disable-shared-handles" option to configure.
|
||||
.Sp
|
||||
This is the default from mono 2.8 onwards.
|
||||
.TP
|
||||
\fBMONO_DISABLE_SHARED_AREA\fR
|
||||
Unix only: If set, disable usage of shared memory for exposing
|
||||
performance counters. This means it will not be possible to both
|
||||
@@ -1525,6 +1526,29 @@ directive instead, like this:
|
||||
|
||||
.fi
|
||||
See mod_mono(8) for more details.
|
||||
|
||||
Additionally. Mono includes a profiler module which allows one to track what
|
||||
adjustements to file paths IOMAP code needs to do. The tracking code reports
|
||||
the managed location (full stack trace) from which the IOMAP-ed call was made and,
|
||||
on process exit, the locations where all the IOMAP-ed strings were created in
|
||||
managed code. The latter report is only approximate as it is not always possible
|
||||
to estimate the actual location where the string was created. The code uses simple
|
||||
heuristics - it analyzes stack trace leading back to the string allocation location
|
||||
and ignores all the managed code which lives in assemblies installed in GAC as well as in the
|
||||
class libraries shipped with Mono (since they are assumed to be free of case-sensitivity
|
||||
issues). It then reports the first location in the user's code - in most cases this will be
|
||||
the place where the string is allocated or very close to the location. The reporting code
|
||||
is implemented as a custom profiler module (see the "PROFILING" section) and can be loaded
|
||||
in the following way:
|
||||
.fi
|
||||
.Sp
|
||||
.nf
|
||||
|
||||
mono --profile=iomap yourapplication.exe
|
||||
|
||||
.fi
|
||||
Note, however, that Mono currently supports only one profiler module
|
||||
at a time.
|
||||
.TP
|
||||
\fBMONO_LLVM\fR
|
||||
When Mono is using the LLVM code generation backend you can use this
|
||||
@@ -1865,10 +1889,7 @@ for example, to see managed frame names on gdb backtraces.
|
||||
\fBMONO_VERBOSE_METHOD\fR
|
||||
Enables the maximum JIT verbosity for the specified method. This is
|
||||
very helpfull to diagnose a miscompilation problems of a specific
|
||||
method. This can be a comma-separated list of method names to
|
||||
match. If the name is simple, this applies to any method with that
|
||||
name, otherwise you can use a mono method description (see the section
|
||||
METHOD DESCRIPTIONS).
|
||||
method.
|
||||
.TP
|
||||
\fBMONO_JIT_DUMP_METHOD\fR
|
||||
Enables sending of the JITs intermediate representation for a specified
|
||||
@@ -1984,11 +2005,8 @@ http://www.mono-project.com/community/help/mailing-lists/
|
||||
http://www.mono-project.com
|
||||
.SH SEE ALSO
|
||||
.PP
|
||||
\fBcertmgr\fR(1), \fBcert-sync\fR(1), \fBcsharp\fR(1),
|
||||
\fBgacutil\fR(1), \fBmcs\fR(1), \fBmonodis\fR(1),
|
||||
\fBmono-config\fR(5), \fBmono\-profilers\fR(1),
|
||||
\fBmprof\-report\fR(1), \fBpdb2mdb\fR(1), \fBxsp\fR(1),
|
||||
\fBmod_mono\fR(8)
|
||||
certmgr(1), cert-sync(1), csharp(1), gacutil(1), mcs(1), mdb(1), monodis(1),
|
||||
mono-config(5), mprof-report(1), pdb2mdb(1), xsp(1), mod_mono(8).
|
||||
.PP
|
||||
For more information on AOT:
|
||||
http://www.mono-project.com/docs/advanced/aot/
|
||||
|
||||
+1
-1
@@ -202,7 +202,7 @@ Specify a parameter for a custom step.
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) 2007 Novell, Inc (http://www.novell.com)
|
||||
.SH BUGS
|
||||
Bugs report are welcome at https://github.com/mono/linker/issues
|
||||
Bugs report are welcome at http://bugzilla.xamarin.com
|
||||
.PP
|
||||
Product Mono Tools, Component linker.
|
||||
.SH MAILING LISTS
|
||||
|
||||
+535
-151
@@ -1,159 +1,543 @@
|
||||
.TH mprof-report 1
|
||||
.SH NAME
|
||||
mprof\-report \- report generator for Mono's log profiler
|
||||
.SH SYNOPSIS
|
||||
\fBmprof\-report\fR [\fIoption\fR]... \fIfile.mlpd\fR
|
||||
.SH DESCRIPTION
|
||||
\fBmprof\-report\fR is the report generator for Mono's \fBlog\fR
|
||||
profiler. It reads the MLPD log files produced by the log profiler
|
||||
and generates a report based on the options passed to it. The
|
||||
output is based on individual reports which can be turned on or off.
|
||||
By default, all reports are generated in summary form (i.e.,
|
||||
non-verbose output).
|
||||
.de Sp
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.TH mprof-report 1 ""
|
||||
.SH The Mono log profiler
|
||||
.PP
|
||||
\fBmprof\-report\fR can read both normal and \fBgzip\fR(1)-compressed
|
||||
log files transparently.
|
||||
The Mono \f[I]log\f[] profiler can be used to collect a lot of
|
||||
information about a program running in the Mono runtime.
|
||||
This data can be used (both while the process is running and later)
|
||||
to do analyses of the program behaviour, determine resource usage,
|
||||
performance issues or even look for particular execution patterns.
|
||||
.PP
|
||||
For information about how to use the log profiler with a program,
|
||||
see the \fBmono\-profilers\fR(1) page, under the \fBLOG PROFILER\fR
|
||||
section.
|
||||
.SH OPTIONS
|
||||
The following options are available:
|
||||
.TP
|
||||
\fB\-\-help\fR
|
||||
Displays usage instructions.
|
||||
.TP
|
||||
\fB\-\-out\fR=\fIfile\fR
|
||||
Write the report output to \fIfile\fR instead of standard output.
|
||||
.TP
|
||||
\fB\-\-traces\fR
|
||||
Show backtraces in reports when available.
|
||||
.TP
|
||||
\fB\-\-maxframes\fR=\fInum\fR
|
||||
Limit backtraces to \fInum\fR frames.
|
||||
.TP
|
||||
\fB\-\-reports\fR=\fIreports\fR
|
||||
Generate only the specified reports. \fIreports\fR is a
|
||||
comma-separated list of reports. See the \fBREPORTS\fR section.
|
||||
.TP
|
||||
\fB\-\-method\-sort\fR=\fImode\fR
|
||||
Sort methods according to \fImode\fR, which can be one of:
|
||||
.RS
|
||||
.TP
|
||||
\fBtotal\fR (default)
|
||||
Sort by the total amount of time spent in a method and its callees.
|
||||
.TP
|
||||
\fBself\fR
|
||||
Sort by the amount of time spent only within a method itself.
|
||||
.TP
|
||||
\fBcalls\fR
|
||||
Sort by the total amount of calls made to a method.
|
||||
This is accomplished by logging the events provided by the Mono
|
||||
runtime through the profiling interface and periodically writing
|
||||
them to a file which can be later inspected with the command line
|
||||
\f[I]mprof-report\f[] program or with a GUI (not developed yet).
|
||||
.PP
|
||||
The events collected include (among others):
|
||||
.IP \[bu] 2
|
||||
method enter and leave
|
||||
.IP \[bu] 2
|
||||
object allocation
|
||||
.IP \[bu] 2
|
||||
garbage collection
|
||||
.IP \[bu] 2
|
||||
JIT compilation
|
||||
.IP \[bu] 2
|
||||
metadata loading
|
||||
.IP \[bu] 2
|
||||
lock contention
|
||||
.IP \[bu] 2
|
||||
exceptions
|
||||
.PP
|
||||
In addition, the profiler can periodically collect info about all
|
||||
the objects present in the heap at the end of a garbage collection
|
||||
(this is called heap shot and currently implemented only for the
|
||||
sgen garbage collector).
|
||||
Another available profiler mode is the \f[I]sampling\f[] or
|
||||
\f[I]statistical\f[] mode: periodically the program is sampled and
|
||||
the information about what the program was busy with is saved.
|
||||
This allows to get information about the program behaviour without
|
||||
degrading its performance too much (usually less than 10%).
|
||||
.SS Basic profiler usage
|
||||
.PP
|
||||
The simpler way to use the profiler is the following:
|
||||
.PP
|
||||
\f[B]mono\ --profile=log\ program.exe\f[]
|
||||
.PP
|
||||
At the end of the execution the file \f[I]output.mlpd\f[] will be
|
||||
found in the current directory.
|
||||
A summary report of the data can be printed by running:
|
||||
.PP
|
||||
\f[B]mprof-report\ output.mlpd\f[]
|
||||
.PP
|
||||
With this invocation a huge amount of data is collected about the
|
||||
program execution and collecting and saving this data can
|
||||
significantly slow down program execution.
|
||||
If saving the profiling data is not needed, a report can be
|
||||
generated directly with:
|
||||
.PP
|
||||
\f[B]mono\ --profile=log:report\ program.exe\f[]
|
||||
.PP
|
||||
If the information about allocations is not of interest, it can be
|
||||
excluded:
|
||||
.PP
|
||||
\f[B]mono\ --profile=log:noalloc\ program.exe\f[]
|
||||
.PP
|
||||
On the other hand, if method call timing is not important, while
|
||||
allocations are, the needed info can be gathered with:
|
||||
.PP
|
||||
\f[B]mono\ --profile=log:nocalls\ program.exe\f[]
|
||||
.PP
|
||||
You will still be able to inspect information about the sequence of
|
||||
calls that lead to each allocation because at each object
|
||||
allocation a stack trace is collected if full enter/leave
|
||||
information is not available.
|
||||
.PP
|
||||
To periodically collect heap shots (and exclude method and
|
||||
allocation events) use the following options (making sure you run
|
||||
with the sgen garbage collector):
|
||||
.PP
|
||||
\f[B]mono\ --gc=sgen\ --profile=log:heapshot\ program.exe\f[]
|
||||
.PP
|
||||
To perform a sampling profiler run, use the \f[I]sample\f[] option:
|
||||
.PP
|
||||
\f[B]mono\ --profile=log:sample\ program.exe\f[]
|
||||
.SS Profiler option documentation
|
||||
.PP
|
||||
By default the \f[I]log\f[] profiler will gather all the events
|
||||
provided by the Mono runtime and write them to a file named
|
||||
\f[I]output.mlpd\f[].
|
||||
When no option is specified, it is equivalent to using:
|
||||
.PP
|
||||
\f[B]--profile=log:calls,alloc,output=output.mlpd,maxframes=32,calldepth=100\f[]
|
||||
.PP
|
||||
The following options can be used to modify this default behaviour.
|
||||
Each option is separated from the next by a \f[B],\f[] character,
|
||||
with no spaces and all the options are included after the
|
||||
\f[I]log:\f[] profile module specifier.
|
||||
.IP \[bu] 2
|
||||
\f[I]help\f[]: display concise help info about each available
|
||||
option
|
||||
.IP \[bu] 2
|
||||
\f[I][no]alloc\f[]: \f[I]noalloc\f[] disables collecting object
|
||||
allocation info, \f[I]alloc\f[] enables it if it was disabled by
|
||||
another option like \f[I]heapshot\f[].
|
||||
.IP \[bu] 2
|
||||
\f[I][no]calls\f[]: \f[I]nocalls\f[] disables collecting method
|
||||
enter and leave events.
|
||||
When this option is used at each object allocation and at some
|
||||
other events (like lock contentions and exception throws) a stack
|
||||
trace is collected by default.
|
||||
See the \f[I]maxframes\f[] option to control this behaviour.
|
||||
\f[I]calls\f[] enables method enter/leave events if they were
|
||||
disabled by another option like \f[I]heapshot\f[].
|
||||
.IP \[bu] 2
|
||||
\f[I]heapshot[=MODE]\f[]: collect heap shot data at each major
|
||||
collection.
|
||||
The frequency of the heap shots can be changed with the
|
||||
\f[I]MODE\f[] parameter.
|
||||
When this option is used allocation events and method enter/leave
|
||||
events are not recorded by default: if they are needed, they need
|
||||
to be enabled explicitly.
|
||||
The optional parameter \f[I]MODE\f[] can modify the default heap
|
||||
shot frequency.
|
||||
heapshot can be used multiple times with different modes: in that
|
||||
case a heap shot is taken if either of the conditions are met.
|
||||
MODE can be one of:
|
||||
.RS 2
|
||||
.IP \[bu] 2
|
||||
\f[I]NUM\f[]ms: perform a heap shot if at least \f[I]NUM\f[]
|
||||
milliseconds passed since the last one.
|
||||
.IP \[bu] 2
|
||||
\f[I]NUM\f[]gc: perform a heap shot every \f[I]NUM\f[] major
|
||||
garbage collections
|
||||
.IP \[bu] 2
|
||||
\f[I]ondemand\f[]: perform a heap shot when such a command is sent
|
||||
to the control port
|
||||
.RE
|
||||
.TP
|
||||
\fB\-\-alloc\-sort\fR=\fImode\fR
|
||||
Sort allocations according to \fImode\fR, which can be one of:
|
||||
.RS
|
||||
.TP
|
||||
\fBbytes\fR (default)
|
||||
Sort by the amount of heap bytes occupied by all allocated objects of
|
||||
a type.
|
||||
.TP
|
||||
\fBcount\fR
|
||||
Sort by the total amount of allocations of a type.
|
||||
.IP \[bu] 2
|
||||
\f[I]sample[=FREQ]\f[]: collect statistical samples of the
|
||||
program behaviour.
|
||||
The default is to collect a 100 times per second (100 Hz) the
|
||||
instruction pointer.
|
||||
This is equivalent to the value \[lq]100\[rq].
|
||||
A value of zero for \f[I]FREQ\f[] effectively disables sampling.
|
||||
.IP \[bu] 2
|
||||
\f[I]heapshot-on-shutdown\f[]: collect heap shot data when the runtime
|
||||
shuts down.
|
||||
.IP \[bu] 2
|
||||
\f[I]maxframes=NUM\f[]: when a stack trace needs to be performed,
|
||||
collect \f[I]NUM\f[] frames at the most.
|
||||
The default is 32.
|
||||
.IP \[bu] 2
|
||||
\f[I]maxsamples=NUM\f[]: stop allocating reusable sample events
|
||||
once \f[I]NUM\f[] events have been allocated (a value of zero for
|
||||
all intents and purposes means unlimited). By default, the value
|
||||
of this setting is the number of CPU cores multiplied by 1000. This
|
||||
is usually a good enough value for typical desktop and mobile apps.
|
||||
If you're losing too many samples due to this default (which is
|
||||
possible in apps with an unusually high amount of threads), you
|
||||
may want to tinker with this value to find a good balance between
|
||||
sample hit rate and performance impact on the app. The way it works
|
||||
is that sample events are enqueued for reuse after they're flushed
|
||||
to the output file; if a thread gets a sampling signal but there are
|
||||
no sample events in the reuse queue and the profiler has reached the
|
||||
maximum number of sample allocations, the sample gets dropped. So a
|
||||
higher number for this setting will increase the chance that a
|
||||
thread is able to collect a sample, but also necessarily means that
|
||||
there will be more work done by the profiler. You can run Mono with
|
||||
the \f[I]--stats\f[] option to see statistics about sample events.
|
||||
.IP \[bu] 2
|
||||
\f[I]calldepth=NUM\f[]: ignore method enter/leave events when the
|
||||
call chain depth is bigger than NUM.
|
||||
.IP \[bu] 2
|
||||
\f[I]zip\f[]: automatically compress the output data in gzip
|
||||
format.
|
||||
.IP \[bu] 2
|
||||
\f[I]output=OUTSPEC\f[]: instead of writing the profiling data to
|
||||
the output.mlpd file, substitute \f[I]%p\f[] in \f[I]OUTSPEC\f[]
|
||||
with the current process id and \f[I]%t\f[] with the current date
|
||||
and time, then do according to \f[I]OUTSPEC\f[]:
|
||||
.RS 2
|
||||
.IP \[bu] 2
|
||||
If \f[I]OUTSPEC\f[] begins with a \f[I]|\f[] character, execute the
|
||||
rest as a program and feed the data to its standard input.
|
||||
.IP \[bu] 2
|
||||
If \f[I]OUTSPEC\f[] begins with a \f[I]#\f[] character, parse the
|
||||
rest as a file descriptor number, and feed the data to this file
|
||||
descriptor.
|
||||
.IP \[bu] 2
|
||||
otherwise write the data the the named file: note that is a file by
|
||||
that name already exists, it is truncated.
|
||||
.RE
|
||||
.TP
|
||||
\fB\-\-counters\-sort\fR=\fImode\fR
|
||||
Sort counters according to \fImode\fR. This alters how the
|
||||
\fBcounters\fR report is presented. It can be one of:
|
||||
.RS
|
||||
.TP
|
||||
\fBtime\fR (default)
|
||||
Present a list of samples, each containing a list of counter
|
||||
name-value pairs.
|
||||
.TP
|
||||
\fBcategory\fR
|
||||
Present a list of counter names, each containing a list of sampled
|
||||
values.
|
||||
.IP \[bu] 2
|
||||
\f[I]report\f[]: the profiling data is sent to mprof-report, which
|
||||
will print a summary report.
|
||||
This is equivalent to the option: \f[B]output=mprof-report\ -\f[].
|
||||
If the \f[I]output\f[] option is specified as well, the report will
|
||||
be written to the output file instead of the console.
|
||||
.IP \[bu] 2
|
||||
\f[I]port=PORT\f[]: specify the tcp/ip port to use for the
|
||||
listening command server.
|
||||
Currently not available for windows.
|
||||
This server is started for example when heapshot=ondemand is used:
|
||||
it will read commands line by line.
|
||||
The following commands are available:
|
||||
.RS 2
|
||||
.IP \[bu] 2
|
||||
\f[I]heapshot\f[]: perform a heapshot as soon as possible
|
||||
.RE
|
||||
.IP
|
||||
This option has no effect unless \fB\-\-verbose\fR is passed.
|
||||
.TP
|
||||
\fB\-\-track\fR=\fIobjects\fR
|
||||
Track what happens to the specified objects. \fIobjects\fR is a
|
||||
comma-separated list of object addresses.
|
||||
.TP
|
||||
\fB\-\-find\fR=\fIspec\fR
|
||||
Find and track what happens to objects matching \fIspec\fR, which can
|
||||
have one of these forms:
|
||||
.RS
|
||||
.TP
|
||||
\fBS\fR:\fIminimum_size\fR
|
||||
Look for objects that are at least \fIminimum_size\fR bytes in size.
|
||||
.TP
|
||||
\fBT\fR:\fIname_fragment\fR
|
||||
Look for objects whose type name contain \fIname_fragment\fR.
|
||||
.IP \[bu] 2
|
||||
\f[I]nocounters\f[]: disables sampling of runtime and performance
|
||||
counters, which is normally done every 1 second.
|
||||
.IP \[bu] 2
|
||||
\f[I]coverage\f[]: collect code coverage data. This implies enabling
|
||||
the \f[I]calls\f[] option.
|
||||
.RE
|
||||
.IP
|
||||
Both an \fBS\fR and \fBT\fR spec can be given by passing the option
|
||||
twice.
|
||||
.TP
|
||||
\fB\-\-thread\fR=\fItid\fR
|
||||
Consider only events from the thread with ID \fItid\fR.
|
||||
.TP
|
||||
\fB\-\-time\fR=\fIspan\fR
|
||||
Consider only events occurring in the specified time span. \fIspan\fR
|
||||
must be of the form \fIfrom\fR\-\fIto\fR where \fIfrom\fR and
|
||||
\fIto\fR are seconds since the program started.
|
||||
.TP
|
||||
\fB\-\-verbose\fR
|
||||
Print verbose output.
|
||||
.TP
|
||||
\fB\-\-debug\fR
|
||||
Print extremely detailed debug output. Most users should not use this
|
||||
.SS Analyzing the profile data
|
||||
.PP
|
||||
Currently there is a command line program (\f[I]mprof-report\f[])
|
||||
to analyze the data produced by the profiler.
|
||||
This is ran automatically when the \f[I]report\f[] profiler option
|
||||
is used.
|
||||
Simply run:
|
||||
.PP
|
||||
\f[B]mprof-report\ output.mlpd\f[]
|
||||
.PP
|
||||
to see a summary report of the data included in the file.
|
||||
.SS Trace information for events
|
||||
.PP
|
||||
Often it is important for some events, like allocations, lock
|
||||
contention and exception throws to know where they happened.
|
||||
Or we may want to see what sequence of calls leads to a particular
|
||||
method invocation.
|
||||
To see this info invoke mprof-report as follows:
|
||||
.PP
|
||||
\f[B]mprof-report\ --traces\ output.mlpd\f[]
|
||||
.PP
|
||||
The maximum number of methods in each stack trace can be specified
|
||||
with the \f[I]--maxframes=NUM\f[] option:
|
||||
.PP
|
||||
\f[B]mprof-report\ --traces\ --maxframes=4\ output.mlpd\f[]
|
||||
.PP
|
||||
The stack trace info will be available if method enter/leave events
|
||||
have been recorded or if stack trace collection wasn't explicitly
|
||||
disabled with the \f[I]maxframes=0\f[] profiler option.
|
||||
.PP
|
||||
The \f[I]--traces\f[] option also controls the reverse reference
|
||||
feature in the heapshot report: for each class it reports how many
|
||||
references to objects of that class come from other classes.
|
||||
.SS Sort order for methods and allocations
|
||||
.PP
|
||||
When a list of methods is printed the default sort order is based
|
||||
on the total time spent in the method.
|
||||
This time is wall clock time (that is, it includes the time spent,
|
||||
for example, in a sleep call, even if actual cpu time would be
|
||||
basically 0).
|
||||
Also, if the method has been ran on different threads, the time
|
||||
will be a sum of the time used in each thread.
|
||||
.PP
|
||||
To change the sort order, use the option:
|
||||
.PP
|
||||
\f[B]--method-sort=MODE\f[]
|
||||
.PP
|
||||
where \f[I]MODE\f[] can be:
|
||||
.IP \[bu] 2
|
||||
\f[I]self\f[]: amount of time spent in the method itself and not in
|
||||
its callees
|
||||
.IP \[bu] 2
|
||||
\f[I]calls\f[]: the number of method invocations
|
||||
.IP \[bu] 2
|
||||
\f[I]total\f[]: the total time spent in the method.
|
||||
.PP
|
||||
Object allocation lists are sorted by default depending on the
|
||||
total amount of bytes used by each type.
|
||||
.PP
|
||||
To change the sort order of object allocations, use the option:
|
||||
.PP
|
||||
\f[B]--alloc-sort=MODE\f[]
|
||||
.PP
|
||||
where \f[I]MODE\f[] can be:
|
||||
.IP \[bu] 2
|
||||
\f[I]count\f[]: the number of allocated objects of the given type
|
||||
.IP \[bu] 2
|
||||
\f[I]bytes\f[]: the total number of bytes used by objects of the
|
||||
given type
|
||||
.PP
|
||||
To change the sort order of counters, use the option:
|
||||
.PP
|
||||
\f[B]--counters-sort=MODE\f[]
|
||||
.PP
|
||||
where \f[I]MODE\f[] can be:
|
||||
.IP \[bu] 2
|
||||
\f[I]time\f[]: sort values by time then category
|
||||
.IP \[bu] 2
|
||||
\f[I]category\f[]: sort values by category then time
|
||||
.SS Selecting what data to report
|
||||
.PP
|
||||
The profiler by default collects data about many runtime subsystems
|
||||
and mprof-report prints a summary of all the subsystems that are
|
||||
found in the data file.
|
||||
It is possible to tell mprof-report to only show information about
|
||||
some of them with the following option:
|
||||
.PP
|
||||
\f[B]--reports=R1[,R2...]\f[]
|
||||
.PP
|
||||
where the report names R1, R2 etc.
|
||||
can be:
|
||||
.IP \[bu] 2
|
||||
\f[I]header\f[]: information about program startup and profiler
|
||||
version
|
||||
.IP \[bu] 2
|
||||
\f[I]jit\f[]: JIT compiler information
|
||||
.IP \[bu] 2
|
||||
\f[I]sample\f[]: statistical sampling information
|
||||
.IP \[bu] 2
|
||||
\f[I]gc\f[]: garbage collection information
|
||||
.IP \[bu] 2
|
||||
\f[I]alloc\f[]: object allocation information
|
||||
.IP \[bu] 2
|
||||
\f[I]call\f[]: method profiling information
|
||||
.IP \[bu] 2
|
||||
\f[I]metadata\f[]: metadata events like image loads
|
||||
.IP \[bu] 2
|
||||
\f[I]exception\f[]: exception throw and handling information
|
||||
.IP \[bu] 2
|
||||
\f[I]monitor\f[]: lock contention information
|
||||
.IP \[bu] 2
|
||||
\f[I]thread\f[]: thread information
|
||||
.IP \[bu] 2
|
||||
\f[I]domain\f[]: app domain information
|
||||
.IP \[bu] 2
|
||||
\f[I]context\f[]: remoting context information
|
||||
.IP \[bu] 2
|
||||
\f[I]heapshot\f[]: live heap usage at heap shots
|
||||
.IP \[bu] 2
|
||||
\f[I]counters\f[]: counters samples
|
||||
.IP \[bu] 2
|
||||
\f[I]coverage\f[]: code coverage data
|
||||
.IP \[bu] 2
|
||||
\f[I]stats\f[]: event statistics
|
||||
.PP
|
||||
It is possible to limit some of the data displayed to a timeframe
|
||||
of the program execution with the option:
|
||||
.PP
|
||||
\f[B]--time=FROM-TO\f[]
|
||||
.PP
|
||||
where \f[I]FROM\f[] and \f[I]TO\f[] are seconds since application
|
||||
startup (they can be floating point numbers).
|
||||
.PP
|
||||
Another interesting option is to consider only events happening on
|
||||
a particular thread with the following option:
|
||||
.PP
|
||||
\f[B]--thread=THREADID\f[]
|
||||
.PP
|
||||
where \f[I]THREADID\f[] is one of the numbers listed in the thread
|
||||
summary report (or a thread name when present).
|
||||
.PP
|
||||
By default long lists of methods or other information like object
|
||||
allocations are limited to the most important data.
|
||||
To increase the amount of information printed you can use the
|
||||
option:
|
||||
.PP
|
||||
\f[B]--verbose\f[]
|
||||
.SS Track individual objects
|
||||
.PP
|
||||
Instead of printing the usual reports from the profiler data, it is
|
||||
possible to track some interesting information about some specific
|
||||
object addresses.
|
||||
The objects are selected based on their address with the
|
||||
\f[I]--track\f[] option as follows:
|
||||
.PP
|
||||
\f[B]--track=0xaddr1[,0xaddr2,...]\f[]
|
||||
.PP
|
||||
The reported info (if available in the data file), will be class
|
||||
name, size, creation time, stack trace of creation (with the
|
||||
\f[I]--traces\f[] option), etc.
|
||||
If heapshot data is available it will be possible to also track
|
||||
what other objects reference one of the listed addresses.
|
||||
.PP
|
||||
The object addresses can be gathered either from the profiler
|
||||
report in some cases (like in the monitor lock report), from the
|
||||
live application or they can be selected with the
|
||||
\f[I]--find=FINDSPEC\f[] option.
|
||||
FINDSPEC can be one of the following:
|
||||
.IP \[bu] 2
|
||||
\f[I]S:SIZE\f[]: where the object is selected if its size is at
|
||||
least \f[I]SIZE\f[]
|
||||
.IP \[bu] 2
|
||||
\f[I]T:NAME\f[]: where the object is selected if \f[I]NAME\f[]
|
||||
partially matches its class name
|
||||
.PP
|
||||
This option can be specified multiple times with one of the
|
||||
different kinds of FINDSPEC.
|
||||
For example, the following:
|
||||
.PP
|
||||
\f[B]--find=S:10000\ --find=T:Byte[]\f[]
|
||||
.PP
|
||||
will find all the byte arrays that are at least 10000 bytes in
|
||||
size.
|
||||
.PP
|
||||
Note that with a moving garbage collector the object address can
|
||||
change, so you may need to track the changed address manually.
|
||||
It can also happen that multiple objects are allocated at the same
|
||||
address, so the output from this option can become large.
|
||||
.SS Saving a profiler report
|
||||
.PP
|
||||
By default mprof-report will print the summary data to the console.
|
||||
To print it to a file, instead, use the option:
|
||||
.PP
|
||||
\f[B]--out=FILENAME\f[]
|
||||
.SS Processing code coverage data
|
||||
.PP
|
||||
If you ran the profiler with the \f[I]coverage\f[] option, you can
|
||||
process the collected coverage data into an XML file by running
|
||||
mprof-report like this:
|
||||
.PP
|
||||
\f[B]mprof-report --coverage-out=coverage.xml output.mlpd\f[]
|
||||
.SS Dealing with profiler slowness
|
||||
.PP
|
||||
If the profiler needs to collect lots of data, the execution of the
|
||||
program will slow down significantly, usually 10 to 20 times
|
||||
slower.
|
||||
There are several ways to reduce the impact of the profiler on the
|
||||
program execution.
|
||||
.IP "\f[I]Use the statistical sampling mode\f[]" 4
|
||||
.Sp
|
||||
Statistical sampling allows executing a program under the profiler
|
||||
with minimal performance overhead (usually less than 10%).
|
||||
This mode allows checking where the program is spending most of
|
||||
its execution time without significantly perturbing its behaviour.
|
||||
.IP "\f[I]Collect less data\f[]" 4
|
||||
.Sp
|
||||
Collecting method enter/leave events can be very expensive,
|
||||
especially in programs that perform many millions of tiny calls.
|
||||
The profiler option \f[I]nocalls\f[] can be used to avoid
|
||||
collecting this data or it can be limited to only a few call levels
|
||||
with the \f[I]calldepth\f[] option.
|
||||
.Sp
|
||||
Object allocation information is expensive as well, though much
|
||||
less than method enter/leave events.
|
||||
If it's not needed, it can be skipped with the \f[I]noalloc\f[]
|
||||
profiler option.
|
||||
Note that when method enter/leave events are discarded, by default
|
||||
stack traces are collected at each allocation and this can be
|
||||
expensive as well.
|
||||
The impact of stack trace information can be reduced by setting a
|
||||
low value with the \f[I]maxframes\f[] option or by eliminating them
|
||||
completely, by setting it to 0.
|
||||
.Sp
|
||||
The other major source of data is the \f[I]heapshot\f[] profiler
|
||||
option: especially if the managed heap is big, since every object
|
||||
needs to be inspected.
|
||||
The \f[I]MODE\f[] parameter of the \f[I]heapshot\f[] option can be
|
||||
used to reduce the frequency of the heap shots.
|
||||
.SS Dealing with the size of the data files
|
||||
.PP
|
||||
When collecting a lot of information about a profiled program, huge
|
||||
data files can be generated.
|
||||
There are a few ways to minimize the amount of data, for example by
|
||||
not collecting some of the more space-consuming information or by
|
||||
compressing the information on the fly or by just generating a
|
||||
summary report.
|
||||
.IP "\f[I]Reducing the amount of data\f[]" 4
|
||||
.Sp
|
||||
Method enter/leave events can be excluded completely with the
|
||||
\f[I]nocalls\f[] option or they can be limited to just a few levels
|
||||
of calls with the \f[I]calldepth\f[] option.
|
||||
For example, the option:
|
||||
.Sp
|
||||
\f[B]calldepth=10\f[]
|
||||
.Sp
|
||||
will ignore the method events when there are more than 10 managed
|
||||
stack frames.
|
||||
This is very useful for programs that have deep recursion or for
|
||||
programs that perform many millions of tiny calls deep enough in
|
||||
the call stack.
|
||||
The optimal number for the calldepth option depends on the program
|
||||
and it needs to be balanced between providing enough profiling
|
||||
information and allowing fast execution speed.
|
||||
.Sp
|
||||
Note that by default, if method events are not recorded at all, the
|
||||
profiler will collect stack trace information at events like
|
||||
allocations.
|
||||
To avoid gathering this data, use the \f[I]maxframes=0\f[] profiler
|
||||
option.
|
||||
.SH REPORTS
|
||||
The following reports are available:
|
||||
.TP
|
||||
\fBheader\fR
|
||||
Program startup and profiler version and operational information.
|
||||
.TP
|
||||
\fBjit\fR
|
||||
JIT compiler statistics.
|
||||
.TP
|
||||
\fBgc\fR
|
||||
Garbage collection and handle statistics.
|
||||
.TP
|
||||
\fBsample\fR
|
||||
Flat statistical sampling profile.
|
||||
.TP
|
||||
\fBalloc\fR
|
||||
Per-class GC allocation statistics and backtraces.
|
||||
.TP
|
||||
\fBcall\fR
|
||||
Method call statistics and backtraces.
|
||||
.TP
|
||||
\fBmetadata\fR
|
||||
Loaded images and assemblies.
|
||||
.TP
|
||||
\fBexception\fR
|
||||
Exception statistics and backtraces.
|
||||
.TP
|
||||
\fBmonitor\fR
|
||||
Monitor lock statistics and backtraces.
|
||||
.TP
|
||||
\fBthread\fR
|
||||
Managed thread names.
|
||||
.TP
|
||||
\fBdomain\fR
|
||||
Loaded application domains.
|
||||
.TP
|
||||
\fBcontext\fR
|
||||
Loaded remoting contexts.
|
||||
.TP
|
||||
\fBheapshot\fR
|
||||
Heap snapshot information.
|
||||
.TP
|
||||
\fBcounters\fR
|
||||
Performance counter samples.
|
||||
.Sp
|
||||
Allocation events can be eliminated with the \f[I]noalloc\f[]
|
||||
option.
|
||||
.Sp
|
||||
Heap shot data can also be huge: by default it is collected at each
|
||||
major collection.
|
||||
To reduce the frequency, you can specify a heapshot mode: for
|
||||
example to collect every 5 collections (including major and minor):
|
||||
.Sp
|
||||
\f[B]heapshot=5gc\f[]
|
||||
.Sp
|
||||
or when at least 5 seconds passed since the last heap shot:
|
||||
.Sp
|
||||
\f[B]heapshot=5000ms\f[]
|
||||
.IP "\f[I]Compressing the data\f[]" 4
|
||||
.Sp
|
||||
To reduce the amout of disk space used by the data, the data can be
|
||||
compressed either after it has been generated with the gzip
|
||||
command:
|
||||
.Sp
|
||||
\f[B]gzip\ -9\ output.mlpd\f[]
|
||||
.Sp
|
||||
or it can be compressed automatically by using the \f[I]zip\f[]
|
||||
profiler option.
|
||||
Note that in this case there could be a significant slowdown of the
|
||||
profiled program.
|
||||
.Sp
|
||||
The mprof-report program will tranparently deal with either
|
||||
compressed or uncompressed data files.
|
||||
.IP "\f[I]Generating only a summary report\f[]" 4
|
||||
.Sp
|
||||
Often it's enough to look at the profiler summary report to
|
||||
diagnose an issue and in this case it's possible to avoid saving
|
||||
the profiler data file to disk.
|
||||
This can be accomplished with the \f[I]report\f[] profiler option,
|
||||
which will basically send the data to the mprof-report program for
|
||||
display.
|
||||
.Sp
|
||||
To have more control of what summary information is reported (or to
|
||||
use a completely different program to decode the profiler data),
|
||||
the \f[I]output\f[] profiler option can be used, with \f[B]|\f[] as
|
||||
the first character: the rest of the output name will be executed
|
||||
as a program with the data fed in on the standard input.
|
||||
.Sp
|
||||
For example, to print only the Monitor summary with stack trace
|
||||
information, you could use it like this:
|
||||
.Sp
|
||||
\f[B]output=|mprof-report\ --reports=monitor\ --traces\ -\f[]
|
||||
.SH WEB SITE
|
||||
http://www.mono-project.com/docs/debug+profile/profile/profiler/
|
||||
.SH SEE ALSO
|
||||
\fBmono\fR(1), \fBmono\-profilers\fR(1)
|
||||
.PP
|
||||
mono(1)
|
||||
.SH AUTHORS
|
||||
Paolo Molaro, Alex Rønne Petersen
|
||||
+2
-2
@@ -515,10 +515,10 @@ The Mono SQL Query Tool is released under the terms of the GNU GPL.
|
||||
Please read the accompanying `COPYING' file for details. Alternative
|
||||
licenses are available from Novell or Daniel Morgan.
|
||||
.SH BUGS
|
||||
To report bugs in the compiler, you can
|
||||
To report bugs in the compiler, you can use `bug-buddy', or you can
|
||||
file bug reports in our bug tracking system:
|
||||
.nf
|
||||
https://github.com/mono/mono/issues
|
||||
http://bugzilla.xamarin.com.
|
||||
.fi
|
||||
.PP
|
||||
.SH MAILING LISTS
|
||||
|
||||
+4
-8
@@ -6,9 +6,8 @@ SUBDIRS := build jay mcs class nunit24 ilasm tools tests errors docs packages
|
||||
|
||||
basic_SUBDIRS := build jay class
|
||||
build_SUBDIRS := build class class/aot-compiler tools ilasm
|
||||
monodroid_SUBDIRS := build class tools
|
||||
monodroid_tools_SUBDIRS := build class tools
|
||||
monotouch_SUBDIRS := build class tools
|
||||
monodroid_SUBDIRS := build class
|
||||
monotouch_SUBDIRS := build class
|
||||
monotouch_watch_SUBDIRS := build class
|
||||
monotouch_tv_SUBDIRS := build class
|
||||
monotouch_runtime_SUBDIRS := build class
|
||||
@@ -25,7 +24,6 @@ xbuild_14_SUBDIRS := build class tools/xbuild
|
||||
winaot_SUBDIRS := build class
|
||||
orbis_SUBDIRS := build class
|
||||
unreal_SUBDIRS := build class
|
||||
wasm_SUBDIRS := build class
|
||||
|
||||
include build/rules.make
|
||||
|
||||
@@ -47,7 +45,7 @@ all-profiles $(STD_TARGETS:=-profiles): %-profiles: profiles-do--%
|
||||
@:
|
||||
|
||||
profiles-do--%:
|
||||
$(if $(PROFILES),$(MAKE) $(PROFILES:%=profile-do--%--$*))
|
||||
$(MAKE) $(PROFILES:%=profile-do--%--$*)
|
||||
|
||||
# The % below looks like profile-name--target-name
|
||||
profile-do--%:
|
||||
@@ -68,7 +66,6 @@ $(_boot_:%=profile-do--xbuild_12--%): profile-do--xbuild_12--%:
|
||||
$(_boot_:%=profile-do--binary_reference_assemblies--%): profile-do--binary_reference_assemblies--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--net_4_x--%): profile-do--net_4_x--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--monodroid--%): profile-do--monodroid--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--monodroid_tools--%): profile-do--monodroid_tools--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--monotouch--%): profile-do--monotouch--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--monotouch_watch--%): profile-do--monotouch_watch--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--monotouch_tv--%): profile-do--monotouch_tv--%: profile-do--build--%
|
||||
@@ -82,7 +79,6 @@ $(_boot_:%=profile-do--testing_aot_full--%): profile-do--testing_aot_fu
|
||||
$(_boot_:%=profile-do--winaot--%): profile-do--winaot--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--orbis--%): profile-do--orbis--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--unreal--%): profile-do--unreal--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--wasm--%): profile-do--wasm--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--build--%): profile-do--build--%: profile-do--basic--%
|
||||
|
||||
testcorlib:
|
||||
@@ -159,7 +155,7 @@ $(MONO_API_SNAPSHOT_PROFILE_PATH)%.cs: $(topdir)class/lib/$(PROFILE)/%.dll $(GEN
|
||||
mono-api-current: $(MONO_API_ASSEMBLIES_CS)
|
||||
|
||||
mono-api-current-clean:
|
||||
$(Q) find "$(MONO_API_SNAPSHOT_PROFILE_PATH)" -name "*.cs" -type f -delete
|
||||
$(Q) rm -rf "$(MONO_API_SNAPSHOT_PROFILE_PATH)"
|
||||
|
||||
mono-api-diff:
|
||||
@echo "Regenerating API snapshot..."
|
||||
|
||||
@@ -42,7 +42,7 @@ class X {
|
||||
|
||||
Version min_mono_version;
|
||||
#if __MonoCS__
|
||||
min_mono_version = new Version (5, 11);
|
||||
min_mono_version = new Version (5, 5);
|
||||
#else
|
||||
min_mono_version = new Version (4, 9);
|
||||
#endif
|
||||
|
||||
@@ -10,17 +10,9 @@
|
||||
CODEPAGE = 65001
|
||||
|
||||
RUNTIME_FLAGS =
|
||||
|
||||
ifdef TEST_WITH_INTERPRETER
|
||||
TEST_RUNTIME_FLAGS = --interpreter
|
||||
else
|
||||
TEST_RUNTIME_FLAGS =
|
||||
endif
|
||||
|
||||
TEST_HARNESS = $(topdir)/class/lib/$(PROFILE_DIRECTORY)/$(PARENT_PROFILE)nunit-lite-console.exe
|
||||
PLATFORM_DEBUG_FLAGS = /debug:portable
|
||||
# Workaround for https://bugzilla.xamarin.com/show_bug.cgi?id=59967
|
||||
MCS_FLAGS = /features:peverify-compat /langversion:latest
|
||||
MCS_FLAGS =
|
||||
MBAS_FLAGS = -debug
|
||||
LIBRARY_FLAGS =
|
||||
ifndef CFLAGS
|
||||
@@ -32,9 +24,7 @@ mono_libdir = $(exec_prefix)/lib
|
||||
sysconfdir = $(prefix)/etc
|
||||
#RUNTIME = mono
|
||||
RUNTIME = false
|
||||
MONO_PATH_TOP = $(topdir)/class/lib/$(PROFILE_DIRECTORY)/
|
||||
MONO_PATH_TESTS = $(MONO_PATH_TOP)/tests
|
||||
TEST_RUNTIME = MONO_PATH="$(MONO_PATH_TOP)$(PLATFORM_PATH_SEPARATOR)$(TEST_MONO_PATH)$(PLATFORM_PATH_SEPARATOR)$(MONO_PATH_TESTS)$(PLATFORM_PATH_SEPARATOR).$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) --debug
|
||||
TEST_RUNTIME = MONO_PATH="./$(PLATFORM_PATH_SEPARATOR)$(topdir)/class/lib/$(PROFILE_DIRECTORY)$(PLATFORM_PATH_SEPARATOR)$(TEST_MONO_PATH)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) --debug
|
||||
|
||||
# In case you want to add MCS_FLAGS, this lets you not have to
|
||||
# keep track of the default value
|
||||
|
||||
@@ -42,16 +42,8 @@ executable_CLEAN_FILES += $(build_lib) $(build_lib).so $(build_lib).mdb $(build_
|
||||
|
||||
makefrag = $(depsdir)/$(PROFILE)_$(base_prog).makefrag
|
||||
|
||||
ifdef TARGET_NET_REFERENCE
|
||||
# System.*.dll references come from the TARGET_NET_REFERENCE dir, others from the profile dir
|
||||
LIB_REFS_MONO = $(call _FILTER_OUT,System,$(LIB_REFS))
|
||||
LIB_REFS_SYSTEM = $(filter-out $(LIB_REFS_MONO),$(LIB_REFS))
|
||||
|
||||
MCS_REFERENCES = $(patsubst %,-r:$(topdir)/../external/binary-reference-assemblies/$(TARGET_NET_REFERENCE)/%.dll,$(LIB_REFS_SYSTEM))
|
||||
MCS_REFERENCES += $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/%.dll,$(LIB_REFS_MONO))
|
||||
else
|
||||
MCS_REFERENCES = $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/%.dll,$(LIB_REFS))
|
||||
endif
|
||||
MCS_REFERENCES += $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/%.exe,$(EXE_REFS))
|
||||
|
||||
ifdef KEYFILE
|
||||
LIB_MCS_FLAGS += /keyfile:$(KEYFILE)
|
||||
|
||||
Executable → Regular
+1
-26
@@ -7,7 +7,7 @@ extfile=$4
|
||||
extexcfile=$5
|
||||
|
||||
process_includes_1() {
|
||||
sed -e '/^[ \t]*$/d' -e '/^[ \t]*#/d' -e '/*/d' $1 > $2
|
||||
sed -e '/^[ \t]*$/d' -e '/^[ \t]*#/d' $1 > $2
|
||||
if cmp -s $1 $2; then
|
||||
false
|
||||
else
|
||||
@@ -17,31 +17,6 @@ process_includes_1() {
|
||||
echo $outfile: $inc >> $outfile.makefrag
|
||||
echo $inc: >> $outfile.makefrag
|
||||
done
|
||||
|
||||
# expand wildcards
|
||||
sed -n '/*/p' $1 | grep -v '#' |
|
||||
while read wildc; do
|
||||
# quick syntax to exclude files:
|
||||
# ../../../MyDir/*.cs:FileToExclude1.cs,FileToExclude2.cs
|
||||
wc=`echo $wildc | cut -d \: -f 1` # ../../../MyDir/*.cs
|
||||
qexc=`echo $wildc | cut -d \: -f 2` # FileToExclude1.cs,FileToExclude2.cs
|
||||
|
||||
if test "$wc" = "$qexc"; then
|
||||
# no quick excludes - just expand the wildcard
|
||||
ls $wildc >> $2
|
||||
else
|
||||
wcdir=`echo $wildc | cut -d \* -f 1` # ../../../MyDir/
|
||||
# Enumerate files from 'FileToExclude1.cs,FileToExclude2.cs'
|
||||
# and save to $outfile.exc
|
||||
oldIFS=$IFS
|
||||
IFS=,
|
||||
for i in $qexc; do
|
||||
echo "$wcdir$i" >> $outfile.exc
|
||||
done
|
||||
IFS=$oldIFS
|
||||
ls $wc >> $2
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
+6
-39
@@ -18,31 +18,13 @@
|
||||
# Have to rename to handle differences between assembly/directory names
|
||||
DEP_LIBS=$(patsubst System.Xml,System.XML,$(LIB_REFS))
|
||||
|
||||
_FILTER_OUT = $(foreach x,$(2),$(if $(findstring $(1),$(x)),,$(x)))
|
||||
|
||||
LIB_REFS_FULL = $(call _FILTER_OUT,=, $(LIB_REFS))
|
||||
LIB_REFS_ALIAS = $(filter-out $(LIB_REFS_FULL),$(LIB_REFS))
|
||||
|
||||
ifdef TARGET_NET_REFERENCE
|
||||
# System.*.dll references come from the TARGET_NET_REFERENCE dir, others from the profile dir
|
||||
LIB_REFS_MONO_FULL = $(call _FILTER_OUT,System,$(LIB_REFS_FULL))
|
||||
LIB_REFS_MONO_ALIAS = $(call _FILTER_OUT,System,$(LIB_REFS_ALIAS))
|
||||
|
||||
LIB_REFS_SYSTEM_FULL = $(filter-out $(LIB_REFS_MONO_FULL),$(LIB_REFS_FULL))
|
||||
LIB_REFS_SYSTEM_ALIAS = $(filter-out $(LIB_REFS_MONO_ALIAS),$(LIB_REFS_ALIAS))
|
||||
|
||||
LIB_MCS_FLAGS += $(patsubst %,-r:$(topdir)/../external/binary-reference-assemblies/$(TARGET_NET_REFERENCE)/%.dll,$(LIB_REFS_SYSTEM_FULL))
|
||||
LIB_MCS_FLAGS += $(patsubst %,-r:%.dll, $(subst =,=$(topdir)/../external/binary-reference-assemblies/$(TARGET_NET_REFERENCE)/,$(LIB_REFS_SYSTEM_ALIAS)))
|
||||
|
||||
LIB_MCS_FLAGS += $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/%.dll,$(LIB_REFS_MONO_FULL))
|
||||
LIB_MCS_FLAGS += $(patsubst %,-r:%.dll, $(subst =,=$(topdir)/class/lib/$(PROFILE_DIRECTORY)/,$(LIB_REFS_MONO_ALIAS)))
|
||||
else
|
||||
|
||||
ifdef API_BIN_REFS
|
||||
LIB_MCS_FLAGS += $(patsubst %,-r:$(topdir)/../external/binary-reference-assemblies/$(API_BIN_PROFILE)/%.dll,$(API_BIN_REFS))
|
||||
endif
|
||||
|
||||
LIB_MCS_FLAGS += $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/%.dll,$(LIB_REFS_FULL))
|
||||
LIB_MCS_FLAGS += $(patsubst %,-r:%.dll, $(subst =,=$(topdir)/class/lib/$(PROFILE_DIRECTORY)/,$(LIB_REFS_ALIAS)))
|
||||
endif
|
||||
|
||||
ifdef KEYFILE
|
||||
KEYFILE_MCS_FLAGS += /keyfile:$(KEYFILE)
|
||||
@@ -63,15 +45,6 @@ the_libdir_base = $(topdir)/class/$(lib_dir)/$(PROFILE_DIRECTORY)/$(if $(LIBRARY
|
||||
ifdef RESOURCE_STRINGS
|
||||
ifneq (basic, $(PROFILE))
|
||||
RESOURCE_STRINGS_FILES += $(RESOURCE_STRINGS:%=--resourcestrings:%)
|
||||
IL_REPLACE_FILES += $(IL_REPLACE:%=--ilreplace:%)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef ENFORCE_LIBRARY_WARN_AS_ERROR
|
||||
ifeq ($(LIBRARY_WARN_AS_ERROR),yes)
|
||||
ifndef MCS_MODE
|
||||
LIB_MCS_FLAGS += -warnaserror
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -338,10 +311,10 @@ endif
|
||||
|
||||
ifndef NO_BUILD
|
||||
|
||||
$(build_lib): $(response) $(sn) $(BUILT_SOURCES) $(build_libdir)/.stamp $(GEN_RESOURCE_DEPS) $(MODULE_DEPS)
|
||||
$(build_lib): $(response) $(sn) $(BUILT_SOURCES) $(build_libdir)/.stamp $(GEN_RESOURCE_DEPS)
|
||||
$(LIBRARY_COMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) $(KEYFILE_MCS_FLAGS) $(GEN_RESOURCE_FLAGS) -target:library -out:$@ $(BUILT_SOURCES_cmdline) @$(response)
|
||||
ifdef RESOURCE_STRINGS_FILES
|
||||
$(Q) $(STRING_REPLACER) $(RESOURCE_STRINGS_FILES) $(IL_REPLACE_FILES) $@
|
||||
$(Q) $(STRING_REPLACER) $(RESOURCE_STRINGS_FILES) $@
|
||||
endif
|
||||
$(Q) $(SN) -R $@ $(LIBRARY_SNK)
|
||||
|
||||
@@ -388,11 +361,5 @@ $(the_libdir)/.doc-stamp: $(the_lib)
|
||||
gen-deps:
|
||||
@echo "$(DEPS_TARGET_DIR): $(DEP_DIRS) $(DEP_LIBS)" >> $(DEPS_FILE)
|
||||
|
||||
update-corefx-sr-generic:
|
||||
ifneq ($(RESX_STRINGS),)
|
||||
MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/resx2sr.exe $(RESX_STRINGS) >$(SR_OUTPUT)
|
||||
endif
|
||||
|
||||
update-corefx-sr: $(RESX_RESOURCE_STRING) $(XTEST_RESX_RESOURCE_STRING)
|
||||
make SR_OUTPUT=corefx/SR.cs RESX_STRINGS="$(RESX_RESOURCE_STRING)" update-corefx-sr-generic \
|
||||
&& make SR_OUTPUT=corefx/SR.tests.cs RESX_STRINGS=$(XTEST_RESX_RESOURCE_STRING) update-corefx-sr-generic
|
||||
update-corefx-sr: $(RESX_RESOURCE_STRING)
|
||||
MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/resx2sr.exe $(RESX_RESOURCE_STRING) >corefx/SR.cs
|
||||
@@ -31,8 +31,6 @@ MCS = $(BOOTSTRAP_MCS)
|
||||
DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
|
||||
|
||||
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:WIN_PLATFORM -d:BOOTSTRAP_BASIC -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES)
|
||||
API_BIN_PROFILE = v4.7.1
|
||||
|
||||
NO_SIGN_ASSEMBLY = yes
|
||||
NO_TEST = yes
|
||||
NO_INSTALL = yes
|
||||
@@ -47,7 +45,7 @@ LIBRARY_COMPILE = $(BOOT_COMPILE)
|
||||
#
|
||||
# Copy from rules.make because I don't know how to unset MCS_FLAGS
|
||||
#
|
||||
USE_MCS_FLAGS = /codepage:$(CODEPAGE) /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
|
||||
USE_MCS_FLAGS = /codepage:$(CODEPAGE) /nologo /noconfig $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS)
|
||||
|
||||
.PHONY: profile-check do-profile-check
|
||||
profile-check:
|
||||
|
||||
@@ -15,12 +15,9 @@ profile-check:
|
||||
|
||||
DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/mscorlib.dll
|
||||
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES)
|
||||
API_BIN_PROFILE = v4.7.1
|
||||
|
||||
NO_SIGN_ASSEMBLY = yes
|
||||
NO_TEST = yes
|
||||
NO_INSTALL = yes
|
||||
|
||||
FRAMEWORK_VERSION = 4.5
|
||||
MONO_FEATURE_APPLETLS=1
|
||||
|
||||
@@ -27,7 +27,6 @@ PROFILE_MCS_FLAGS = \
|
||||
$(DEFAULT_REFERENCES) \
|
||||
$(PLATFORM_DEBUG_FLAGS)
|
||||
|
||||
API_BIN_PROFILE = build/monodroid
|
||||
FRAMEWORK_VERSION = 2.1
|
||||
|
||||
# the tuner takes care of the install
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
# -*- makefile -*-
|
||||
|
||||
BOOTSTRAP_PROFILE = build
|
||||
|
||||
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC)
|
||||
MCS = $(BOOTSTRAP_MCS)
|
||||
|
||||
profile-check:
|
||||
@:
|
||||
|
||||
TARGET_NET_REFERENCE = v4.6
|
||||
DEFAULT_REFERENCES = -r:$(topdir)/../external/binary-reference-assemblies/$(TARGET_NET_REFERENCE)/mscorlib.dll
|
||||
|
||||
PROFILE_MCS_FLAGS = -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
|
||||
|
||||
FRAMEWORK_VERSION = 4.5
|
||||
|
||||
NO_INSTALL = yes
|
||||
@@ -28,7 +28,6 @@ PROFILE_MCS_FLAGS = \
|
||||
$(PLATFORM_DEBUG_FLAGS) \
|
||||
$(MONOTOUCH_MCS_FLAGS)
|
||||
|
||||
API_BIN_PROFILE = build/monotouch
|
||||
FRAMEWORK_VERSION = 2.1
|
||||
|
||||
# This is utility build only
|
||||
|
||||
@@ -14,10 +14,7 @@ profile-check:
|
||||
|
||||
DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/mscorlib.dll
|
||||
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -d:MULTIPLEX_OS -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
|
||||
API_BIN_PROFILE = v4.7.1
|
||||
|
||||
FRAMEWORK_VERSION = 4.5
|
||||
XBUILD_VERSION = 4.0
|
||||
MONO_FEATURE_APPLETLS=1
|
||||
|
||||
ENFORCE_LIBRARY_WARN_AS_ERROR = yes
|
||||
@@ -29,7 +29,6 @@ PROFILE_MCS_FLAGS = \
|
||||
$(DEFAULT_REFERENCES) \
|
||||
$(PLATFORM_DEBUG_FLAGS)
|
||||
|
||||
API_BIN_PROFILE = build/monotouch
|
||||
FRAMEWORK_VERSION = 2.1
|
||||
|
||||
# the tuner takes care of the install
|
||||
|
||||
@@ -28,7 +28,6 @@ PROFILE_MCS_FLAGS = \
|
||||
$(DEFAULT_REFERENCES) \
|
||||
$(PLATFORM_DEBUG_FLAGS)
|
||||
|
||||
API_BIN_PROFILE = build/monotouch
|
||||
FRAMEWORK_VERSION = 2.1
|
||||
|
||||
# the tuner takes care of the install
|
||||
|
||||
@@ -25,7 +25,6 @@ PROFILE_MCS_FLAGS = \
|
||||
$(DEFAULT_REFERENCES) \
|
||||
$(PLATFORM_DEBUG_FLAGS)
|
||||
|
||||
API_BIN_PROFILE = build/monotouch
|
||||
FRAMEWORK_VERSION = 2.1
|
||||
|
||||
NO_INSTALL = yes
|
||||
|
||||
@@ -25,7 +25,6 @@ PROFILE_MCS_FLAGS = \
|
||||
$(DEFAULT_REFERENCES) \
|
||||
$(PLATFORM_DEBUG_FLAGS)
|
||||
|
||||
API_BIN_PROFILE = build/monotouch
|
||||
FRAMEWORK_VERSION = 2.1
|
||||
|
||||
NO_INSTALL = yes
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
#! -*- makefile -*-
|
||||
|
||||
BOOTSTRAP_PROFILE = build
|
||||
|
||||
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC)
|
||||
MCS = $(BOOTSTRAP_MCS)
|
||||
|
||||
profile-check:
|
||||
@:
|
||||
|
||||
DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
|
||||
|
||||
PROFILE_MCS_FLAGS = \
|
||||
-d:NET_1_1 \
|
||||
-d:NET_2_0 \
|
||||
-d:NET_2_1 \
|
||||
-d:NET_3_5 \
|
||||
-d:NET_4_0 \
|
||||
-d:NET_4_5 \
|
||||
-d:MONO \
|
||||
-d:MOBILE,MOBILE_LEGACY \
|
||||
-d:FULL_AOT_DESKTOP \
|
||||
-d:FULL_AOT_RUNTIME \
|
||||
-d:WASM \
|
||||
-d:DISABLE_REMOTING \
|
||||
-d:DISABLE_COM \
|
||||
-d:FEATURE_NO_BSD_SOCKETS \
|
||||
-nowarn:1699 \
|
||||
-nostdlib \
|
||||
$(DEFAULT_REFERENCES) \
|
||||
$(PLATFORM_DEBUG_FLAGS)
|
||||
|
||||
API_BIN_PROFILE = build/monotouch
|
||||
FRAMEWORK_VERSION = 2.1
|
||||
|
||||
# the tuner takes care of the install
|
||||
NO_INSTALL = yes
|
||||
AOT_FRIENDLY_PROFILE = yes
|
||||
ALWAYS_AOT = yes
|
||||
MOBILE_PROFILE = yes
|
||||
NO_VTS_TEST = yes
|
||||
NO_CONSOLE = yes
|
||||
@@ -29,7 +29,6 @@ PROFILE_MCS_FLAGS = \
|
||||
$(DEFAULT_REFERENCES) \
|
||||
$(PLATFORM_DEBUG_FLAGS)
|
||||
|
||||
API_BIN_PROFILE = build/monotouch
|
||||
FRAMEWORK_VERSION = 2.1
|
||||
|
||||
# the tuner takes care of the install
|
||||
|
||||
@@ -27,9 +27,7 @@ PROFILE_MCS_FLAGS = \
|
||||
$(PLATFORM_DEBUG_FLAGS) \
|
||||
$(XAMMAC_MCS_FLAGS)
|
||||
|
||||
API_BIN_PROFILE = build/monotouch
|
||||
FRAMEWORK_VERSION = 2.1
|
||||
|
||||
NO_TEST = yes
|
||||
NO_INSTALL = yes
|
||||
MOBILE_DYNAMIC = yes
|
||||
|
||||
+14
-26
@@ -9,7 +9,6 @@
|
||||
|
||||
empty :=
|
||||
space := $(empty) $(empty)
|
||||
_FILTER_OUT = $(foreach x,$(2),$(if $(findstring $(1),$(x)),,$(x)))
|
||||
|
||||
# given $(thisdir), we compute the path to the top directory
|
||||
#
|
||||
@@ -27,12 +26,8 @@ Q_MCS=$(if $(V),,@echo "$(if $(MCS_MODE),MCS,CSC) [$(intermediate)$(PROFILE_
|
||||
Q_AOT=$(if $(V),,@echo "AOT [$(intermediate)$(PROFILE_DIRECTORY)] $(notdir $(@))";)
|
||||
|
||||
ifndef BUILD_TOOLS_PROFILE
|
||||
ifeq ($(PROFILE),basic)
|
||||
BUILD_TOOLS_PROFILE = basic
|
||||
else
|
||||
BUILD_TOOLS_PROFILE = build
|
||||
endif
|
||||
endif
|
||||
|
||||
USE_MCS_FLAGS = /codepage:$(CODEPAGE) /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
|
||||
USE_MBAS_FLAGS = /codepage:$(CODEPAGE) $(LOCAL_MBAS_FLAGS) $(PLATFORM_MBAS_FLAGS) $(PROFILE_MBAS_FLAGS) $(MBAS_FLAGS)
|
||||
@@ -48,15 +43,14 @@ INSTALL_BIN = $(INSTALL) -c -m 755
|
||||
INSTALL_LIB = $(INSTALL_BIN)
|
||||
MKINSTALLDIRS = $(SHELL) $(topdir)/mkinstalldirs
|
||||
INTERNAL_MBAS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/mbas/mbas.exe
|
||||
INTERNAL_ILASM = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/ilasm.exe
|
||||
INTERNAL_CSC_LOCATION = $(CSC_LOCATION)
|
||||
|
||||
# Using CSC_SDK_PATH_DISABLED for sanity check that all references have path specified
|
||||
INTERNAL_CSC = CSC_SDK_PATH_DISABLED= $(RUNTIME) $(RUNTIME_FLAGS) $(CSC_RUNTIME_FLAGS) $(INTERNAL_CSC_LOCATION)
|
||||
|
||||
RESGEN = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/resgen.exe
|
||||
RESGEN = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(RESGEN_EXE) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/resgen.exe
|
||||
STRING_REPLACER = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/cil-stringreplacer.exe
|
||||
ILASM = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/ilasm.exe
|
||||
|
||||
|
||||
depsdir = $(topdir)/build/deps
|
||||
|
||||
@@ -161,7 +155,7 @@ gacutil = $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/gacutil.exe
|
||||
GACUTIL = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(gacutil)
|
||||
endif
|
||||
|
||||
STD_TARGETS = test run-test run-xunit-test run-test-ondotnet clean install uninstall doc-update
|
||||
STD_TARGETS = test run-test run-test-ondotnet clean install uninstall doc-update
|
||||
|
||||
$(STD_TARGETS): %: do-%
|
||||
|
||||
@@ -177,14 +171,11 @@ do-all-aot:
|
||||
ifneq ("$(wildcard $(topdir)/class/lib/$(PROFILE))","")
|
||||
|
||||
AOT_PROFILE_ASSEMBLIES := $(sort $(patsubst .//%,%,$(filter-out %.dll.dll %.exe.dll %bare% %plaincore% %secxml% %Facades% %ilasm%,$(filter %.dll %.exe,$(wildcard $(topdir)/class/lib/$(PROFILE)/*)))))
|
||||
AOT_PROFILE_TESTS := $(sort $(patsubst .//%,%,$(filter-out %.dll.dll %.exe.dll %bare% %plaincore% %secxml% %Facades% %ilasm%,$(filter %.dll %.exe,$(wildcard $(topdir)/class/lib/$(PROFILE)/tests/*)))))
|
||||
AOT_PROFILE_ASSEMBLIES_OUT := $(patsubst %,%$(PLATFORM_AOT_SUFFIX),$(AOT_PROFILE_ASSEMBLIES))
|
||||
AOT_PROFILE_TESTS_OUT := $(patsubst %,%$(PLATFORM_AOT_SUFFIX),$(AOT_PROFILE_TESTS))
|
||||
|
||||
# This can run in parallel
|
||||
.PHONY: aot-all-profile
|
||||
ifdef AOT_BUILD_FLAGS
|
||||
aot-all-profile: $(AOT_PROFILE_ASSEMBLIES_OUT) $(AOT_PROFILE_TESTS_OUT)
|
||||
aot-all-profile: $(patsubst %,%$(PLATFORM_AOT_SUFFIX),$(AOT_PROFILE_ASSEMBLIES))
|
||||
else
|
||||
aot-all-profile:
|
||||
echo AOT_BUILD_FLAGS not set, skipping AOT.
|
||||
@@ -192,12 +183,12 @@ endif
|
||||
|
||||
%.dll$(PLATFORM_AOT_SUFFIX): %.dll
|
||||
@ mkdir -p $<_bitcode_tmp
|
||||
$(Q_AOT) MONO_PATH="$(topdir)/class/lib/$(PROFILE)" $(RUNTIME) $(RUNTIME_FLAGS) $(AOT_BUILD_FLAGS),temp-path=$<_bitcode_tmp --verbose $< > [email protected]
|
||||
$(Q_AOT) MONO_PATH="$(dir $<)" $(RUNTIME) $(RUNTIME_FLAGS) $(AOT_BUILD_FLAGS),temp-path=$<_bitcode_tmp --verbose $< > [email protected]
|
||||
@ rm -rf $<_bitcode_tmp
|
||||
|
||||
%.exe$(PLATFORM_AOT_SUFFIX): %.exe
|
||||
@ mkdir -p $<_bitcode_tmp
|
||||
$(Q_AOT) MONO_PATH="$(topdir)/class/lib/$(PROFILE)" $(RUNTIME) $(RUNTIME_FLAGS) $(AOT_BUILD_FLAGS),temp-path=$<_bitcode_tmp --verbose $< > [email protected]
|
||||
$(Q_AOT) MONO_PATH="$(dir $<)" $(RUNTIME) $(RUNTIME_FLAGS) $(AOT_BUILD_FLAGS),temp-path=$<_bitcode_tmp --verbose $< > [email protected]
|
||||
@ rm -rf $<_bitcode_tmp
|
||||
|
||||
endif #ifneq ("$(wildcard $(topdir)/class/lib/$(PROFILE))","")
|
||||
@@ -288,15 +279,6 @@ dist-recursive: dist-local
|
||||
(cd $$d && $(MAKE) distdir=$$reldir/$$d $@) || exit 1 ; \
|
||||
done
|
||||
|
||||
# function to dist files in groups of 100 entries to make sure we don't exceed shell char limits
|
||||
define distfilesingroups
|
||||
for f in $(wordlist 1, 100, $(1)) ; do \
|
||||
dest=`dirname "$(distdir)/$$f"` ; \
|
||||
$(MKINSTALLDIRS) $$dest && cp -p "$$f" $$dest || exit 1 ; \
|
||||
done
|
||||
$(if $(word 101, $(1)), $(call distfilesingroups, $(wordlist 101, $(words $(1)), $(1))))
|
||||
endef
|
||||
|
||||
# The following target can be used like
|
||||
#
|
||||
# dist-local: dist-default
|
||||
@@ -305,11 +287,17 @@ endef
|
||||
# Notes:
|
||||
# 1. we invert the test here to not end in an error if ChangeLog doesn't exist.
|
||||
# 2. we error out if we try to dist a nonexistant file.
|
||||
# 3. we pick up Makefile
|
||||
# 3. we pick up Makefile, makefile, or GNUmakefile.
|
||||
dist-default:
|
||||
-mkdir -p $(distdir)
|
||||
test '!' -f ChangeLog || cp ChangeLog $(distdir)
|
||||
$(call distfilesingroups, Makefile $(DISTFILES))
|
||||
if test -f Makefile; then m=M; fi; \
|
||||
if test -f makefile; then m=m; fi; \
|
||||
if test -f GNUmakefile; then m=GNUm; fi; \
|
||||
for f in $${m}akefile $(DISTFILES) ; do \
|
||||
dest=`dirname "$(distdir)/$$f"` ; \
|
||||
$(MKINSTALLDIRS) $$dest && cp -p "$$f" $$dest || exit 1 ; \
|
||||
done
|
||||
if test -d Documentation ; then \
|
||||
find . -name '*.xml' > .files ; \
|
||||
tar cTf .files - | (cd $(distdir); tar xf -) ; \
|
||||
|
||||
+25
-97
@@ -20,15 +20,9 @@ TEST_RUNTIME_WRAPPERS_PATH = $(shell dirname $(RUNTIME))/_tmpinst/bin
|
||||
ifndef NO_TEST
|
||||
|
||||
test_nunit_lib = nunitlite.dll
|
||||
xunit_core := xunit.core xunit.execution.desktop xunit.abstractions xunit.assert Xunit.NetCore.Extensions
|
||||
xunit_core := xunit.core xunit.abstractions xunit.assert Xunit.NetCore.Extensions
|
||||
xunit_deps := System.Runtime
|
||||
xunit_src := $(patsubst %,$(topdir)/../external/xunit-binaries/%,BenchmarkAttribute.cs BenchmarkDiscover.cs) $(topdir)/../mcs/class/test-helpers/PlatformDetection.cs
|
||||
|
||||
ifeq ($(USE_XTEST_REMOTE_EXECUTOR), YES)
|
||||
XTEST_REMOTE_EXECUTOR = $(xunit_test_lib)_RemoteExecuter.exe
|
||||
xunit_src += $(topdir)/../mcs/class/test-helpers/AdminHelper.cs $(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mono.cs $(topdir)/../external/corefx/src/CoreFx.Private.TestUtilities/src/System/IO/FileCleanupTestBase.cs $(topdir)/../external/corefx/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.Process.cs $(topdir)/../external/corefx/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.cs $(topdir)/../external/corefx/src/Common/src/System/PasteArguments.cs
|
||||
endif
|
||||
|
||||
xunit_src := $(patsubst %,$(topdir)/../external/xunit-binaries/%,BenchmarkAttribute.cs BenchmarkDiscover.cs)
|
||||
xunit_class_deps :=
|
||||
|
||||
xunit_libs_ref = $(patsubst %,-r:$(topdir)/../external/xunit-binaries/%.dll,$(xunit_core))
|
||||
@@ -57,21 +51,17 @@ test_sourcefile_excludes = $(test_lib).exclude.sources
|
||||
test_pdb = $(test_lib:.dll=.pdb)
|
||||
test_response = $(depsdir)/$(test_lib).response
|
||||
test_makefrag = $(depsdir)/$(test_lib).makefrag
|
||||
test_flags = $(test_nunit_ref) $(TEST_MCS_FLAGS) $(TEST_LIB_MCS_FLAGS)
|
||||
ifndef NO_BUILD
|
||||
test_flags += -r:$(the_assembly)
|
||||
test_assembly_dep = $(the_assembly)
|
||||
endif
|
||||
test_flags = -r:$(the_assembly) $(test_nunit_ref) $(TEST_MCS_FLAGS) $(TEST_LIB_MCS_FLAGS)
|
||||
tests_CLEAN_FILES += $(ASSEMBLY:$(ASSEMBLY_EXT)=_test*.dll) $(ASSEMBLY:$(ASSEMBLY_EXT)=_test*.pdb) $(test_response) $(test_makefrag)
|
||||
|
||||
xtest_sourcefile = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
|
||||
xtest_sourcefile_excludes = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.exclude.sources)
|
||||
|
||||
|
||||
xunit_test_lib = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xunit-test.dll)
|
||||
|
||||
xtest_response = $(depsdir)/$(xunit_test_lib).response
|
||||
xtest_makefrag = $(depsdir)/$(xunit_test_lib).makefrag
|
||||
xtest_flags = -r:$(the_assembly) $(xunit_libs_ref) $(XTEST_MCS_FLAGS) $(XTEST_LIB_MCS_FLAGS) /unsafe
|
||||
xtest_flags = -r:$(the_assembly) $(xunit_libs_ref) $(XTEST_MCS_FLAGS) $(XTEST_LIB_MCS_FLAGS)
|
||||
|
||||
ifeq ($(wildcard $(xtest_sourcefile)),)
|
||||
xtest_sourcefile = $(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
|
||||
@@ -82,6 +72,8 @@ ifndef HAVE_CS_TESTS
|
||||
HAVE_CS_TESTS := $(wildcard $(test_sourcefile))
|
||||
endif
|
||||
|
||||
HAVE_SOURCE_EXCLUDES := $(wildcard $(test_sourcefile_excludes))
|
||||
|
||||
HAVE_CS_XTESTS := $(wildcard $(xtest_sourcefile))
|
||||
|
||||
endif # !NO_TEST
|
||||
@@ -102,24 +94,17 @@ endif
|
||||
|
||||
test_assemblies :=
|
||||
|
||||
test_lib_dir = $(topdir)/class/lib/$(PROFILE)/tests
|
||||
|
||||
test_lib_output = $(topdir)/class/lib/$(PROFILE)/tests/$(test_lib)
|
||||
|
||||
ifdef HAVE_CS_TESTS
|
||||
test_assemblies += $(test_lib_output)
|
||||
test_assemblies += $(test_lib)
|
||||
endif
|
||||
|
||||
ifdef test_assemblies
|
||||
check: run-test
|
||||
test-local: $(test_assemblies)
|
||||
run-test-local: run-test-lib
|
||||
run-test-ondotnet-local: run-test-ondotnet-lib
|
||||
|
||||
ifdef TEST_WITH_INTERPRETER
|
||||
TEST_HARNESS_EXCLUDES = -exclude=$(PLATFORM_TEST_HARNESS_EXCLUDES)$(PROFILE_TEST_HARNESS_EXCLUDES)NotWorking,NotWorkingRuntimeInterpreter,CAS
|
||||
else
|
||||
TEST_HARNESS_EXCLUDES = -exclude=$(PLATFORM_TEST_HARNESS_EXCLUDES)$(PROFILE_TEST_HARNESS_EXCLUDES)NotWorking,CAS
|
||||
endif
|
||||
|
||||
TEST_HARNESS_EXCLUDES_ONDOTNET = /exclude:$(PLATFORM_TEST_HARNESS_EXCLUDES)$(PROFILE_TEST_HARNESS_EXCLUDES)NotDotNet,CAS
|
||||
|
||||
NOSHADOW_FLAG =
|
||||
@@ -137,18 +122,14 @@ LABELS_ARG = -labels
|
||||
endif
|
||||
|
||||
ifdef ALWAYS_AOT
|
||||
test-local-aot-compile: $(topdir)/build/deps/nunit-$(PROFILE).stamp $(test_assemblies)
|
||||
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" $(TEST_RUNTIME) $(TEST_RUNTIME_FLAGS) $(AOT_BUILD_FLAGS) $(test_assemblies)
|
||||
test-local-aot-compile: $(topdir)/build/deps/nunit-$(PROFILE).stamp
|
||||
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(AOT_BUILD_FLAGS) $(test_assemblies)
|
||||
|
||||
else
|
||||
test-local-aot-compile: $(topdir)/build/deps/nunit-$(PROFILE).stamp $(test_assemblies)
|
||||
test-local-aot-compile: $(topdir)/build/deps/nunit-$(PROFILE).stamp
|
||||
|
||||
endif # ALWAYS_AOT
|
||||
|
||||
ifdef COVERAGE
|
||||
TEST_COVERAGE_FLAGS = -O=-aot --profile=coverage:output=$(topdir)/class/lib/$(PROFILE_DIRECTORY)/coverage_nunit_$(ASSEMBLY).xml
|
||||
endif
|
||||
|
||||
NUNITLITE_CONFIG_FILE=$(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)nunit-lite-console.exe.config
|
||||
|
||||
patch-nunitlite-appconfig:
|
||||
@@ -160,53 +141,10 @@ ifdef TEST_NUNITLITE_APP_CONFIG_RUNTIME
|
||||
sed -i -e "/__INSERT_CUSTOM_APP_CONFIG_RUNTIME__/r $(TEST_NUNITLITE_APP_CONFIG_RUNTIME)" $(NUNITLITE_CONFIG_FILE)
|
||||
endif
|
||||
|
||||
ifdef PLATFORM_AOT_SUFFIX
|
||||
|
||||
DEDUP_DUMMY_CS=$(topdir)/class/lib/$(PROFILE)/DedupInflatedMethods.cs
|
||||
DEDUP_DUMMY=$(topdir)/class/lib/$(PROFILE)/DedupInflatedMethods.dll
|
||||
|
||||
$(DEDUP_DUMMY):
|
||||
echo " // Empty Assembly \n\n" > $(DEDUP_DUMMY_CS)
|
||||
$(CSCOMPILE) -t:library -out:$(DEDUP_DUMMY) $(DEDUP_DUMMY_CS)
|
||||
rm $(DEDUP_DUMMY_CS)
|
||||
|
||||
MKBUNDLE_TEST_BIN = $(TEST_HARNESS).static
|
||||
MKBUNDLE_EXE = $(topdir)/class/lib/$(PROFILE)/mkbundle.exe
|
||||
# Pattern based on the one in AOT_PROFILE_ASSEMBLIES
|
||||
# It's easier if you read it backwards.
|
||||
# What we do here is get the files in the profile directory that end in "test.dll" or are prefixed with nunit (filter)
|
||||
# and then strip out everything that we expect to live outside the top level (filter-out)
|
||||
TEST_ASSEMBLIES:=$(sort $(patsubst .//%,%,$(filter-out %.exe.static %.dll.dll %.exe.dll %bare% %plaincore% %secxml% %Facades% %ilasm%,$(filter %.dll,$(wildcard $(topdir)/class/lib/$(PROFILE)/tests/*)))))
|
||||
|
||||
$(MKBUNDLE_EXE): $(topdir)/tools/mkbundle/mkbundle.cs
|
||||
make -C $(topdir)/tools/mkbundle
|
||||
|
||||
mkbundle-all-tests:
|
||||
$(Q_AOT) $(MAKE) -C $(topdir)/class do-test
|
||||
$(Q_AOT) $(MAKE) -C $(topdir)/tools/mkbundle
|
||||
$(Q_AOT) $(MAKE) $(MKBUNDLE_TEST_BIN) # recursive make re-computes variables for TEST_ASSEMBLIES
|
||||
|
||||
ifdef MKBUNDLE_DEDUP
|
||||
MKBUNDLE_DEDUP_COND := $(DEDUP_DUMMY)
|
||||
DEDUP_ARGS=--aot-dedup $(DEDUP_DUMMY)
|
||||
endif
|
||||
|
||||
$(MKBUNDLE_TEST_BIN): $(TEST_ASSEMBLIES) $(TEST_HARNESS) $(MKBUNDLE_EXE) $(MKBUNDLE_DEDUP_COND)
|
||||
$(Q_AOT) MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)" PKG_CONFIG_PATH="$(topdir)/../data" $(RUNTIME) $(RUNTIME_FLAGS) $(MKBUNDLE_EXE) -L $(topdir)/class/lib/$(PROFILE) -v --deps $(TEST_HARNESS) $(TEST_ASSEMBLIES) -o $(MKBUNDLE_TEST_BIN) --aot-mode $(AOT_MODE) --aot-runtime $(RUNTIME) --aot-args $(AOT_BUILD_ATTRS) --in-tree $(topdir)/.. --managed-linker $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/monolinker.exe --config $(topdir)/../data/config --i18n all $(DEDUP_ARGS) --keeptemp
|
||||
|
||||
endif # PLATFORM_AOT_SUFFIX
|
||||
|
||||
ifneq ($(wildcard $(MKBUNDLE_TEST_BIN)),)
|
||||
TEST_HARNESS_EXEC=$(MKBUNDLE_TEST_BIN)
|
||||
TEST_HARNESS_EXCLUDES:=$(TEST_HARNESS_EXCLUDES),StaticLinkedAotNotWorking
|
||||
else
|
||||
TEST_HARNESS_EXEC=$(TEST_RUNTIME) $(RUNTIME_FLAGS) $(TEST_COVERAGE_FLAGS) $(AOT_RUN_FLAGS) $(TEST_HARNESS)
|
||||
endif
|
||||
|
||||
## FIXME: i18n problem in the 'sed' command below
|
||||
run-test-lib: test-local test-local-aot-compile patch-nunitlite-appconfig
|
||||
ok=:; \
|
||||
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" $(TEST_HARNESS_EXEC) $(test_assemblies) $(NOSHADOW_FLAG) $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) $(TEST_HARNESS_EXCLUDES) $(LABELS_ARG) -format:nunit2 -result:TestResult-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG)|| ok=false; \
|
||||
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(AOT_RUN_FLAGS) $(TEST_HARNESS) $(test_assemblies) $(NOSHADOW_FLAG) $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) $(TEST_HARNESS_EXCLUDES) $(LABELS_ARG) -format:nunit2 -result:TestResult-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG)|| ok=false; \
|
||||
if [ ! -f "TestResult-$(PROFILE).xml" ]; then echo "<?xml version='1.0' encoding='utf-8'?><test-results failures='1' total='1' not-run='0' name='bcl-tests' date='$$(date +%F)' time='$$(date +%T)'><test-suite name='$(strip $(test_assemblies))' success='False' time='0'><results><test-case name='crash' executed='True' success='False' time='0'><failure><message>The test runner didn't produce a test result XML, probably due to a crash of the runtime. Check the log for more details.</message><stack-trace></stack-trace></failure></test-case></results></test-suite></test-results>" > TestResult-$(PROFILE).xml; fi; \
|
||||
$$ok
|
||||
|
||||
@@ -218,27 +156,24 @@ run-test-ondotnet-lib: test-local
|
||||
$$ok
|
||||
|
||||
|
||||
endif
|
||||
endif # test_assemblies
|
||||
|
||||
TEST_FILES =
|
||||
|
||||
ifdef HAVE_CS_TESTS
|
||||
TEST_FILES += `sed -e '/^$$/d' -e 's,^../,,' -e '/^\#.*$$/d' -et -e 's,^,Test/,' $(test_sourcefile)`
|
||||
TEST_FILES += `sed -e '/^$$/d' -e 's,^../,,' -et -e 's,^,Test/,' $(test_sourcefile)`
|
||||
endif
|
||||
|
||||
ifdef HAVE_CS_TESTS
|
||||
|
||||
$(test_lib_dir):
|
||||
mkdir -p $@
|
||||
|
||||
$(test_lib_output): $(test_assembly_dep) $(test_response) $(test_nunit_dep) $(test_lib_dir)
|
||||
$(test_lib): $(the_assembly) $(test_response) $(test_nunit_dep)
|
||||
$(TEST_COMPILE) $(LIBRARY_FLAGS) -target:library -out:$@ $(test_flags) $(LOCAL_TEST_COMPILER_ONDOTNET_FLAGS) @$(test_response)
|
||||
|
||||
test_response_preprocessed = $(test_response)_preprocessed
|
||||
|
||||
# This handles .excludes/.sources pairs, as well as resolving the
|
||||
# includes that occur in .sources files
|
||||
$(test_response_preprocessed): $(test_sourcefile) $(wildcard $(test_sourcefile_excludes))
|
||||
$(test_response_preprocessed): $(test_sourcefile)
|
||||
$(SHELL) $(topdir)/build/gensources.sh $@ '$(test_sourcefile)' '$(test_sourcefile_excludes)'
|
||||
|
||||
$(test_response): $(test_response_preprocessed)
|
||||
@@ -247,11 +182,11 @@ $(test_response): $(test_response_preprocessed)
|
||||
|
||||
$(test_makefrag): $(test_response)
|
||||
# @echo Creating $@ ...
|
||||
@sed 's,^,$(test_lib_output): ,' $< >$@
|
||||
@sed 's,^,$(test_lib): ,' $< >$@
|
||||
|
||||
-include $(test_makefrag)
|
||||
|
||||
build-test-lib: $(test_lib_output)
|
||||
build-test-lib: $(test_lib)
|
||||
@echo Building testing lib
|
||||
|
||||
endif
|
||||
@@ -262,7 +197,7 @@ ifdef HAVE_CS_XTESTS
|
||||
XTEST_HARNESS_PATH = $(topdir)/../external/xunit-binaries
|
||||
XTEST_HARNESS = $(XTEST_HARNESS_PATH)/xunit.console.exe
|
||||
XTEST_HARNESS_FLAGS := -noappdomain -noshadow -parallel none -nunit TestResult-$(PROFILE)-xunit.xml
|
||||
XTEST_TRAIT := -notrait category=failing -notrait category=nonmonotests -notrait Benchmark=true -notrait category=outerloop
|
||||
XTEST_TRAIT := -notrait category=failing -notrait category=nonnetcoreapptests -notrait Benchmark=true -notrait category=outerloop
|
||||
|
||||
ifdef FIXTURE
|
||||
XTEST_HARNESS_FLAGS += -class $(FIXTURE)
|
||||
@@ -272,26 +207,19 @@ ifdef TESTNAME
|
||||
XTEST_HARNESS_FLAGS += -method $(TESTNAME)
|
||||
endif
|
||||
|
||||
ifdef COVERAGE
|
||||
XTEST_COVERAGE_FLAGS = -O=-aot --profile=coverage:output=$(topdir)/class/lib/$(PROFILE_DIRECTORY)/coverage_xunit_$(ASSEMBLY).xml
|
||||
endif
|
||||
|
||||
check: run-xunit-test-local
|
||||
run-xunit-test: run-xunit-test-local
|
||||
xunit-test-local: $(xunit_test_lib)
|
||||
run-xunit-test-local: run-xunit-test-lib
|
||||
|
||||
# cp -rf is a HACK for xunit runner to require xunit.execution.desktop.dll file in local folder on .net only
|
||||
run-xunit-test-lib: xunit-test-local $(XTEST_REMOTE_EXECUTOR)
|
||||
run-xunit-test-lib: xunit-test-local
|
||||
@cp -rf $(XTEST_HARNESS_PATH)/xunit.execution.desktop.dll xunit.execution.desktop.dll
|
||||
ok=:; \
|
||||
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" $(TEST_RUNTIME) $(TEST_RUNTIME_FLAGS) $(XTEST_COVERAGE_FLAGS) $(AOT_RUN_FLAGS) $(XTEST_HARNESS) $(xunit_test_lib) $(XTEST_HARNESS_FLAGS) $(XTEST_TRAIT) || ok=false; \
|
||||
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(AOT_RUN_FLAGS) $(XTEST_HARNESS) $(xunit_test_lib) $(XTEST_HARNESS_FLAGS) $(XTEST_TRAIT) || ok=false; \
|
||||
$$ok
|
||||
@rm -f xunit.execution.desktop.dll
|
||||
|
||||
# Some xunit tests want to be executed in a separate process (see RemoteExecutorTestBase)
|
||||
$(XTEST_REMOTE_EXECUTOR): $(topdir)/../mcs/class/test-helpers/RemoteExecutorConsoleApp.cs
|
||||
$(TEST_COMPILE) $(topdir)/../mcs/class/test-helpers/RemoteExecutorConsoleApp.cs -r:$(xunit_test_lib) $(xtest_flags) /debug-
|
||||
|
||||
$(xunit_test_lib): $(the_assembly) $(xtest_response) $(xunit_libs_dep) $(xunit_src)
|
||||
$(TEST_COMPILE) $(LIBRARY_FLAGS) $(XTEST_LIB_FLAGS) -target:library -out:$@ $(xtest_flags) @$(xtest_response) $(xunit_src)
|
||||
|
||||
@@ -299,7 +227,7 @@ xtest_response_preprocessed = $(xtest_response)_preprocessed
|
||||
|
||||
# This handles .excludes/.sources pairs, as well as resolving the
|
||||
# includes that occur in .sources files
|
||||
$(xtest_response): $(xtest_sourcefile) $(wildcard $(xtest_sourcefile_excludes))
|
||||
$(xtest_response): $(xtest_sourcefile)
|
||||
$(SHELL) $(topdir)/build/gensources.sh $@ '$(xtest_sourcefile)' '$(xtest_sourcefile_excludes)'
|
||||
|
||||
$(xtest_makefrag): $(xtest_response)
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
<ProjectGuid>{E51283DC-7090-479E-B723-01C0953F18EA}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Windows_NT'">win32</HostPlatform>
|
||||
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix' and $([System.IO.File]::Exists('/usr/lib/libc.dylib'))">darwin</HostPlatform>
|
||||
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix'">linux</HostPlatform>
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
<ProjectGuid>{FFFE76FE-98EE-4FF7-81D9-35C0FE1D3718}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Windows_NT'">win32</HostPlatform>
|
||||
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix' and $([System.IO.File]::Exists('/usr/lib/libc.dylib'))">darwin</HostPlatform>
|
||||
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix'">linux</HostPlatform>
|
||||
|
||||
-1
@@ -39,7 +39,6 @@ namespace ICSharpCode.SharpZipLib.BZip2
|
||||
/// Base class for both the compress and decompress classes.
|
||||
/// Holds common arrays, and static data.
|
||||
/// </summary>
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public sealed class BZip2Constants
|
||||
{
|
||||
public readonly static int[] rNums = {
|
||||
|
||||
-1
@@ -44,7 +44,6 @@ namespace ICSharpCode.SharpZipLib.BZip2
|
||||
/// An input stream that decompresses from the BZip2 format (without the file
|
||||
/// header chars) to be read as any other stream.
|
||||
/// </summary>
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public class BZip2InputStream : Stream
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
-1
@@ -45,7 +45,6 @@ namespace ICSharpCode.SharpZipLib.BZip2
|
||||
/// header chars) into another stream.
|
||||
/// TODO: Update to BZip2 1.0.1, 1.0.2
|
||||
/// </summary>
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public class BZip2OutputStream : Stream
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -86,7 +86,6 @@ namespace ICSharpCode.SharpZipLib.Checksums
|
||||
/// </summary>
|
||||
/// <see cref="ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream"/>
|
||||
/// <see cref="ICSharpCode.SharpZipLib.Zip.Compression.Streams.DeflaterOutputStream"/>
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public sealed class Adler32 : IChecksum
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -64,7 +64,6 @@ namespace ICSharpCode.SharpZipLib.Checksums
|
||||
/// the information needed to generate CRC's on data a byte at a time for all
|
||||
/// combinations of CRC register values and incoming bytes.
|
||||
/// </summary>
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public sealed class Crc32 : IChecksum
|
||||
{
|
||||
readonly static uint CrcSeed = 0xFFFFFFFF;
|
||||
|
||||
-1
@@ -45,7 +45,6 @@ namespace ICSharpCode.SharpZipLib.Checksums
|
||||
/// <code>getValue</code>. The complete checksum object can also be reset
|
||||
/// so it can be used again with new data.
|
||||
/// </summary>
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public interface IChecksum
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
-1
@@ -41,7 +41,6 @@ using System;
|
||||
namespace ICSharpCode.SharpZipLib.Checksums
|
||||
{
|
||||
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public class StrangeCRC : IChecksum
|
||||
{
|
||||
readonly static uint[] crc32Table = {
|
||||
|
||||
@@ -41,7 +41,6 @@ namespace ICSharpCode.SharpZipLib.GZip
|
||||
/// <summary>
|
||||
/// This class contains constants used for gzip.
|
||||
/// </summary>
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public class GZipConstants
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
-1
@@ -79,7 +79,6 @@ namespace ICSharpCode.SharpZipLib.GZip
|
||||
/// }
|
||||
/// </code>
|
||||
/// </example>
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public class GZipInputStream : InflaterInputStream
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
-1
@@ -72,7 +72,6 @@ namespace ICSharpCode.SharpZipLib.GZip
|
||||
/// }
|
||||
/// </code>
|
||||
/// </example>
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public class GZipOutputStream : DeflaterOutputStream
|
||||
{
|
||||
//Variables
|
||||
|
||||
-1
@@ -43,7 +43,6 @@ namespace ICSharpCode.SharpZipLib.Tar {
|
||||
/// This exception is used to indicate that there is a problem
|
||||
/// with a TAR archive header.
|
||||
/// </summary>
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public class InvalidHeaderException : System.IO.IOException
|
||||
{
|
||||
public InvalidHeaderException()
|
||||
|
||||
@@ -38,7 +38,6 @@ using System.Text;
|
||||
|
||||
namespace ICSharpCode.SharpZipLib.Tar {
|
||||
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public delegate void ProgressMessageHandler(TarArchive archive, TarEntry entry, string message);
|
||||
|
||||
/// <summary>
|
||||
@@ -62,7 +61,6 @@ namespace ICSharpCode.SharpZipLib.Tar {
|
||||
/// TarBuffer.getCurrentRecordNum() and TarBuffer.getCurrentBlockNum()
|
||||
/// methods, this would be rather trvial.
|
||||
/// </summary>
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public class TarArchive
|
||||
{
|
||||
bool verbose;
|
||||
|
||||
@@ -51,7 +51,6 @@ namespace ICSharpCode.SharpZipLib.Tar
|
||||
/// TarBuffers are created by Tar IO Streams.
|
||||
/// </p>
|
||||
/// </summary>
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public class TarBuffer
|
||||
{
|
||||
|
||||
|
||||
@@ -67,7 +67,6 @@ namespace ICSharpCode.SharpZipLib.Tar
|
||||
///
|
||||
/// <see cref="TarHeader"/>
|
||||
/// </summary>
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public class TarEntry
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -74,7 +74,6 @@ namespace ICSharpCode.SharpZipLib.Tar
|
||||
/// This class encapsulates the Tar Entry Header used in Tar Archives.
|
||||
/// The class also holds a number of tar constants, used mostly in headers.
|
||||
/// </summary>
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public class TarHeader : ICloneable
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -45,7 +45,6 @@ namespace ICSharpCode.SharpZipLib.Tar
|
||||
/// the archive, and the read each entry as a normal input stream
|
||||
/// using read().
|
||||
/// </summary>
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public class TarInputStream : Stream
|
||||
{
|
||||
protected bool debug;
|
||||
@@ -599,7 +598,6 @@ namespace ICSharpCode.SharpZipLib.Tar
|
||||
/// the programmer to have their own TarEntry subclass instantiated for the
|
||||
/// entries return from getNextEntry().
|
||||
/// </summary>
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public interface IEntryFactory
|
||||
{
|
||||
TarEntry CreateEntry(string name);
|
||||
@@ -609,7 +607,6 @@ namespace ICSharpCode.SharpZipLib.Tar
|
||||
TarEntry CreateEntry(byte[] headerBuf);
|
||||
}
|
||||
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public class EntryFactoryAdapter : IEntryFactory
|
||||
{
|
||||
public TarEntry CreateEntry(string name)
|
||||
|
||||
-1
@@ -45,7 +45,6 @@ namespace ICSharpCode.SharpZipLib.Tar
|
||||
/// by writing to this stream using write().
|
||||
/// </summary>
|
||||
/// public
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public class TarOutputStream : Stream
|
||||
{
|
||||
protected bool debug;
|
||||
|
||||
-1
@@ -50,7 +50,6 @@ namespace ICSharpCode.SharpZipLib.Zip.Compression
|
||||
///
|
||||
/// author of the original java version : Jochen Hoenicke
|
||||
/// </summary>
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public class Deflater
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
-1
@@ -43,7 +43,6 @@ namespace ICSharpCode.SharpZipLib.Zip.Compression
|
||||
/// <summary>
|
||||
/// This class contains constants used for the deflater.
|
||||
/// </summary>
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public class DeflaterConstants
|
||||
{
|
||||
public const bool DEBUGGING = false;
|
||||
|
||||
-2
@@ -42,7 +42,6 @@ using ICSharpCode.SharpZipLib.Checksums;
|
||||
namespace ICSharpCode.SharpZipLib.Zip.Compression
|
||||
{
|
||||
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public enum DeflateStrategy
|
||||
{
|
||||
// The default strategy.
|
||||
@@ -58,7 +57,6 @@ namespace ICSharpCode.SharpZipLib.Zip.Compression
|
||||
HuffmanOnly = 2
|
||||
}
|
||||
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public class DeflaterEngine : DeflaterConstants
|
||||
{
|
||||
static int TOO_FAR = 4096;
|
||||
|
||||
-2
@@ -48,7 +48,6 @@ namespace ICSharpCode.SharpZipLib.Zip.Compression
|
||||
///
|
||||
/// author of the original java version : Jochen Hoenicke
|
||||
/// </summary>
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public class DeflaterHuffman
|
||||
{
|
||||
private static int BUFSIZE = 1 << (DeflaterConstants.DEFAULT_MEM_LEVEL + 6);
|
||||
@@ -80,7 +79,6 @@ namespace ICSharpCode.SharpZipLib.Zip.Compression
|
||||
15
|
||||
};
|
||||
|
||||
[System.ObsoleteAttribute("This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead.")]
|
||||
public class Tree
|
||||
{
|
||||
public short[] freqs;
|
||||
|
||||
Loaded 100 of 2845 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user