mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 01:41:18 -10:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bcc380d6ba | ||
|
|
8516f578ee | ||
|
|
feaa6e19fb | ||
|
|
e8953e705c | ||
|
|
130f08e943 | ||
|
|
89558be055 | ||
|
|
f2c8417122 |
No files matched your search
+3
-9
@@ -23,6 +23,7 @@
|
||||
*.tlb
|
||||
*.tlh
|
||||
*.bak
|
||||
*.[Cc]ache
|
||||
*.ilk
|
||||
*.log
|
||||
*.lib
|
||||
@@ -43,8 +44,6 @@ Ankh.NoLoad
|
||||
_ReSharper*/
|
||||
*.resharper
|
||||
[Tt]est[Rr]esult*
|
||||
*.orig
|
||||
*.rej
|
||||
|
||||
# NuGet packages
|
||||
!.nuget/*
|
||||
@@ -70,7 +69,6 @@ config.status
|
||||
config.sub
|
||||
configure
|
||||
configure.scan
|
||||
cygconfig.h
|
||||
depcomp
|
||||
install-sh
|
||||
libtool
|
||||
@@ -110,10 +108,6 @@ GRTAGS
|
||||
GSYMS
|
||||
GTAGS
|
||||
|
||||
# Doxygen
|
||||
docs/doxygen*
|
||||
docs/perlmod*
|
||||
|
||||
|
||||
##############################################################################
|
||||
# Mono-specific patterns
|
||||
@@ -123,7 +117,7 @@ docs/perlmod*
|
||||
compile
|
||||
mono.h
|
||||
mono-*.tar.*
|
||||
mono.spec
|
||||
mono-core.spec
|
||||
tmpinst-dir.stamp
|
||||
msvc/scripts/inputs/
|
||||
extensions-config.h
|
||||
|
||||
+6
-11
@@ -10,23 +10,18 @@
|
||||
[submodule "external/debian-snapshot"]
|
||||
path = external/debian-snapshot
|
||||
url = git://github.com/directhex/mono-snapshot.git
|
||||
[submodule "external/entityframework"]
|
||||
path = external/entityframework
|
||||
url = git://github.com/mono/entityframework.git
|
||||
[submodule "external/rx"]
|
||||
path = external/rx
|
||||
url = git://github.com/mono/rx.git
|
||||
branch = rx-oss-v2.2
|
||||
[submodule "external/ikvm"]
|
||||
path = external/ikvm
|
||||
url = git://github.com/mono/ikvm-fork.git
|
||||
[submodule "external/Lucene.Net"]
|
||||
path = external/Lucene.Net
|
||||
url = git://github.com/mono/lucene.net.git
|
||||
[submodule "external/ikdasm"]
|
||||
path = external/ikdasm
|
||||
url = git://github.com/mono/ikdasm.git
|
||||
[submodule "external/referencesource"]
|
||||
path = external/referencesource
|
||||
url = git://github.com/mono/referencesource
|
||||
branch = mono-4.4.0-branch
|
||||
[submodule "external/reference-assemblies"]
|
||||
path = external/binary-reference-assemblies
|
||||
url = git://github.com/mono/reference-assemblies.git
|
||||
[submodule "external/Lucene.Net.Light"]
|
||||
path = external/Lucene.Net.Light
|
||||
url = git://github.com/mono/Lucene.Net.Light.git
|
||||
@@ -0,0 +1,3 @@
|
||||
Miguel de Icaza ([email protected])
|
||||
Paolo Molaro ([email protected])
|
||||
Dietmar Maurer ([email protected])
|
||||
+2
-2
@@ -5,7 +5,7 @@ When contributing to the Mono project, please follow the [Mono Coding
|
||||
Guidelines][1]. We have been using a coding style for many years,
|
||||
please make your patches conform to these guidelines.
|
||||
|
||||
[1]: http://www.mono-project.com/community/contributing/coding-guidelines/
|
||||
[1] http://www.mono-project.com/Coding_Guidelines
|
||||
|
||||
Etiquette
|
||||
=========
|
||||
@@ -68,7 +68,7 @@ status of your pull request. If it succeeded and we like the changes,
|
||||
a maintainer will likely merge it. Otherwise, you can amend your pull
|
||||
request to fix build breakage and Jenkins will test it again.
|
||||
|
||||
[2]: http://jenkins.mono-project.com/
|
||||
[2] http://monojenkins.cloudapp.net
|
||||
|
||||
# Inactivity
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ For comments, corrections and updates, please contact [email protected]
|
||||
|
||||
Parts of Mono are dual licensed, they are available to the
|
||||
public in GPL or LGPL forms, but we also offer those pieces
|
||||
under commercial terms from Xamarin for the cases where the
|
||||
GPL and the LGPL are not suitable.
|
||||
under commercial terms from Xamarin for the cases wher the GPL
|
||||
and the LGPL are not suitable.
|
||||
|
||||
We have tried to pick the licenses that will maximize adoption
|
||||
of Mono, so we tend to use the MIT X11 or LGPL liceses.
|
||||
|
||||
+23
-14
@@ -5,15 +5,23 @@ AM_CFLAGS = $(WERROR_CFLAGS)
|
||||
MONOTOUCH_SUBDIRS = $(libgc_dir) eglib/src mono
|
||||
|
||||
if CROSS_COMPILING
|
||||
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir) acceptance-tests
|
||||
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir)
|
||||
# Keep in sync with SUBDIRS
|
||||
## 'tools' is not normally built
|
||||
DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests
|
||||
DIST_SUBDIRS = m4 po libgc eglib mono ikvm-native support data runtime scripts man samples tools msvc docs
|
||||
else
|
||||
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir) acceptance-tests
|
||||
if ONLY_MONOTOUCH
|
||||
SUBDIRS = $(MONOTOUCH_SUBDIRS) runtime
|
||||
else
|
||||
if ONLY_XAMMAC
|
||||
SUBDIRS = $(libgc_dir) eglib/src mono runtime
|
||||
else
|
||||
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir)
|
||||
# Keep in sync with SUBDIRS
|
||||
## 'tools' is not normally built
|
||||
DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests
|
||||
DIST_SUBDIRS = m4 po libgc eglib mono ikvm-native support data runtime scripts man samples tools msvc docs
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
all: update_submodules
|
||||
@@ -25,14 +33,15 @@ update_submodules:
|
||||
.PHONY: update_submodules
|
||||
|
||||
EXTRA_DIST= \
|
||||
README.md \
|
||||
LICENSE \
|
||||
autogen.sh \
|
||||
mkinstalldirs \
|
||||
mono-uninstalled.pc.in \
|
||||
winconfig.h \
|
||||
code_of_conduct.md \
|
||||
external
|
||||
README.md \
|
||||
LICENSE \
|
||||
autogen.sh \
|
||||
build-mingw32.sh \
|
||||
mkinstalldirs \
|
||||
mono-uninstalled.pc.in \
|
||||
winconfig.h \
|
||||
mono-core.spec \
|
||||
external
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
|
||||
|
||||
@@ -43,7 +52,7 @@ dist-hook:
|
||||
d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
|
||||
rm -rf `find $(top_distdir)/external -path '*\.git'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.exe'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.dll'`
|
||||
cp mcs/class/lib/basic/System.Configuration.dll mcs/class/lib/monolite/
|
||||
cp mcs/class/lib/basic/System.Security.dll mcs/class/lib/monolite/
|
||||
# Disable this for now because it is very slow and causes wrench to timeout:
|
||||
@@ -57,7 +66,7 @@ DISTCLEANFILES= mono-uninstalled.pc
|
||||
mcslib = $(mcs_topdir)/class/lib
|
||||
monolite = $(mcslib)/monolite
|
||||
mono_corlib_version = $(shell sed -n "s/\#define MONO_CORLIB_VERSION //p" $(srcdir)/mono/metadata/appdomain.c)
|
||||
monolite_url = http://download.mono-project.com/monolite/monolite-$(mono_corlib_version)-latest.tar.gz
|
||||
monolite_url = http://storage.bos.xamarin.com/mono-dist-master/latest/monolite-$(mono_corlib_version)-latest.tar.gz
|
||||
.PHONY: get-monolite-latest
|
||||
get-monolite-latest:
|
||||
-rm -fr $(mcslib)/monolite-*
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
Release notes for Mono are hosted on the web, please see:
|
||||
|
||||
http://www.mono-project.com/docs/about-mono/releases/
|
||||
http://www.go-mono.com/archive/VERSION
|
||||
|
||||
Where version is the version of this Mono package, for example:
|
||||
|
||||
http://www.go-mono.com/archive/1.1.9
|
||||
|
||||
@@ -1,86 +1,152 @@
|
||||
Mono is a software platform designed to allow developers to easily
|
||||
create cross platform applications. It is an open source
|
||||
implementation of Microsoft's .NET Framework based on the ECMA
|
||||
standards for C# and the Common Language Runtime.
|
||||
Mono is a software platform designed to allow developers to easily create cross platform applications.
|
||||
Mono is an open source implementation of Microsoft's .NET Framework based on the ECMA standards for C# and the Common Language Runtime.
|
||||
|
||||
[](https://gitter.im/mono/mono?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](http://jenkins.mono-project.com/job/test-mono-mainline/)
|
||||
|
||||
1. [Compilation and Installation](#compilation-and-installation)
|
||||
1. [Installation](#compilation-and-installation)
|
||||
2. [Using Mono](#using-mono)
|
||||
3. [Directory Roadmap](#directory-roadmap)
|
||||
4. [Contributing to Mono](#contributing-to-mono)
|
||||
5. [Reporting bugs](#reporting-bugs)
|
||||
6. [Configuration Options](#configuration-options)
|
||||
7. [Working with Submodules](#working-with-submodules)
|
||||
|
||||
**Build Status**
|
||||
|
||||
Officially supported architectures:
|
||||
|
||||
| debian-amd64 | debian-i386 | debian-armel | debian-armhf | windows-amd64 |
|
||||
|-------------------------|------------------------|-------------------------|-------------------------|---------------------------|
|
||||
| [![debian-amd64][1]][2] | [![debian-i386][3]][4] | [![debian-armel][5]][6] | [![debian-armhf][7]][8] | [![windows-amd64][9]][10] |
|
||||
|
||||
Community supported architectures:
|
||||
|
||||
| centos-s390x |
|
||||
|---------------------------|
|
||||
| [![centos-s390x][11]][12] |
|
||||
|
||||
[1]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-amd64/badge/icon
|
||||
[2]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-amd64/
|
||||
[3]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-i386/badge/icon
|
||||
[4]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-i386/
|
||||
[5]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-armel/badge/icon
|
||||
[6]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-armel/
|
||||
[7]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-armhf/badge/icon
|
||||
[8]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-armhf/
|
||||
[9]: https://ci.appveyor.com/api/projects/status/1e61ebdfpbiei58v/branch/master?svg=true
|
||||
[10]: https://ci.appveyor.com/project/ajlennon/mono-817/branch/master
|
||||
[11]: https://jenkins.mono-project.com/job/z/label=centos-s390x/badge/icon
|
||||
[12]: https://jenkins.mono-project.com/job/z/label=centos-s390x
|
||||
4. [Contributing to Mono] (#contributing-to-mono)
|
||||
5. [Git submodules maintenance](#git-submodules-maintenance)
|
||||
6. [Reporting bugs](#reporting-bugs)
|
||||
|
||||
Compilation and Installation
|
||||
============================
|
||||
|
||||
Building the Software
|
||||
a. Build Requirements
|
||||
---------------------
|
||||
|
||||
Please see our guides for building Mono on
|
||||
[Mac OS X](http://www.mono-project.com/docs/compiling-mono/mac/),
|
||||
[Linux](http://www.mono-project.com/docs/compiling-mono/linux/) and
|
||||
[Windows](http://www.mono-project.com/docs/compiling-mono/windows/).
|
||||
* On Itanium, you must obtain libunwind: http://www.hpl.hp.com/research/linux/libunwind/download.php4
|
||||
|
||||
Note that building from Git assumes that you already have Mono installed,
|
||||
so please download and [install the latest Mono release](http://www.mono-project.com/download/)
|
||||
before trying to build from Git. This is required because the Mono build
|
||||
relies on a working Mono C# compiler to compile itself
|
||||
(also known as [bootstrapping](http://en.wikipedia.org/wiki/Bootstrapping_(compilers))).
|
||||
* On Solaris
|
||||
|
||||
1. Make sure that you used GNU tar to unpack this package, as
|
||||
Solaris tar will not unpack this correctly, and you will get strange errors.
|
||||
|
||||
2. Make sure that you use the GNU toolchain to build the software.
|
||||
|
||||
3. Optional dependencies
|
||||
|
||||
* libgdiplus - Required for System.Drawing. This library in turn requires glib and pkg-config
|
||||
|
||||
* pkg-config - Available at: http://www.freedesktop.org/Software/pkgconfig
|
||||
|
||||
* glib 2.4 - Available at: http://www.gtk.org/
|
||||
|
||||
* libzlib - This library and the development headers are required for compression
|
||||
file support in the 2.0 profile.
|
||||
|
||||
4. Mono is required to build Mono. Use a system package or monolite (explained further below)
|
||||
|
||||
5. If you have a system Mono (not monolite), you will need to read this: http://mono-project.com/Parallel_Mono_Environments#Setting_up_a_Build_Environment
|
||||
|
||||
b. Building the Software
|
||||
------------------------
|
||||
|
||||
If you obtained this package as an officially released tarball,
|
||||
this is very simple, use configure and make:
|
||||
|
||||
`./configure --prefix=/usr/local ; make ; make install`
|
||||
|
||||
Mono supports a JIT engine on x86, SPARC, SPARCv9, S/390,
|
||||
S/390x, AMD64, ARM and PowerPC systems.
|
||||
|
||||
If you obtained this as a snapshot, you will need an existing
|
||||
Mono installation. To upgrade your installation, unpack both
|
||||
mono and mcs:
|
||||
|
||||
tar xzf mcs-XXXX.tar.gz
|
||||
tar xzf mono-XXXX.tar.gz
|
||||
mv mono-XXX mono
|
||||
mv mcs-XXX mcs
|
||||
cd mono
|
||||
./autogen.sh --prefix=/usr/local
|
||||
make
|
||||
|
||||
The Mono build system is silent for most compilation commands.
|
||||
To enable a more verbose compile (for example, to pinpoint
|
||||
problems in your makefiles or your system) pass the V=1 flag to make, like this:
|
||||
|
||||
` make V=1`
|
||||
|
||||
|
||||
c. Building the software from GIT
|
||||
---------------------------------
|
||||
|
||||
If you are building the software from GIT, make sure that you
|
||||
have up-to-date mcs and mono sources:
|
||||
|
||||
* If you are an anonymous user: `git clone git://github.com/mono/mono.git`
|
||||
|
||||
* If you are a Mono contributor with read/write privileges: `git clone [email protected]:mono/mono.git`
|
||||
|
||||
Then, go into the mono directory, and configure:
|
||||
|
||||
cd mono
|
||||
./autogen.sh --prefix=/usr/local
|
||||
make
|
||||
|
||||
For people with non-standard installations of the auto* utils and of
|
||||
pkg-config (common on misconfigured OSX and windows boxes), you could get
|
||||
an error like this:
|
||||
|
||||
./configure: line 19176: syntax error near unexpected token 'PKG_CHECK_MODULES(BASE_DEPENDENCIES,' ...
|
||||
|
||||
This means that you need to set the ACLOCAL_FLAGS environment variable
|
||||
when invoking autogen.sh, like this:
|
||||
|
||||
ACLOCAL_FLAGS="-I $acprefix/share/aclocal" ./autogen.sh --prefix=/usr/local
|
||||
|
||||
where $acprefix is the prefix where aclocal has been installed.
|
||||
This will automatically go into the mcs/ tree and build the
|
||||
binaries there.
|
||||
|
||||
This assumes that you have a working mono installation, and that
|
||||
there's a C# compiler named 'mcs', and a corresponding IL
|
||||
runtime called 'mono'. You can use two make variables
|
||||
EXTERNAL_MCS and EXTERNAL_RUNTIME to override these. e.g., you
|
||||
can say:
|
||||
|
||||
make EXTERNAL_MCS=/foo/bar/mcs EXTERNAL_RUNTIME=/somewhere/else/mono
|
||||
|
||||
If you don't have a working Mono installation
|
||||
---------------------------------------------
|
||||
|
||||
If you don't have a working Mono installation, you can try a slightly
|
||||
more risky approach: getting the latest version of the 'monolite' distribution,
|
||||
which contains just enough to run the 'mcs' compiler. You do this with:
|
||||
If you don't have a working Mono installation, an obvious choice
|
||||
is to install the latest released packages of 'mono' for your
|
||||
distribution and running `autogen.sh; make; make install` in the
|
||||
mono module directory.
|
||||
|
||||
# Run the following line after ./autogen.sh
|
||||
make get-monolite-latest
|
||||
You can also try a slightly more risky approach: this may not work,
|
||||
so start from the released tarball as detailed above.
|
||||
|
||||
This will download and place the files appropriately so that you can then
|
||||
just run:
|
||||
This works by first getting the latest version of the 'monolite'
|
||||
distribution, which contains just enough to run the 'mcs'
|
||||
compiler. You do this with:
|
||||
|
||||
make
|
||||
# Run the following line after ./autogen.sh
|
||||
make get-monolite-latest
|
||||
|
||||
The build will then use the files downloaded by `make get-monolite-latest`.
|
||||
This will download and automatically gunzip and untar the
|
||||
tarball, and place the files appropriately so that you can then
|
||||
just run: `make EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/gmcs.exe`
|
||||
|
||||
That will use the files downloaded by 'make get-monolite-latest.
|
||||
|
||||
Testing and Installation
|
||||
------------------------
|
||||
|
||||
You can run the mono and mcs test suites with the command: `make check`.
|
||||
You can run *(part of)* the mono and mcs test suites with the command: `make check`.
|
||||
All tests should pass.
|
||||
|
||||
If you want more *extensive* tests, including those that test the
|
||||
class libraries, you need to re-run 'configure' with the
|
||||
'--enable-nunit-tests' flag, and try: `make -k check`
|
||||
|
||||
Expect to find a few test suite failures. As a sanity check, you
|
||||
can compare the failures you got with [https://jenkins.mono-project.com/](https://jenkins.mono-project.com/).
|
||||
can compare the failures you got with
|
||||
|
||||
https://wrench.mono-project.com/Wrench/
|
||||
|
||||
You can now install mono with: `make install`
|
||||
|
||||
@@ -88,106 +154,33 @@ You can verify your installation by using the mono-test-install
|
||||
script, it can diagnose some common problems with Mono's install.
|
||||
Failure to follow these steps may result in a broken installation.
|
||||
|
||||
Using Mono
|
||||
==========
|
||||
d. Configuration Options
|
||||
------------------------
|
||||
|
||||
Once you have installed the software, you can run a few programs:
|
||||
The following are the configuration options that someone
|
||||
building Mono might want to use:
|
||||
|
||||
* `mono program.exe` runtime engine
|
||||
|
||||
* `mcs program.cs` C# compiler
|
||||
|
||||
* `monodis program.exe` CIL Disassembler
|
||||
|
||||
See the man pages for mono(1), mcs(1) and monodis(1) for further details.
|
||||
|
||||
Directory Roadmap
|
||||
=================
|
||||
|
||||
* `data/` - Configuration files installed as part of the Mono runtime.
|
||||
|
||||
* `docs/` - Technical documents about the Mono runtime.
|
||||
|
||||
* `external/` - Git submodules for external libraries (Newtonsoft.Json, ikvm, etc).
|
||||
|
||||
* `man/` - Manual pages for the various Mono commands and programs.
|
||||
|
||||
* `mcs/` - The class libraries, compiler and tools
|
||||
|
||||
* `class/` - The class libraries (like System.*, Microsoft.Build, etc.)
|
||||
|
||||
* `mcs/` - The Mono C# compiler written in C#
|
||||
|
||||
* `tools/` - Tools like gacutil, ikdasm, mdoc, etc.
|
||||
|
||||
* `mono/` - The core of the Mono Runtime.
|
||||
|
||||
* `arch/` - Architecture specific portions.
|
||||
|
||||
* `cil/` - Common Intermediate Representation, XML
|
||||
definition of the CIL bytecodes.
|
||||
|
||||
* `dis/` - CIL executable Disassembler
|
||||
|
||||
* `io-layer/` - The I/O layer and system abstraction for
|
||||
emulating the .NET IO model.
|
||||
|
||||
* `metadata/` - The object system and metadata reader.
|
||||
|
||||
* `mini/` - The Just in Time Compiler.
|
||||
|
||||
* `runtime/` - A directory that contains the Makefiles that link the
|
||||
mono/ and mcs/ build systems.
|
||||
|
||||
* `samples/` -Some simple sample programs on uses of the Mono
|
||||
runtime as an embedded library.
|
||||
|
||||
* `scripts/` - Scripts used to invoke Mono and the corresponding program.
|
||||
|
||||
Contributing to Mono
|
||||
====================
|
||||
|
||||
Before submitting changes to Mono, please review the [contribution
|
||||
guidelines](http://www.mono-project.com/community/contributing/).
|
||||
Please pay particular attention to the [Important
|
||||
Rules](http://www.mono-project.com/community/contributing/#important-rules)
|
||||
section.
|
||||
|
||||
Reporting bugs
|
||||
==============
|
||||
|
||||
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
|
||||
[guidelines](http://www.mono-project.com/community/bugs/make-a-good-bug-report/)
|
||||
on how to make a good bug report.
|
||||
|
||||
Configuration Options
|
||||
=====================
|
||||
|
||||
The following are the configuration options that someone building Mono
|
||||
might want to use:
|
||||
|
||||
* `--with-sgen=yes,no` - Generational GC support: Used to enable or
|
||||
disable the compilation of a Mono runtime with the SGen garbage
|
||||
collector.
|
||||
* `--with-sgen=yes,no` - Generational GC support: Used to enable or disable the
|
||||
compilation of a Mono runtime with the SGen garbage collector.
|
||||
|
||||
* On platforms that support it, after building Mono, you will have
|
||||
both a `mono` binary and a `mono-sgen` binary. `mono` uses Boehm,
|
||||
while `mono-sgen` uses the Simple Generational GC.
|
||||
both a mono binary and a mono-sgen binary. Mono uses Boehm, while
|
||||
mono-sgen uses the Simple Generational GC.
|
||||
|
||||
* `--with-gc=[included, boehm, none]` - Selects the default Boehm
|
||||
garbage collector engine to use.
|
||||
* `--with-gc=[boehm, included, sgen, none]` - Selects the default Boehm garbage
|
||||
collector engine to use.
|
||||
|
||||
* *included*: (*slighty modified Boehm GC*) This is the default
|
||||
value for the Boehm GC, and it's the most feature complete, it will
|
||||
allow Mono to use typed allocations and support the debugger.
|
||||
* *included*: (*slighty modified Boehm GC*)
|
||||
This is the default value, and its
|
||||
the most feature complete, it will allow Mono
|
||||
to use typed allocations and support the
|
||||
debugger.
|
||||
|
||||
* *boehm*: This is used to use a system-install Boehm GC, it is
|
||||
useful to test new features available in Boehm GC, but we do not
|
||||
recommend that people use this, as it disables a few features.
|
||||
* *boehm*:
|
||||
This is used to use a system-install Boehm GC,
|
||||
it is useful to test new features available in
|
||||
Boehm GC, but we do not recommend that people
|
||||
use this, as it disables a few features.
|
||||
|
||||
* *none*:
|
||||
Disables the inclusion of a garbage collector.
|
||||
@@ -274,6 +267,30 @@ and runtime.
|
||||
|
||||
* This defaults to `yes`.
|
||||
|
||||
* `--with-moonlight=yes,no`
|
||||
|
||||
* Whether you want to generate the Silverlight/Moonlight
|
||||
libraries and toolchain in addition to the default
|
||||
(1.1 and 2.0 APIs).
|
||||
|
||||
* This will produce the `smcs` compiler which will reference
|
||||
the Silverlight modified assemblies (mscorlib.dll,
|
||||
System.dll, System.Code.dll and System.Xml.Core.dll) and turn
|
||||
on the LINQ extensions for the compiler.
|
||||
|
||||
* `--with-moon-gc=boehm,sgen` - Select the GC to use for Moonlight.
|
||||
|
||||
* *boehm*:
|
||||
Selects the Boehm Garbage Collector, with the same flags
|
||||
as the regular Mono build. This is the default.
|
||||
|
||||
* *sgen*:
|
||||
Selects the new SGen Garbage Collector, which provides
|
||||
Generational GC support, using the same flags as the
|
||||
mono-sgen build.
|
||||
|
||||
* This defaults to `boehm`.
|
||||
|
||||
* `--with-libgdiplus=installed,sibling,<path>` - Configure where Mono
|
||||
searches for libgdiplus when running System.Drawing tests.
|
||||
|
||||
@@ -281,7 +298,7 @@ searches for libgdiplus when running System.Drawing tests.
|
||||
library is available to Mono through the regular
|
||||
system setup.
|
||||
|
||||
* `sibling` can be used to specify that a libgdiplus
|
||||
* `sibling' can be used to specify that a libgdiplus
|
||||
that resides as a sibling of this directory (mono)
|
||||
should be used.
|
||||
|
||||
@@ -388,13 +405,13 @@ for Mono. The LLVM code generator and optimizer will be
|
||||
used instead of Mono's built-in code generator for both
|
||||
Just in Time and Ahead of Time compilations.
|
||||
|
||||
* See http://www.mono-project.com/docs/advanced/mono-llvm/ for the
|
||||
* See the http://www.mono-project.com/Mono_LLVM for the
|
||||
full details and up-to-date information on this feature.
|
||||
|
||||
* You will need to have an LLVM built that Mono can link
|
||||
against.
|
||||
|
||||
* The `--enable-loadedllvm` variant will make the LLVM backend
|
||||
* The --enable-loadedllvm variant will make the LLVM backend
|
||||
into a runtime-loadable module instead of linking it directly
|
||||
into the main mono binary.
|
||||
|
||||
@@ -428,6 +445,7 @@ not done much testing with Mono.
|
||||
runtime that contains DTrace probes and can
|
||||
participate in the system profiling using DTrace.
|
||||
|
||||
|
||||
* `--disable-dev-random`
|
||||
|
||||
* Mono uses /dev/random to obtain good random data for
|
||||
@@ -447,52 +465,88 @@ http://code.google.com/p/nativeclient/
|
||||
* Currently this is used with Mono's AOT engine as
|
||||
Native Client does not support JIT engines yet.
|
||||
|
||||
Working With Submodules
|
||||
=======================
|
||||
Using Mono
|
||||
==========
|
||||
|
||||
Mono references several external git submodules, for example
|
||||
a fork of Microsoft's reference source code that has been altered
|
||||
to be suitable for use with the Mono runtime.
|
||||
Once you have installed the software, you can run a few programs:
|
||||
|
||||
This section describes how to use it.
|
||||
* `mono program.exe` runtime engine
|
||||
|
||||
An initial clone should be done recursively so all submodules will also be
|
||||
cloned in a single pass:
|
||||
* `mcs program.cs` C# compiler
|
||||
|
||||
$ git clone --recursive git@github.com:mono/mono
|
||||
* `monodis program.exe` CIL Disassembler
|
||||
|
||||
Once cloned, submodules can be updated to pull down the latest changes.
|
||||
This can also be done after an initial non-recursive clone:
|
||||
See the man pages for mono(1), mint(1), monodis(1) and mcs(2)
|
||||
for further details.
|
||||
|
||||
$ git submodule update --init --recursive
|
||||
Directory Roadmap
|
||||
=================
|
||||
|
||||
To pull external changes into a submodule:
|
||||
* `docs/` - Technical documents about the Mono runtime.
|
||||
|
||||
$ cd <submodule>
|
||||
$ git pull origin <branch>
|
||||
$ cd <top-level>
|
||||
$ git add <submodule>
|
||||
$ git commit
|
||||
* `data/` - Configuration files installed as part of the Mono runtime.
|
||||
|
||||
By default, submodules are detached because they point to a specific commit.
|
||||
Use `git checkout` to move back to a branch before making changes:
|
||||
* `mono/` - The core of the Mono Runtime.
|
||||
|
||||
$ cd <submodule>
|
||||
$ git checkout <branch>
|
||||
# work as normal; the submodule is a normal repo
|
||||
$ git commit/push new changes to the repo (submodule)
|
||||
* `metadata/` - The object system and metadata reader.
|
||||
|
||||
$ cd <top-level>
|
||||
$ git add <submodule> # this will record the new commits to the submodule
|
||||
$ git commit
|
||||
* `mini/` - The Just in Time Compiler.
|
||||
|
||||
To switch the repo of a submodule (this should not be a common or normal thing
|
||||
to do at all), first edit `.gitmodules` to point to the new location, then:
|
||||
* `dis/` - CIL executable Disassembler
|
||||
|
||||
$ git submodule sync -- <path of the submodule>
|
||||
$ git submodule update --recursive
|
||||
$ git checkout <desired new hash or branch>
|
||||
* `cli/` - Common code for the JIT and the interpreter.
|
||||
|
||||
The desired output diff is a change in `.gitmodules` to reflect the
|
||||
change in the remote URL, and a change in /<submodule> where you see
|
||||
the desired change in the commit hash.
|
||||
* `io-layer/` - The I/O layer and system abstraction for
|
||||
emulating the .NET IO model.
|
||||
|
||||
* `cil/` - Common Intermediate Representation, XML
|
||||
definition of the CIL bytecodes.
|
||||
|
||||
* `interp/` - Interpreter for CLI executables (obsolete).
|
||||
|
||||
* `arch/` - Architecture specific portions.
|
||||
|
||||
* `man/` - Manual pages for the various Mono commands and programs.
|
||||
|
||||
* `samples/` -Some simple sample programs on uses of the Mono
|
||||
runtime as an embedded library.
|
||||
|
||||
* `scripts/` - Scripts used to invoke Mono and the corresponding program.
|
||||
|
||||
* `runtime/` - A directory that contains the Makefiles that link the
|
||||
mono/ and mcs/ build systems.
|
||||
|
||||
* `../olive/`
|
||||
|
||||
* If the directory ../olive is present (as an
|
||||
independent checkout) from the Mono module, that
|
||||
directory is automatically configured to share the
|
||||
same prefix than this module gets.
|
||||
|
||||
Contributing to Mono
|
||||
====================
|
||||
Before submitting changes to Mono, please review the contribution guidelines at http://mono-project.com/Contributing. Please pay particular attention to the [Important Rules](http://mono-project.com/Contributing#Important_Rules) section.
|
||||
|
||||
|
||||
Git submodules maintenance
|
||||
==========================
|
||||
|
||||
Read documentation at http://mono-project.com/Git_Submodule_Maintenance
|
||||
|
||||
Maintainer
|
||||
==========
|
||||
|
||||
Mono is maintained by miguel@xamarin.com
|
||||
|
||||
Reporting bugs
|
||||
==============
|
||||
|
||||
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 guidelines on how to make a good bug
|
||||
report:
|
||||
|
||||
http://mono-project.com/Bugs#How_to_make_a_good_bug_report
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
README.vsnet Last updated: 2006-02-01
|
||||
|
||||
|
||||
SVN includes a Visual Studio .NET 2005 solution, mono.sln, and some
|
||||
projects files to build most of the unmanaged parts in Mono.
|
||||
|
||||
The "mono.sln" solution file contains the VC projects files for:
|
||||
|
||||
* Embedded Samples
|
||||
* test-invoke.vcproj
|
||||
* test-metadata.vcproj
|
||||
* teste.vcproj
|
||||
* Libraries
|
||||
* libgc.vcproj
|
||||
* libmono.vcproj
|
||||
* Tools
|
||||
* genmdesc.vcproj
|
||||
* monoburg.vcproj
|
||||
* monodiet.vcproj
|
||||
* monodis.vcproj
|
||||
* monograph.vcproj
|
||||
* pedump.vcproj
|
||||
* mono.vcproj
|
||||
|
||||
|
||||
REQUIREMENTS
|
||||
|
||||
* A working (i.e. where you could succesfully build mono) cygwin
|
||||
(http://www.cygwin.com/) setup! This is required to:
|
||||
* generate some files (via monoburg and genmdesc);
|
||||
* build the class libraries; and
|
||||
* test for regressions.
|
||||
|
||||
* Visual Studio .NET 2005. Previous Visual Studio versions may work or
|
||||
requires, hopefully minimal, changes.
|
||||
|
||||
* VSDependencies.zip must be decompressed under the /mono/ directory
|
||||
(otherwise you will need to edit all the projects files). This file can
|
||||
be downloaded from http://www.go-mono.com/archive/VSDependencies.zip
|
||||
|
||||
|
||||
LOCAL CHANGES
|
||||
|
||||
Sadly solution/projects files aren't easy to move from computers to
|
||||
computers (well unless everyone follow the same naming convention) so
|
||||
you'll likely have to changes some options in order to compile the
|
||||
solution.
|
||||
|
||||
* each executed assembly (i.e. the EXE) must be able to find a
|
||||
working mscorlib.dll (and all the other required assemblies).
|
||||
This can be done in different ways. My preference is to use the
|
||||
project "properties pages" in the "Configuration Properties
|
||||
\Debugging\Environment" options and set MONO_PATH to the class
|
||||
libraries directory build by cygwin (local) or on Linux
|
||||
(remote).
|
||||
|
||||
e.g. MONO_PATH=z:\svn\mcs\class\lib\default\
|
||||
allows me to use the class libs build under Linux, while
|
||||
MONO_PATH=C:\cygwin\opt\mono\lib\mono\1.0
|
||||
use the one built from cygwin (after a make install)
|
||||
|
||||
Some useful informations to adapt the solution/project files...
|
||||
|
||||
* My cygwin root dir is: c:\cygwin\
|
||||
* My username is: poupou
|
||||
* My mono install prefix is: /opt/mono
|
||||
|
||||
|
||||
BUILDING
|
||||
|
||||
Once everything is installed (and edited) you can right-click on the
|
||||
"mono" solution (in the "Solution Explorer"), select "Clean
|
||||
Solution" (for the first time) then "Build Solution".
|
||||
|
||||
|
||||
KNOWN ISSUES
|
||||
|
||||
[1] Most, BUT NOT ALL, the regressions tests pass under this build. The
|
||||
failures seems limited to some mathematical differences and to code
|
||||
relying on the stack walking functions. The hacks to replace the GCC
|
||||
functions (__builtin_frame_address and __builtin_return_address) are
|
||||
incomplete;
|
||||
|
||||
[2] The solution doesn't provide complete (i.e. from scratch) build. It
|
||||
requires a working cygwin environment to create some files (e.g. via
|
||||
genmdesc, monoburg). This isn't so bad as without cygwin you wouldn't be
|
||||
able to test Mono properly (see REQUIREMENTS);
|
||||
|
||||
[3] Only the Debug target is configured properly (that would be easy to
|
||||
fix, but would require turning off some optimizations like omitting
|
||||
stack frames). Anyway there are other issues [1] to fix before switching
|
||||
to Release and IMHO the _biggest_ advantage to VS.NET is it's debugger/
|
||||
debugging tools;
|
||||
|
||||
[4] The C compiler emits _lots_ of warning during compilation. Some
|
||||
warnings have been turned off for some projects (there was so much that
|
||||
it slowed down compilation). You can bring them back (or hide more of
|
||||
them) using the project "properties pages" windows, "Configuration
|
||||
Properties\C/C++\Advanced\Disable Specific Warnings";
|
||||
|
||||
[5] Visual Studio 2005 should have all the latest header files required,
|
||||
but if not (or if you're using an older version of VS) then install MS
|
||||
Platform SDK (Windows Server 2003 is the latest) to ensure you have the
|
||||
latest Windows header files. You can download it from:
|
||||
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
|
||||
|
||||
[6] Not everyone has VS.NET so it is possible you may have to add some
|
||||
(new) files to the build from time to time. See "more informations" for
|
||||
reporting those changes.
|
||||
|
||||
[7] Probably a lot more I didn't discover... or has changed since.
|
||||
|
||||
|
||||
MORE INFORMATION
|
||||
|
||||
Please email <[email protected]> if you have any problem
|
||||
and/or if there's something wrong/missing in the instructions.
|
||||
|
||||
An online version of this file is available at
|
||||
http://www.mono-project.com/Compiling_Mono_VSNET
|
||||
@@ -1,6 +0,0 @@
|
||||
Makefile.in
|
||||
Makefile
|
||||
*.exe
|
||||
*.dll
|
||||
*.mdb
|
||||
coreclr-testlist.txt
|
||||
@@ -1,14 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace System.Runtime.Loader
|
||||
{
|
||||
public static class AssemblyExtensions
|
||||
{
|
||||
public static Type[] GetTypes(this Assembly assembly)
|
||||
{
|
||||
return assembly.GetTypes ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace System.Runtime.Loader
|
||||
{
|
||||
public abstract class AssemblyLoadContext
|
||||
{
|
||||
protected abstract Assembly Load(AssemblyName assemblyName);
|
||||
|
||||
protected Assembly LoadFromAssemblyPath(string assemblyPath)
|
||||
{
|
||||
if (assemblyPath == null)
|
||||
throw new ArgumentNullException("assemblyPath");
|
||||
|
||||
if (!Path.IsPathRooted(assemblyPath))
|
||||
throw new ArgumentException("Gimme an absolute path " + assemblyPath + " XXX " + Path.GetPathRoot(assemblyPath), "assemblyPath");
|
||||
|
||||
return Assembly.LoadFrom (assemblyPath);
|
||||
}
|
||||
|
||||
public Assembly LoadFromAssemblyName(AssemblyName assemblyName)
|
||||
{
|
||||
// AssemblyName is mutable. Cache the expected name before anybody gets a chance to modify it.
|
||||
string requestedSimpleName = assemblyName.Name;
|
||||
|
||||
Assembly assembly = Load(assemblyName);
|
||||
if (assembly == null)
|
||||
throw new FileLoadException("File not found", requestedSimpleName);
|
||||
|
||||
return assembly;
|
||||
}
|
||||
|
||||
public static AssemblyName GetAssemblyName(string assemblyPath)
|
||||
{
|
||||
if (!File.Exists (assemblyPath))
|
||||
throw new Exception ("file not found");
|
||||
return new AssemblyName (Path.GetFileName (assemblyPath));
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,14 +0,0 @@
|
||||
This directory contains acceptance tests, handled by optional non git submodule based submodules. Run the tests via "make check-full" (there are also targets for individual test suites).
|
||||
|
||||
The SUBMODULES.json file stores information about the submodules, and make targets are used to check out submodules, check their versions, and update the submodule information.
|
||||
|
||||
By convention, submodules repositories are at the same level as the mono repository.
|
||||
|
||||
Make targets available:
|
||||
|
||||
make check-<module> - Checks whenever <module> is checked out and matches the version in the info file.
|
||||
make reset-<module> - Clones <module>if neccesary and checks out the revision specified in the info file.
|
||||
make bump-<module> - Updates the revision stored in the info file for <module>.
|
||||
make bump-current-<module> - Updates the revision stored in the info file for <module> to the current revision.
|
||||
make commit-bump-<module> - Same as make bump-<module>, but commits the change.
|
||||
make commit-bump-current-<module> - Same as make bump-current-<module>, but commits the change.
|
||||
@@ -1,26 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "roslyn",
|
||||
"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": "96cf61f96b42cf9d013e641609cb7787f6e3a71f",
|
||||
"remote-branch": "origin/mono",
|
||||
"branch": "mono",
|
||||
"directory": "coreclr"
|
||||
},
|
||||
{
|
||||
"name": "ms-test-suite",
|
||||
"url": "[email protected]:xamarin/ms-test-suite.git",
|
||||
"rev": "8eb26bd72a38e2c78675db45b13e89237dbdf4f2",
|
||||
"remote-branch": "origin/master",
|
||||
"branch": "master",
|
||||
"directory": "ms-test-suite"
|
||||
}
|
||||
]
|
||||
@@ -1,159 +0,0 @@
|
||||
.PHONY: validate-versions reset-versions
|
||||
|
||||
CONFIG=SUBMODULES.json
|
||||
|
||||
# usage $(call ValidateVersionTemplate (name,MAKEFILE VAR,repo name))
|
||||
# usage $(call ValidateVersionTemplate (mono,MONO,mono))
|
||||
|
||||
define ValidateVersionTemplate
|
||||
#$(eval REPOSITORY_$(2):=$(shell test -z $(3) && echo $(1) || echo "$(3)"))
|
||||
#$(eval DIRECTORY_$(2):=$(shell python versions.py get-dir $(1)))
|
||||
#$(eval DIRECTORY_$(2):=$(shell test -z $(DIRECTORY_$(2)) && echo $(1) || echo $(DIRECTORY_$(2))))
|
||||
#$(eval MODULE_$(2):=$(shell python versions.py get-url $(1)))
|
||||
#$(eval NEEDED_$(2)_VERSION:=$(shell python versions.py get-rev $(1)))
|
||||
#$(eval $(2)_BRANCH_AND_REMOTE:=$(shell python versions.py get-remote-branch $(1)))
|
||||
|
||||
#$(eval $(2)_VERSION:=$$$$(shell cd $($(2)_PATH) 2>/dev/null && git rev-parse HEAD ))
|
||||
|
||||
#$(eval NEEDED_$(2)_BRANCH:=$(word 2, $(subst /, ,$($(2)_BRANCH_AND_REMOTE))))
|
||||
#$(eval NEEDED_$(2)_REMOTE:=$(word 1, $(subst /, ,$($(2)_BRANCH_AND_REMOTE))))
|
||||
#$(eval $(2)_BRANCH:=$$$$(shell cd $($(2)_PATH) 2>/dev/null && git symbolic-ref --short HEAD 2>/dev/null))
|
||||
|
||||
validate-$(1)::
|
||||
@if test x$$(IGNORE_$(2)_VERSION) = "x"; then \
|
||||
if test ! -d $($(2)_PATH); then \
|
||||
if test x$$(RESET_VERSIONS) != "x"; then \
|
||||
$(MAKE) reset-$(1) || exit 1; \
|
||||
else \
|
||||
echo "Your $(1) checkout is missing, please run 'make reset-$(1)'"; \
|
||||
touch .validate-versions-failure; \
|
||||
fi; \
|
||||
else \
|
||||
if test "x$($(2)_VERSION)" != "x$(NEEDED_$(2)_VERSION)" ; then \
|
||||
if test x$$(RESET_VERSIONS) != "x"; then \
|
||||
$(MAKE) reset-$(1) || exit 1; \
|
||||
else \
|
||||
echo "Your $(1) version is out of date, please run 'make reset-$(1)' (found $($(2)_VERSION), expected $(NEEDED_$(2)_VERSION))"; \
|
||||
test -z "$(BUILD_REVISION)" || $(MAKE) test-$(1); \
|
||||
touch .validate-versions-failure; \
|
||||
fi; \
|
||||
elif test "x$($(2)_BRANCH)" != "x$(NEEDED_$(2)_BRANCH)" ; then \
|
||||
if test x$$(RESET_VERSIONS) != "x"; then \
|
||||
test -z "$(BUILD_REVISION)" || $(MAKE) test-$(1); \
|
||||
$(MAKE) reset-$(1) || exit 1; \
|
||||
else \
|
||||
echo "Your $(1) branch is out of date, please run 'make reset-$(1)' (found $($(2)_BRANCH), expected $(NEEDED_$(2)_BRANCH))"; \
|
||||
touch .validate-versions-failure; \
|
||||
fi; \
|
||||
fi; \
|
||||
fi; \
|
||||
fi
|
||||
|
||||
test-$(1)::
|
||||
@echo $(1)
|
||||
@echo " REPOSITORY_$(2)=$(REPOSITORY_$(2))"
|
||||
@echo " DIRECTORY_$(2)=$(DIRECTORY_$(2))"
|
||||
@echo " MODULE_$(2)=$(MODULE_$(2))"
|
||||
@echo " NEEDED_$(2)_VERSION=$(NEEDED_$(2)_VERSION)"
|
||||
@echo " $(2)_VERSION=$($(2)_VERSION)"
|
||||
@echo " $(2)_BRANCH_AND_REMOTE=$($(2)_BRANCH_AND_REMOTE)"
|
||||
@echo " NEEDED_$(2)_BRANCH=$(NEEDED_$(2)_BRANCH)"
|
||||
@echo " NEEDED_$(2)_REMOTE=$(NEEDED_$(2)_REMOTE)"
|
||||
@echo " $(2)_BRANCH=$($(2)_BRANCH)"
|
||||
@echo " $(2)_PATH=$($(2)_PATH) => $(abspath $($(2)_PATH))"
|
||||
|
||||
reset-$(1)::
|
||||
@if test -d $($(2)_PATH); then \
|
||||
if ! (cd $($(2)_PATH) && git show $(NEEDED_$(2)_VERSION) >/dev/null 2>&1 && git log -1 $(NEEDED_$(2)_REMOTE) >/dev/null 2>&1) ; then \
|
||||
echo "*** git fetch `basename $$($(2)_PATH)`" && (cd $($(2)_PATH) && git fetch); \
|
||||
fi; \
|
||||
else \
|
||||
echo "*** git clone $(MODULE_$(2)) --recursive $(DIRECTORY_$(2))" && (cd `dirname $($(2)_PATH)` && git clone $(MODULE_$(2)) --recursive $(DIRECTORY_$(2)) || exit 1 ); \
|
||||
fi
|
||||
@if test x$$(IGNORE_$(2)_VERSION) = "x"; then \
|
||||
echo "*** [$(1)] git checkout -f" $(NEEDED_$(2)_BRANCH) && (cd $($(2)_PATH) ; git checkout -f $(NEEDED_$(2)_BRANCH) || git checkout -f -b $($(2)_BRANCH_AND_REMOTE)); \
|
||||
echo "*** [$(1)] git reset --hard $(NEEDED_$(2)_VERSION)" && (cd $($(2)_PATH) && git reset --hard $(NEEDED_$(2)_VERSION)); \
|
||||
fi
|
||||
@echo "*** [$(1)] git submodule update --init --recursive" && (cd $($(2)_PATH) && git submodule update --init --recursive)
|
||||
|
||||
print-$(1)::
|
||||
@printf "*** %-16s %-45s %s (%s)\n" "$(DIRECTORY_$(2))" "$(MODULE_$(2))" "$(NEEDED_$(2)_VERSION)" "$(NEEDED_$(2)_BRANCH)"
|
||||
|
||||
.PHONY: validate-$(1) reset-$(1) print-$(1)
|
||||
|
||||
reset-versions:: reset-$(1)
|
||||
validate-versions:: Validate-$(1)
|
||||
print-versions:: print-$(1)
|
||||
|
||||
endef
|
||||
|
||||
$(eval $(call ValidateVersionTemplate,roslyn,ROSLYN))
|
||||
$(eval $(call ValidateVersionTemplate,coreclr,CORECLR))
|
||||
$(eval $(call ValidateVersionTemplate,ms-test-suite,MSTESTSUITE))
|
||||
|
||||
reset-versions::
|
||||
|
||||
validate-versions::
|
||||
@if test -e .validate-versions-failure; then \
|
||||
rm .validate-versions-failure; \
|
||||
echo One or more modules needs update; \
|
||||
exit 1; \
|
||||
else \
|
||||
echo All dependent modules up to date; \
|
||||
fi
|
||||
|
||||
reset:
|
||||
@$(MAKE) validate-versions RESET_VERSIONS=1
|
||||
|
||||
__bump-version-%:
|
||||
@if [ "$(REV)" = "" ]; then echo "Usage: make bump-version-$* REV=<ref>"; exit 1; fi
|
||||
python versions.py set-rev $* $(REV)
|
||||
@if [ "$(COMMIT)" = "1" ]; then echo "[acceptance-tests] Bump $* to pick up $(REV)." | git commit -F - $(CONFIG); fi
|
||||
|
||||
__bump-branch-%:
|
||||
@if [ "$(BRANCH)" = "" ]; then echo "Usage: make bump-branch-$* BRANCH=<branch> REMOTE_BRANCH=<remote branch>"; exit 1; fi
|
||||
@if [ "$(REMOTE_BRANCH)" == "" ]; then echo "Usage: make bump-branch-$* BRANCH=<branch> REMOTE_BRANCH=<remote branch>"; exit 1; fi
|
||||
python versions.py set-branch $* $(BRANCH)
|
||||
python versions.py set-remote-branch $* $(REMOTE_BRANCH)
|
||||
@if [ "$(COMMIT)" = "1" ]; then echo "[acceptance-tests] Bump $* to switch to $(BRANCH) $(REMOTE BRANCH)." | git commit -F - $(CONFIG); fi
|
||||
|
||||
__bump-current-version-%:
|
||||
REV=$(shell cd $(TOP)/../$* && git log -1 --pretty=format:%H); \
|
||||
python versions.py set-rev $* $$REV; \
|
||||
if [ "$(COMMIT)" = "1" ]; then echo "[acceptance-tests] Bump $* to pick up $$REV:" | git commit -F - $(CONFIG); fi
|
||||
|
||||
# Bump the given submodule to the revision given by the REV make variable
|
||||
# If COMMIT is 1, commit the change
|
||||
bump-roslyn: __bump-version-roslyn
|
||||
bump-coreclr: __bump-version-coreclr
|
||||
bump-ms-test-suite: __bump-version-ms-test-suite
|
||||
|
||||
# Bump the given submodule to the branch given by the BRANCH/REMOTE_BRANCH make variables
|
||||
# If COMMIT is 1, commit the change
|
||||
bump-branch-roslyn: __bump-branch-roslyn
|
||||
bump-branch-coreclr: __bump-branch-coreclr
|
||||
bump-branch-ms-test-suite: __bump-branch-ms-test-suite
|
||||
|
||||
# Bump the given submodule to its current GIT version
|
||||
# If COMMIT is 1, commit the change
|
||||
bump-current-roslyn: __bump-current-version-roslyn
|
||||
bump-current-coreclr: __bump-current-version-coreclr
|
||||
bump-current-ms-test-suite: __bump-current-version-ms-test-suite
|
||||
|
||||
commit-bump-roslyn:
|
||||
$(MAKE) bump-roslyn COMMIT=1
|
||||
|
||||
commit-bump-coreclr:
|
||||
$(MAKE) bump-coreclr COMMIT=1
|
||||
|
||||
commit-bump-ms-test-suite:
|
||||
$(MAKE) bump-ms-test-suite COMMIT=1
|
||||
|
||||
commit-bump-current-roslyn:
|
||||
$(MAKE) bump-current-roslyn COMMIT=1
|
||||
|
||||
commit-bump-current-coreclr:
|
||||
$(MAKE) bump-current-coreclr COMMIT=1
|
||||
|
||||
commit-bump-current-ms-test-suite:
|
||||
$(MAKE) bump-current-ms-test-suite COMMIT=1
|
||||
@@ -1,52 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
import json
|
||||
|
||||
def find_module(submodules, name):
|
||||
for item in submodules:
|
||||
if item["name"] == name:
|
||||
return item
|
||||
|
||||
print "Not found"
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print "Usage: versions.py <command>"
|
||||
sys.exit(1)
|
||||
|
||||
CONFIG_FILE = "SUBMODULES.json"
|
||||
command = sys.argv[1]
|
||||
|
||||
submodules = json.load(open(CONFIG_FILE))
|
||||
|
||||
if command == "get-rev":
|
||||
mod = find_module(submodules, sys.argv[2])
|
||||
print mod["rev"]
|
||||
elif command == "get-url":
|
||||
mod = find_module(submodules, sys.argv[2])
|
||||
print mod["url"]
|
||||
elif command == "get-dir":
|
||||
mod = find_module(submodules, sys.argv[2])
|
||||
print mod["directory"]
|
||||
elif command == "get-remote-branch":
|
||||
mod = find_module(submodules, sys.argv[2])
|
||||
print mod["remote-branch"]
|
||||
elif command == "set-rev":
|
||||
mod = find_module(submodules, sys.argv[2])
|
||||
mod["rev"] = sys.argv[3]
|
||||
json.dump(submodules, open(CONFIG_FILE, "w"), indent = 2)
|
||||
elif command == "set-branch":
|
||||
mod = find_module(submodules, sys.argv[2])
|
||||
mod["branch"] = sys.argv[3]
|
||||
json.dump(submodules, open(CONFIG_FILE, "w"), indent = 2)
|
||||
elif command == "set-remote-branch":
|
||||
mod = find_module(submodules, sys.argv[2])
|
||||
mod["remote-branch"] = sys.argv[3]
|
||||
json.dump(submodules, open(CONFIG_FILE, "w"), indent = 2)
|
||||
elif command == "cat":
|
||||
print json.dumps(submodules, indent = 2)
|
||||
else:
|
||||
print "Unknown command "" + command + ""."
|
||||
sys.exit(1)
|
||||
+1
-1
@@ -26,7 +26,7 @@ i?86-*-linux*|i?86-apple-darwin*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-li
|
||||
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*|aarch64*)
|
||||
pic_options='-fPIC'
|
||||
;;
|
||||
?86-pc-cygwin*|i?86-pc-cygwin*|i?86-pc-mingw32*)
|
||||
?86-pc-cygwin*|i?86-pc-cygwin*)
|
||||
pic_options='-DDLL_EXPORT'
|
||||
;;
|
||||
i?86-apple-darwin*|arm-apple-darwin*)
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
#
|
||||
# Appveyor configuration file for CI build of Mono on Windows (under Cygwin)
|
||||
#
|
||||
# For further details see http://www.appveyor.com
|
||||
#
|
||||
|
||||
#
|
||||
# Custom environment variables
|
||||
#
|
||||
environment:
|
||||
global:
|
||||
CYG_ROOT: C:\cygwin
|
||||
CYG_MIRROR: http://cygwin.mirror.constant.com
|
||||
CYG_CACHE: C:\cygwin\var\cache\setup
|
||||
CYG_BASH: C:\cygwin\bin\bash
|
||||
|
||||
#
|
||||
# Cache Cygwin files to speed up build
|
||||
#
|
||||
cache:
|
||||
- '%CYG_CACHE%'
|
||||
|
||||
#
|
||||
# Do a shallow clone of the repo to speed up build
|
||||
#
|
||||
clone_depth: 1
|
||||
|
||||
#
|
||||
# Initialisation prior to pulling the Mono repository
|
||||
# Attempt to ensure we don't try to convert line endings to Win32 CRLF as this will cause build to fail
|
||||
#
|
||||
init:
|
||||
- git config --global core.autocrlf input
|
||||
|
||||
#
|
||||
# Install needed build dependencies
|
||||
#
|
||||
install:
|
||||
- ps: 'Start-FileDownload "http://cygwin.com/setup-x86.exe" -FileName "setup-x86.exe"'
|
||||
- 'setup-x86.exe --quiet-mode --no-shortcuts --only-site --root "%CYG_ROOT%" --site "%CYG_MIRROR%" --local-package-dir "%CYG_CACHE%" --packages autoconf,automake,bison,gcc-core,gcc-g++,mingw-runtime,mingw-binutils,mingw-gcc-core,mingw-gcc-g++,mingw-pthreads,mingw-w32api,libtool,make,python,gettext-devel,gettext,intltool,libiconv,pkg-config,git,curl,libxslt > NUL 2>&1'
|
||||
- '%CYG_BASH% -lc "cygcheck -dc cygwin"'
|
||||
|
||||
# Cygwin build script
|
||||
#
|
||||
# NOTES:
|
||||
#
|
||||
# The stdin/stdout file descriptor appears not to be valid for the Appveyor
|
||||
# build which causes failures as certain functions attempt to redirect
|
||||
# default file handles. Ensure a dummy file descriptor is opened with 'exec'.
|
||||
#
|
||||
build_script:
|
||||
- 'echo Building...'
|
||||
- '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; ./autogen.sh --prefix=/usr/local --host=i686-pc-mingw32"'
|
||||
- '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make get-monolite-latest"'
|
||||
- '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make -j2"'
|
||||
- 'echo Installing...'
|
||||
- 'mkdir %APPVEYOR_BUILD_FOLDER%\install'
|
||||
- '%CYG_BASH% -lc "export CYGWIN=winsymlinks:native; mount \"$APPVEYOR_BUILD_FOLDER\install\" /usr/local; cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make install; umount /usr/local"'
|
||||
|
||||
#
|
||||
# Disable tests for now
|
||||
#
|
||||
test: off
|
||||
|
||||
#
|
||||
# Only build the master branch
|
||||
#
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
#
|
||||
# NOTE: Currently this is the Mono installation tree. In future we will create an installation package artifact.
|
||||
# It has to be relative to the project path. Thus we have installed to within the build tree.
|
||||
#
|
||||
artifacts:
|
||||
- path: install
|
||||
name: mono-binaries
|
||||
type: zip
|
||||
Executable
+227
@@ -0,0 +1,227 @@
|
||||
#!/bin/bash -e
|
||||
CURDIR="`pwd`"
|
||||
MINGW=i386-mingw32msvc
|
||||
CROSS_DIR=/opt/cross/$MINGW
|
||||
EXTRA_CROSS_DIR=
|
||||
INSTALL_DESTDIR="$CURDIR/mono-win32"
|
||||
PROFILES="default net_2_0 net_3_5 net_4_0 net_4_5 moonlight"
|
||||
TEMPORARY_PKG_CONFIG_DIR=/tmp/$RANDOM-pkg-config-$RANDOM
|
||||
ORIGINAL_PATH="$PATH"
|
||||
|
||||
export CPPFLAGS_FOR_EGLIB CFLAGS_FOR_EGLIB CPPFLAGS_FOR_LIBGC CFLAGS_FOR_LIBGC
|
||||
|
||||
function cleanup ()
|
||||
{
|
||||
if [ -d "$TEMPORARY_PKG_CONFIG_DIR" ]; then
|
||||
rm -rf "$TEMPORARY_PKG_CONFIG_DIR"
|
||||
fi
|
||||
}
|
||||
|
||||
function check_pkg_config_dir ()
|
||||
{
|
||||
local DIR="$1"
|
||||
local DIR_PREFIX="$2"
|
||||
|
||||
if [ ! -d "$DIR" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
install -d -m 755 "$TEMPORARY_PKG_CONFIG_DIR"
|
||||
for pc in "$DIR"/*.pc; do
|
||||
if [ -f $pc ]; then
|
||||
pcname="`basename $pc`"
|
||||
sed -e "s;^prefix=.*;prefix=$DIR_PREFIX;g" < $pc > "$TEMPORARY_PKG_CONFIG_DIR"/$pcname
|
||||
fi;
|
||||
done
|
||||
|
||||
if [ -z "$CROSS_PKG_CONFIG_DIR" ]; then
|
||||
CROSS_PKG_CONFIG_DIR="$TEMPORARY_PKG_CONFIG_DIR"
|
||||
fi
|
||||
}
|
||||
|
||||
function show_build_info ()
|
||||
{
|
||||
cat <<EOF
|
||||
Installation prefix: $MONO_PREFIX
|
||||
CPPFLAGS: ${CPPFLAGS:=not set}
|
||||
LDFLAGS: ${LDFLAGS:=not set}
|
||||
MONO_PATH: ${MONO_PATH:=not set}
|
||||
EOF
|
||||
}
|
||||
|
||||
function setup ()
|
||||
{
|
||||
local pcname
|
||||
|
||||
CROSS_BIN_DIR="$CROSS_DIR/bin"
|
||||
CROSS_DLL_DIR="$CROSS_DIR/bin"
|
||||
PATH=$CROSS_BIN_DIR:$PATH
|
||||
|
||||
MONO_VERSION=`grep AC_INIT configure.ac | cut -d ',' -f 2|tr -d '\[ \]'`
|
||||
|
||||
if [ -d ./.git ]; then
|
||||
MONO_GIT_COMMIT="`git log -1 --format=format:%t`"
|
||||
MONO_GIT_BRANCH="`git branch|grep '\*'|cut -d ' ' -f 2|tr -d '\)'|tr -d '\('`"
|
||||
MONO_RELEASE="$MONO_VERSION-$MONO_GIT_BRANCH-$MONO_GIT_COMMIT"
|
||||
else
|
||||
MONO_RELEASE="$MONO_VERSION"
|
||||
fi
|
||||
|
||||
MONO_PREFIX="$MONO_PREFIX/mono-$MONO_RELEASE"
|
||||
|
||||
NOCONFIGURE=yes
|
||||
export NOCONFIGURE
|
||||
|
||||
check_pkg_config_dir "$CROSS_DIR/lib/pkgconfig" "$CROSS_DIR"
|
||||
|
||||
if [ -n "$EXTRA_CROSS_DIR" -a -d "$EXTRA_CROSS_DIR" ]; then
|
||||
if [ -d "$EXTRA_CROSS_DIR/bin" ]; then
|
||||
PATH="$EXTRA_CROSS_DIR/bin":$PATH
|
||||
fi
|
||||
|
||||
check_pkg_config_dir "$EXTRA_CROSS_DIR/lib/pkgconfig" "$EXTRA_CROSS_DIR"
|
||||
|
||||
if [ -d "$EXTRA_CROSS_DIR/include" ]; then
|
||||
if [ -z "$CPPFLAGS" ]; then
|
||||
CPPFLAGS="-I \"$EXTRA_CROSS_DIR/include\""
|
||||
else
|
||||
CPPFLAGS="-I \"$EXTRA_CROSS_DIR/include\" $CFLAGS"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d "$EXTRA_CROSS_DIR/lib" ]; then
|
||||
if [ -z "$LDFLAGS" ]; then
|
||||
LDFLAGS="-I \"$EXTRA_CROSS_DIR/lib\""
|
||||
else
|
||||
LDFLAGS="-I \"$EXTRA_CROSS_DIR/lib\" $LDFLAGS"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d "$EXTRA_CROSS_DIR/share/aclocal" ]; then
|
||||
if [ -z "$MONO_PATH" ]; then
|
||||
MONO_PATH="\"$EXTRA_CROSS_DIR\""
|
||||
else
|
||||
MONO_PATH="\"$EXTRA_CROSS_DIR\":$MONO_PATH"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
export PATH MONO_PATH CPPFLAGS
|
||||
show_build_info
|
||||
}
|
||||
|
||||
function build ()
|
||||
{
|
||||
if [ -f ./Makefile ]; then
|
||||
make distclean
|
||||
fi
|
||||
|
||||
if [ -d ./autom4te.cache ]; then
|
||||
rm -rf ./autom4te.cache
|
||||
fi
|
||||
|
||||
if [ -f ./config.status ]; then
|
||||
for f in `find -name config.status -type f`; do
|
||||
rm $f
|
||||
done
|
||||
fi
|
||||
|
||||
./autogen.sh
|
||||
|
||||
BUILD="`./config.guess`"
|
||||
|
||||
if [ ! -d "$CURDIR/build-cross-windows" ]; then
|
||||
mkdir "$CURDIR/build-cross-windows"
|
||||
fi
|
||||
|
||||
cd "$CURDIR/build-cross-windows"
|
||||
rm -rf *
|
||||
../configure --prefix=$MONO_PREFIX --with-crosspkgdir=$CROSS_PKG_CONFIG_DIR --build=$BUILD --target=$MINGW --host=$MINGW --enable-parallel-mark --program-transform-name="" --with-tls=none --disable-mcs-build --disable-embed-check --enable-win32-dllmain=yes --with-libgc-threads=win32 --with-profile4=yes
|
||||
make
|
||||
cd "$CURDIR"
|
||||
|
||||
if [ ! -d "$CURDIR/build-cross-windows-mcs" ]; then
|
||||
mkdir "$CURDIR/build-cross-windows-mcs"
|
||||
fi
|
||||
|
||||
rm -rf autom4te.cache
|
||||
unset PATH
|
||||
PATH="$ORIGINAL_PATH"
|
||||
export PATH
|
||||
cd "$CURDIR/build-cross-windows-mcs"
|
||||
rm -rf *
|
||||
../configure --prefix=$MONO_PREFIX --enable-parallel-mark
|
||||
make
|
||||
}
|
||||
|
||||
function doinstall ()
|
||||
{
|
||||
if [ -d "$INSTALL_DIR" ]; then
|
||||
rm -rf "$INSTALL_DIR"
|
||||
fi
|
||||
cd "$CURDIR/build-cross-windows"
|
||||
make DESTDIR="$INSTALL_DESTDIR" USE_BATCH_FILES=yes install
|
||||
|
||||
if test -d $CURDIR/mcs; then
|
||||
mcsdir=$CURDIR/mcs
|
||||
else
|
||||
mcsdir=$CURDIR/../mcs
|
||||
fi
|
||||
|
||||
cd "$mcsdir/mcs"
|
||||
for p in $PROFILES; do
|
||||
make DESTDIR="$INSTALL_DESTDIR" PROFILE=$p install || echo "mcs profile $p installation failed"
|
||||
done
|
||||
|
||||
cd "$mcsdir/class"
|
||||
for p in $PROFILES; do
|
||||
make DESTDIR="$INSTALL_DESTDIR" PROFILE=$p install || echo "class library profile $p installation failed"
|
||||
done
|
||||
|
||||
cd "$mcsdir/tools"
|
||||
for p in $PROFILES; do
|
||||
make DESTDIR="$INSTALL_DESTDIR" PROFILE=$p install || echo "tools profile $p installation failed"
|
||||
done
|
||||
|
||||
cd "$CURDIR/mono-win32"
|
||||
rm -f "$CURDIR/mono-win32-$MONO_RELEASE".zip
|
||||
zip -9r "$CURDIR/mono-win32-$MONO_RELEASE".zip .
|
||||
|
||||
}
|
||||
|
||||
function usage ()
|
||||
{
|
||||
cat <<EOF
|
||||
Usage: build-mingw32.sh [OPTIONS]
|
||||
|
||||
where OPTIONS are:
|
||||
|
||||
-d DIR Sets the location of directory where MINGW is installed [$CROSS_DIR]
|
||||
-e DIR Sets the location of directory where additional cross develoment packages are installed [${EXTRA_CROSS_DIR:=none}]
|
||||
-m MINGW Sets the MINGW target name to be passed to configure [$MINGW]
|
||||
-p PREFIX Prefix at which Mono is to be installed. Build will append the 'mono-X.Y' string to that path
|
||||
EOF
|
||||
|
||||
exit 1
|
||||
}
|
||||
|
||||
trap cleanup 0
|
||||
|
||||
pushd . > /dev/null
|
||||
|
||||
while getopts "d:m:e:p:" opt; do
|
||||
case "$opt" in
|
||||
d) CROSS_DIR="$OPTARG" ;;
|
||||
m) MINGW="$OPTARG" ;;
|
||||
e) EXTRA_CROSS_DIR="$OPTARG" ;;
|
||||
p) MONO_PREFIX="$OPTARG" ;;
|
||||
*) usage ;;
|
||||
esac
|
||||
done
|
||||
|
||||
setup
|
||||
build
|
||||
doinstall
|
||||
show_build_info
|
||||
|
||||
popd > /dev/null
|
||||
@@ -1,50 +0,0 @@
|
||||
# Contributor Code of Conduct
|
||||
|
||||
As contributors and maintainers of this project, and in the interest of
|
||||
fostering an open and welcoming community, we pledge to respect all people who
|
||||
contribute through reporting issues, posting feature requests, updating
|
||||
documentation, submitting pull requests or patches, and other activities.
|
||||
|
||||
We are committed to making participation in this project a harassment-free
|
||||
experience for everyone, regardless of level of experience, gender, gender
|
||||
identity and expression, sexual orientation, disability, personal appearance,
|
||||
body size, race, ethnicity, age, religion, or nationality.
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery
|
||||
* Personal attacks
|
||||
* Trolling or insulting/derogatory comments
|
||||
* Public or private harassment
|
||||
* Publishing other's private information, such as physical or electronic
|
||||
addresses, without explicit permission
|
||||
* Other unethical or unprofessional conduct
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
By adopting this Code of Conduct, project maintainers commit themselves to
|
||||
fairly and consistently applying these principles to every aspect of managing
|
||||
this project. Project maintainers who do not follow or enforce the Code of
|
||||
Conduct may be permanently removed from the project team.
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community.
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting a project maintainer at miguel@xamarin.com. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. Maintainers are
|
||||
obligated to maintain confidentiality with regard to the reporter of an
|
||||
incident.
|
||||
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 1.3.0, available at
|
||||
[http://contributor-covenant.org/version/1/3/0/][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/3/0/
|
||||
+361
-593
File diff suppressed because it is too large.
Load diff
+15
-6
@@ -1,7 +1,10 @@
|
||||
SUBDIRS = net_2_0 net_4_0 net_4_5
|
||||
SUBDIRS = net_2_0
|
||||
|
||||
if INSTALL_4_0
|
||||
SUBDIRS += net_4_0 net_4_5
|
||||
endif
|
||||
|
||||
monodir = $(sysconfdir)/mono
|
||||
monolldbdir = $(libdir)/mono/lldb
|
||||
|
||||
EXTRA_DIST = \
|
||||
config.in \
|
||||
@@ -13,9 +16,7 @@ EXTRA_DIST = \
|
||||
reactive.pc.in xbuild12.pc \
|
||||
net_1_1/machine.config \
|
||||
gdb/mono-gdb.py \
|
||||
gdb/gdb-python.diff \
|
||||
lldb/mono.py \
|
||||
lldb/monobt.py
|
||||
gdb/gdb-python.diff
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
|
||||
@@ -25,8 +26,17 @@ else
|
||||
SGENPCFILE=
|
||||
endif
|
||||
|
||||
if JIT_SUPPORTED
|
||||
if INTERP_SUPPORTED
|
||||
pkgconfig_DATA= mono.pc mono-2.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
|
||||
system.web.extensions.design_1.0.pc system.web.mvc.pc system.web.mvc2.pc system.web.mvc3.pc aspnetwebstack.pc reactive.pc xbuild12.pc $(SGENPCFILE)
|
||||
else
|
||||
pkgconfig_DATA= mono.pc mono-2.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
|
||||
system.web.extensions.design_1.0.pc system.web.mvc.pc system.web.mvc2.pc system.web.mvc3.pc aspnetwebstack.pc reactive.pc xbuild12.pc $(SGENPCFILE)
|
||||
endif
|
||||
else
|
||||
pkgconfig_DATA= mint.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc
|
||||
endif
|
||||
|
||||
DISTCLEANFILES= mono-2.pc mono.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
|
||||
system.web.extensions.design_1.0.pc system.web.mvc.pc system.web.mvc2.pc system.web.mvc3.pc aspnetwebstack.pc reactive.pc $(SGENPCFILE) mono-sgen-gdb.py
|
||||
@@ -34,7 +44,6 @@ DISTCLEANFILES= mono-2.pc mono.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nuni
|
||||
mono_DATA = config \
|
||||
browscap.ini
|
||||
|
||||
monolldb_DATA = lldb/mono.py
|
||||
gdbdir = $(bindir)
|
||||
|
||||
mono-sgen-gdb.py: gdb/mono-gdb.py
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
<dllmap dll="i:odbc32.dll" target="libiodbc.dylib" os="osx"/>
|
||||
<dllmap dll="oci" target="libclntsh@libsuffix@" os="!windows"/>
|
||||
<dllmap dll="db2cli" target="libdb2_36@libsuffix@" os="!windows"/>
|
||||
<dllmap dll="MonoPosixHelper" target="$mono_libdir/libMonoPosixHelper@libsuffix@" os="!windows" />
|
||||
<dllmap dll="MonoPosixHelper" target="@prefix@/lib/libMonoPosixHelper@libsuffix@" os="!windows" />
|
||||
<dllmap dll="i:msvcrt" target="@LIBC@" os="!windows"/>
|
||||
<dllmap dll="i:msvcrt.dll" target="@LIBC@" os="!windows"/>
|
||||
<dllmap dll="sqlite" target="@SQLITE@" os="!windows"/>
|
||||
|
||||
+14
-14
@@ -53,7 +53,7 @@ def stringify_class_name(ns, name):
|
||||
if ns == "":
|
||||
return name
|
||||
else:
|
||||
return "{}.{}".format (ns, name)
|
||||
return "%s.%s".format (ns, name)
|
||||
|
||||
class ArrayPrinter:
|
||||
"Print a C# array"
|
||||
@@ -66,7 +66,7 @@ class ArrayPrinter:
|
||||
def to_string(self):
|
||||
obj = self.val.cast (gdb.lookup_type ("MonoArray").pointer ()).dereference ()
|
||||
length = obj ['max_length']
|
||||
return "{} [{}]".format (stringify_class_name (self.class_ns, self.class_name [0:len (self.class_name) - 2]), int (length))
|
||||
return "%s [%d]".format (stringify_class_name (self.class_ns, self.class_name [0:len (self.class_name) - 2]), int (length))
|
||||
|
||||
class ObjectPrinter:
|
||||
"Print a C# object"
|
||||
@@ -96,7 +96,7 @@ class ObjectPrinter:
|
||||
return (field.name, self.obj [field.name])
|
||||
except:
|
||||
# Superclass
|
||||
return (field.name, self.obj.cast (gdb.lookup_type ("{}".format (field.name))))
|
||||
return (field.name, self.obj.cast (gdb.lookup_type ("%s".format (field.name))))
|
||||
|
||||
def children(self):
|
||||
# FIXME: It would be easier if gdb.Value would support iteration itself
|
||||
@@ -109,7 +109,7 @@ class ObjectPrinter:
|
||||
class_name = obj ['vtable'].dereference ()['klass'].dereference ()['name'].string ()
|
||||
if class_name [-2:len(class_name)] == "[]":
|
||||
return {}.__iter__ ()
|
||||
gdb_type = gdb.lookup_type ("struct {}_{}".format (class_ns.replace (".", "_"), class_name))
|
||||
gdb_type = gdb.lookup_type ("struct %s_%s".format (class_ns.replace (".", "_"), class_name))
|
||||
return self._iterator(obj.cast (gdb_type))
|
||||
except:
|
||||
print (sys.exc_info ()[0])
|
||||
@@ -129,12 +129,12 @@ class ObjectPrinter:
|
||||
return ArrayPrinter (self.val,class_ns,class_name).to_string ()
|
||||
if class_ns != "":
|
||||
try:
|
||||
gdb_type = gdb.lookup_type ("struct {}.{}".format (class_ns, class_name))
|
||||
gdb_type = gdb.lookup_type ("struct %s.%s".format (class_ns, class_name))
|
||||
except:
|
||||
# Maybe there is no debug info for that type
|
||||
return "{}.{}".format (class_ns, class_name)
|
||||
return "%s.%s".format (class_ns, class_name)
|
||||
#return obj.cast (gdb_type)
|
||||
return "{}.{}".format (class_ns, class_name)
|
||||
return "%s.%s".format (class_ns, class_name)
|
||||
return class_name
|
||||
except:
|
||||
print (sys.exc_info ()[0])
|
||||
@@ -154,9 +154,9 @@ class MonoMethodPrinter:
|
||||
val = self.val.dereference ()
|
||||
klass = val ["klass"].dereference ()
|
||||
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
|
||||
return "\"{}:{} ()\"".format (class_name, val ["name"].string ())
|
||||
return "\"%s:%s ()\"".format (class_name, val ["name"].string ())
|
||||
# This returns more info but requires calling into the inferior
|
||||
#return "\"{}\"".format (gdb.parse_and_eval ("mono_method_full_name ({}, 1)".format (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
|
||||
#return "\"%s\"".format (gdb.parse_and_eval ("mono_method_full_name (%s, 1)".format (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
|
||||
|
||||
class MonoClassPrinter:
|
||||
"Print a MonoClass structure"
|
||||
@@ -169,9 +169,9 @@ class MonoClassPrinter:
|
||||
return "0x0"
|
||||
klass = self.val.dereference ()
|
||||
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
|
||||
return "\"{}\"".format (class_name)
|
||||
return "\"%s\"".format (class_name)
|
||||
# This returns more info but requires calling into the inferior
|
||||
#return "\"{}\"".format (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*){})->byval_arg)".format (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
|
||||
#return "\"%s\"".format (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*)%s)->byval_arg)".format (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
|
||||
|
||||
def lookup_pretty_printer(val):
|
||||
t = str (val.type)
|
||||
@@ -217,9 +217,9 @@ class MonoSupport(object):
|
||||
new_size = os.stat ("xdb.s").st_size
|
||||
if new_size > self.s_size:
|
||||
sofile = "xdb.so"
|
||||
gdb.execute ("shell as -o xdb.o xdb.s && ld -shared -o {} xdb.o".format (sofile))
|
||||
gdb.execute ("shell as -o xdb.o xdb.s && ld -shared -o %s xdb.o".format (sofile))
|
||||
# FIXME: This prints messages which couldn't be turned off
|
||||
gdb.execute ("add-symbol-file {} 0".format (sofile))
|
||||
gdb.execute ("add-symbol-file %s 0".format (sofile))
|
||||
self.s_size = new_size
|
||||
|
||||
class RunHook (gdb.Command):
|
||||
@@ -245,4 +245,4 @@ exec_file = gdb.current_objfile ().filename
|
||||
if os.stat (exec_file).st_size != os.lstat (exec_file).st_size:
|
||||
exec_file = os.readlink (exec_file)
|
||||
exec_dir = os.path.dirname (exec_file)
|
||||
gdb.execute ("source {}/{}-gdbinit".format (exec_dir, os.path.basename (exec_file)))
|
||||
gdb.execute ("source %s/%s-gdbinit".format (exec_dir, os.path.basename (exec_file)))
|
||||
+18
-18
@@ -31,7 +31,7 @@ class StringPrinter:
|
||||
while i < len:
|
||||
val = (chars.cast(gdb.lookup_type ("gint64")) + (i * 2)).cast(gdb.lookup_type ("gunichar2").pointer ()).dereference ()
|
||||
if val >= 256:
|
||||
c = unichr (val)
|
||||
c = "\u%X".format (val)
|
||||
else:
|
||||
c = chr (val)
|
||||
res.append (c)
|
||||
@@ -48,7 +48,7 @@ def stringify_class_name(ns, name):
|
||||
if ns == "":
|
||||
return name
|
||||
else:
|
||||
return "{}.{}".format (ns, name)
|
||||
return "%s.%s".format (ns, name)
|
||||
|
||||
class ArrayPrinter:
|
||||
"Print a C# array"
|
||||
@@ -61,7 +61,7 @@ class ArrayPrinter:
|
||||
def to_string(self):
|
||||
obj = self.val.cast (gdb.lookup_type ("MonoArray").pointer ()).dereference ()
|
||||
length = obj ['max_length']
|
||||
return "{} [{}]".format (stringify_class_name (self.class_ns, self.class_name [0:len(self.class_name) - 2]), int(length))
|
||||
return "%s [%d]".format (stringify_class_name (self.class_ns, self.class_name [0:len(self.class_name) - 2]), int(length))
|
||||
|
||||
class ObjectPrinter:
|
||||
"Print a C# object"
|
||||
@@ -91,7 +91,7 @@ class ObjectPrinter:
|
||||
return (field.name, self.obj [field.name])
|
||||
except:
|
||||
# Superclass
|
||||
return (field.name, self.obj.cast (gdb.lookup_type ("{}".format (field.name))))
|
||||
return (field.name, self.obj.cast (gdb.lookup_type ("%s".format (field.name))))
|
||||
|
||||
def children(self):
|
||||
# FIXME: It would be easier if gdb.Value would support iteration itself
|
||||
@@ -105,7 +105,7 @@ class ObjectPrinter:
|
||||
if class_name [-2:len(class_name)] == "[]":
|
||||
return {}.__iter__ ()
|
||||
try:
|
||||
gdb_type = gdb.lookup_type ("struct {}_{}".format (class_ns.replace (".", "_"), class_name))
|
||||
gdb_type = gdb.lookup_type ("struct %s_%s".format (class_ns.replace (".", "_"), class_name))
|
||||
return self._iterator(obj.cast (gdb_type))
|
||||
except:
|
||||
return {}.__iter__ ()
|
||||
@@ -127,12 +127,12 @@ class ObjectPrinter:
|
||||
return ArrayPrinter (self.val,class_ns,class_name).to_string ()
|
||||
if class_ns != "":
|
||||
try:
|
||||
gdb_type = gdb.lookup_type ("struct {}.{}".format (class_ns, class_name))
|
||||
gdb_type = gdb.lookup_type ("struct %s.%s".format (class_ns, class_name))
|
||||
except:
|
||||
# Maybe there is no debug info for that type
|
||||
return "{}.{}".format (class_ns, class_name)
|
||||
return "%s.%s".format (class_ns, class_name)
|
||||
#return obj.cast (gdb_type)
|
||||
return "{}.{}".format (class_ns, class_name)
|
||||
return "%s.%s".format (class_ns, class_name)
|
||||
return class_name
|
||||
except:
|
||||
print (sys.exc_info ()[0])
|
||||
@@ -152,9 +152,9 @@ class MonoMethodPrinter:
|
||||
val = self.val.dereference ()
|
||||
klass = val ["klass"].dereference ()
|
||||
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
|
||||
return "\"{}:{} ()\"".format (class_name, val ["name"].string ())
|
||||
return "\"%s:%s ()\"".format (class_name, val ["name"].string ())
|
||||
# This returns more info but requires calling into the inferior
|
||||
#return "\"{}\"".format (gdb.parse_and_eval ("mono_method_full_name ({}, 1)".format (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
|
||||
#return "\"%s\"".format (gdb.parse_and_eval ("mono_method_full_name (%s, 1)".format (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
|
||||
|
||||
class MonoClassPrinter:
|
||||
"Print a MonoClass structure"
|
||||
@@ -168,13 +168,13 @@ class MonoClassPrinter:
|
||||
klass = self.val.dereference ()
|
||||
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
|
||||
if klass ["generic_class"].cast (gdb.lookup_type ("guint64")) != 0:
|
||||
class_name = "{}<{}>".format (class_name, str (klass ["generic_class"]["context"]["class_inst"]))
|
||||
class_name = "%s<%s>".format (class_name, str (klass ["generic_class"]["context"]["class_inst"]))
|
||||
if add_quotes:
|
||||
return "\"{}\"".format (class_name)
|
||||
return "\"%s\"".format (class_name)
|
||||
else:
|
||||
return class_name
|
||||
# This returns more info but requires calling into the inferior
|
||||
#return "\"{}\"".format (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*){})->byval_arg)".format (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
|
||||
#return "\"%s\"".format (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*)%s)->byval_arg)".format (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
|
||||
|
||||
def to_string(self):
|
||||
try:
|
||||
@@ -222,7 +222,7 @@ class MonoGenericClassPrinter:
|
||||
method_inst_str = ""
|
||||
if int(method_inst.cast (gdb.lookup_type ("guint64"))) != 0:
|
||||
method_inst_str = str(method_inst)
|
||||
return "{}, [{}], [{}]>".format (container_str, class_inst_str, method_inst_str)
|
||||
return "%s, [%s], [%s]>".format (container_str, class_inst_str, method_inst_str)
|
||||
|
||||
def to_string(self):
|
||||
try:
|
||||
@@ -252,9 +252,9 @@ class MonoTypePrinter:
|
||||
info = str(t ["data"]["generic_class"])
|
||||
|
||||
if info != "":
|
||||
return "{{}, {}}".format (kind, info)
|
||||
return "{%s, %s}".format (kind, info)
|
||||
else:
|
||||
return "{{}}".format (kind)
|
||||
return "{%s}".format (kind)
|
||||
except:
|
||||
#print (sys.exc_info ()[0])
|
||||
#print (sys.exc_info ()[1])
|
||||
@@ -283,7 +283,7 @@ class MonoMethodRgctxPrinter:
|
||||
if i > 0:
|
||||
inst_str = inst_str + ", "
|
||||
inst_str = inst_str + type_printer.to_string ()
|
||||
return "MRGCTX[{}, [{}]]".format (klass_printer.to_string(), inst_str)
|
||||
return "MRGCTX[%s, [%s]]".format (klass_printer.to_string(), inst_str)
|
||||
|
||||
class MonoVTablePrinter:
|
||||
"Print a MonoVTable structure"
|
||||
@@ -298,7 +298,7 @@ class MonoVTablePrinter:
|
||||
klass = vtable ["klass"]
|
||||
klass_printer = MonoClassPrinter (klass)
|
||||
|
||||
return "vtable({})".format (klass_printer.to_string ())
|
||||
return "vtable(%s)".format (klass_printer.to_string ())
|
||||
|
||||
def lookup_pretty_printer(val):
|
||||
t = str (val.type)
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
#
|
||||
# Author: Zoltan Varga ([email protected])
|
||||
# License: MIT/X11
|
||||
#
|
||||
|
||||
#
|
||||
# This is a mono support mode for lldb
|
||||
#
|
||||
|
||||
# Comments about the lldb python api:
|
||||
# - there are no accessors, i.e. valobj["name"]
|
||||
# - http://lldb.llvm.org/python_reference/index.html seems to be outdated
|
||||
# - there is no autoload support, i.e. can't load this file automatically
|
||||
# when 'mono' is the debugger target.
|
||||
|
||||
import lldb
|
||||
|
||||
# FIXME: Generate enums from runtime enums
|
||||
MONO_TYPE_END = 0x00
|
||||
MONO_TYPE_VOID = 0x01
|
||||
MONO_TYPE_BOOLEAN = 0x02
|
||||
MONO_TYPE_CHAR = 0x03
|
||||
MONO_TYPE_I1 = 0x04
|
||||
MONO_TYPE_U1 = 0x05
|
||||
MONO_TYPE_I2 = 0x06
|
||||
MONO_TYPE_U2 = 0x07
|
||||
MONO_TYPE_I4 = 0x08
|
||||
MONO_TYPE_U4 = 0x09
|
||||
MONO_TYPE_I8 = 0x0a
|
||||
MONO_TYPE_U8 = 0x0b
|
||||
MONO_TYPE_R4 = 0x0c
|
||||
MONO_TYPE_R8 = 0x0d
|
||||
MONO_TYPE_STRING = 0x0e
|
||||
MONO_TYPE_PTR = 0x0f
|
||||
MONO_TYPE_BYREF = 0x10
|
||||
MONO_TYPE_VALUETYPE = 0x11
|
||||
MONO_TYPE_CLASS = 0x12
|
||||
MONO_TYPE_VAR = 0x13
|
||||
MONO_TYPE_ARRAY = 0x14
|
||||
MONO_TYPE_GENERICINST= 0x15
|
||||
MONO_TYPE_TYPEDBYREF = 0x16
|
||||
MONO_TYPE_I = 0x18
|
||||
MONO_TYPE_U = 0x19
|
||||
MONO_TYPE_FNPTR = 0x1b
|
||||
MONO_TYPE_OBJECT = 0x1c
|
||||
MONO_TYPE_SZARRAY = 0x1d
|
||||
MONO_TYPE_MVAR = 0x1e
|
||||
|
||||
primitive_type_names = {
|
||||
MONO_TYPE_BOOLEAN : "bool",
|
||||
MONO_TYPE_CHAR : "char",
|
||||
MONO_TYPE_I1 : "sbyte",
|
||||
MONO_TYPE_U1 : "byte",
|
||||
MONO_TYPE_I2 : "short",
|
||||
MONO_TYPE_U2 : "ushort",
|
||||
MONO_TYPE_I4 : "int",
|
||||
MONO_TYPE_U4 : "uint",
|
||||
MONO_TYPE_I8 : "long",
|
||||
MONO_TYPE_U8 : "ulong",
|
||||
MONO_TYPE_R4 : "float",
|
||||
MONO_TYPE_R8 : "double",
|
||||
MONO_TYPE_STRING : "string"
|
||||
}
|
||||
|
||||
#
|
||||
# Helper functions for working with the lldb python api
|
||||
#
|
||||
|
||||
def member(val, member_name):
|
||||
return val.GetChildMemberWithName (member_name)
|
||||
|
||||
def string_member(val, member_name):
|
||||
return val.GetChildMemberWithName (member_name).GetSummary ()[1:-1]
|
||||
|
||||
def isnull(val):
|
||||
return val.deref.addr.GetOffset () == 0
|
||||
|
||||
def stringify_class_name(ns, name):
|
||||
if ns == "System":
|
||||
if name == "Byte":
|
||||
return "byte"
|
||||
if name == "String":
|
||||
return "string"
|
||||
if ns == "":
|
||||
return name
|
||||
else:
|
||||
return "{0}.{1}".format (ns, name)
|
||||
|
||||
#
|
||||
# Pretty printers for mono runtime types
|
||||
#
|
||||
|
||||
def stringify_type (type):
|
||||
"Print a MonoType structure"
|
||||
ttype = member(type, "type").GetValueAsUnsigned()
|
||||
if primitive_type_names.has_key (ttype):
|
||||
return primitive_type_names [ttype]
|
||||
else:
|
||||
return "<MonoTypeEnum 0x{0:x}>".format (ttype)
|
||||
|
||||
def stringify_ginst (ginst):
|
||||
"Print a MonoGenericInst structure"
|
||||
len = int(member(ginst, "type_argc").GetValue())
|
||||
argv = member(ginst, "type_argv")
|
||||
res=""
|
||||
for i in range(len):
|
||||
t = argv.GetChildAtIndex(i, False, True)
|
||||
if i > 0:
|
||||
res += ", "
|
||||
res += stringify_type(t)
|
||||
return res
|
||||
|
||||
def print_type(valobj, internal_dict):
|
||||
type = valobj
|
||||
if isnull (type):
|
||||
return ""
|
||||
return stringify_type (type)
|
||||
|
||||
def print_class (valobj, internal_dict):
|
||||
klass = valobj
|
||||
if isnull (klass):
|
||||
return ""
|
||||
aname = member (member (member (klass, "image"), "assembly"), "aname")
|
||||
basename = "[{0}]{1}".format (string_member (aname, "name"), (stringify_class_name (string_member (klass, "name_space"), string_member (klass, "name"))))
|
||||
gclass = member (klass, "generic_class")
|
||||
if not isnull (gclass):
|
||||
ginst = member (member (gclass, "context"), "class_inst")
|
||||
return "{0}<{1}>".format (basename, stringify_ginst (ginst))
|
||||
return basename
|
||||
|
||||
def print_method (valobj, internal_dict):
|
||||
method = valobj
|
||||
if isnull (method):
|
||||
return ""
|
||||
klass = member (method, "klass")
|
||||
return "{0}:{1}()".format (print_class (klass, None), string_member (valobj, "name"))
|
||||
|
||||
def print_domain(valobj, internal_dict):
|
||||
domain = valobj
|
||||
if isnull (domain):
|
||||
return ""
|
||||
target = domain.target
|
||||
root = target.FindFirstGlobalVariable("mono_root_domain")
|
||||
name = string_member (domain, "friendly_name")
|
||||
if root.IsValid () and root.deref.addr.GetOffset () == root.deref.addr.GetOffset ():
|
||||
return "[root]"
|
||||
else:
|
||||
return "[{0}]".format (name)
|
||||
|
||||
def print_object(valobj, internal_dict):
|
||||
obj = valobj
|
||||
if isnull (obj):
|
||||
return ""
|
||||
domain = member (member (obj, "vtable"), "domain")
|
||||
klass = member (member (obj, "vtable"), "klass")
|
||||
return print_domain (domain, None) + print_class (klass, None)
|
||||
|
||||
# Register pretty printers
|
||||
# FIXME: This cannot pick up the methods define in this module, leading to warnings
|
||||
lldb.debugger.HandleCommand ("type summary add -w mono -F mono.print_method MonoMethod")
|
||||
lldb.debugger.HandleCommand ("type summary add -w mono -F mono.print_class MonoClass")
|
||||
lldb.debugger.HandleCommand ("type summary add -w mono -F mono.print_type MonoType")
|
||||
lldb.debugger.HandleCommand ("type summary add -w mono -F mono.print_domain MonoDomain")
|
||||
lldb.debugger.HandleCommand ("type summary add -w mono -F mono.print_object MonoObject")
|
||||
lldb.debugger.HandleCommand ("type category enable mono")
|
||||
|
||||
# Helper commands for runtime debugging
|
||||
# These resume the target
|
||||
# Print the method at the current ip
|
||||
lldb.debugger.HandleCommand ("command alias pip p mono_print_method_from_ip((void*)$pc)")
|
||||
# Print the method at the provided ip
|
||||
lldb.debugger.HandleCommand ("command regex pmip 's/^$/p mono_print_method_from_ip((void*)$pc)/' 's/(.+)/p mono_print_method_from_ip((void*)(%1))/'")
|
||||
|
||||
print "Mono support mode loaded."
|
||||
@@ -1,56 +0,0 @@
|
||||
import lldb
|
||||
|
||||
def print_frames(thread, num_frames, current_thread):
|
||||
# TODO: Make output header similar to bt.
|
||||
print '%c thread #%i' % ('*' if current_thread else ' ', thread.idx)
|
||||
|
||||
if current_thread:
|
||||
selected_frame = thread.GetSelectedFrame()
|
||||
|
||||
for frame in thread.frames[:+num_frames]:
|
||||
pc = str(frame.addr)
|
||||
fmt = ' %c %s'
|
||||
var = frame
|
||||
if pc[0] == '0':
|
||||
try:
|
||||
framestr = frame.EvaluateExpression('(char*)mono_pmip((void*)%s)' % pc).summary[1:-1]
|
||||
var = 'frame #%i: %s%s' % (frame.idx, pc, framestr)
|
||||
except:
|
||||
pass
|
||||
|
||||
print fmt % ('*' if current_thread and frame.idx == selected_frame.idx else ' ', var)
|
||||
|
||||
def monobt(debugger, command, result, dict):
|
||||
opts = {'all_bt': False, 'num_frames': None}
|
||||
|
||||
if command == 'all':
|
||||
opts['all_bt'] = True
|
||||
elif command.isdigit():
|
||||
opts['num_frames'] = int(command)
|
||||
elif command != '':
|
||||
print 'error: monobt [<number>|all]'
|
||||
return
|
||||
|
||||
target = debugger.GetSelectedTarget()
|
||||
process = target.process
|
||||
|
||||
if not process.IsValid():
|
||||
print 'error: invalid process'
|
||||
return
|
||||
|
||||
if opts['all_bt']:
|
||||
for thread in process.threads:
|
||||
print_frames(thread, len(thread), process.selected_thread == thread)
|
||||
print ''
|
||||
else:
|
||||
thread = process.selected_thread
|
||||
num_frames = len(thread) if opts['num_frames'] is None else opts['num_frames']
|
||||
print_frames(thread, num_frames, True)
|
||||
|
||||
return None
|
||||
|
||||
def __lldb_init_module (debugger, dict):
|
||||
# This initializer is being run from LLDB in the embedded command interpreter
|
||||
# Add any commands contained in this module to LLDB
|
||||
debugger.HandleCommand('command script add -f monobt.monobt monobt')
|
||||
print '"monobt" command installed'
|
||||
@@ -143,9 +143,6 @@ public enum Lock {
|
||||
IcallLock,
|
||||
AssemblyBindingLock,
|
||||
MarshalLock,
|
||||
ClassesLock,
|
||||
LoaderGlobalDataLock,
|
||||
ThreadsLock,
|
||||
}
|
||||
|
||||
public class SimLock
|
||||
@@ -243,24 +240,7 @@ public class SimLock
|
||||
}
|
||||
|
||||
public override string ToString () {
|
||||
switch (kind) {
|
||||
case Lock.LoaderLock:
|
||||
case Lock.IcallLock:
|
||||
case Lock.AssemblyBindingLock:
|
||||
case Lock.MarshalLock:
|
||||
case Lock.ClassesLock:
|
||||
case Lock.LoaderGlobalDataLock:
|
||||
case Lock.ThreadsLock:
|
||||
return String.Format ("{0}", kind);
|
||||
|
||||
case Lock.ImageDataLock:
|
||||
case Lock.DomainLock:
|
||||
case Lock.DomainAssembliesLock:
|
||||
case Lock.DomainJitCodeHashLock:
|
||||
return String.Format ("{0}[{1}]", kind, id);
|
||||
default:
|
||||
return String.Format ("Unknown({0})[{1}]", kind, id);
|
||||
}
|
||||
return String.Format ("{0}", kind);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,10 +309,6 @@ public class Trace {
|
||||
"add_record",
|
||||
"mono_locks_lock_acquired",
|
||||
"mono_locks_lock_released",
|
||||
"mono_threads_lock",
|
||||
"mono_threads_unlock",
|
||||
"mono_domain_lock",
|
||||
"mono_domain_unlock",
|
||||
};
|
||||
|
||||
public Trace (string[] fields) {
|
||||
|
||||
@@ -6,4 +6,4 @@ libdir=${exec_prefix}/lib
|
||||
Name: Mono NUnit
|
||||
Description: Mono's version of NUnit
|
||||
Version: @VERSION@
|
||||
Libs: -r:${libdir}/mono/4.5/nunit.core.dll -r:${libdir}/mono/4.5/nunit.core.interfaces.dll -r:${libdir}/mono/4.5/nunit.core.extensions.dll -r:${libdir}/mono/4.5/nunit.framework.dll -r:${libdir}/mono/4.5/nunit.framework.extensions.dll -r:${libdir}/mono/4.5/nunit.mocks.dll -r:${libdir}/mono/4.5/nunit.util.dll -r:${libdir}/mono/4.5/nunit-console-runner.dll
|
||||
Libs: -r:${libdir}/mono/2.0/nunit.core.dll -r:${libdir}/mono/2.0/nunit.core.interfaces.dll -r:${libdir}/mono/2.0/nunit.core.extensions.dll -r:${libdir}/mono/2.0/nunit.framework.dll -r:${libdir}/mono/2.0/nunit.framework.extensions.dll -r:${libdir}/mono/2.0/nunit.mocks.dll -r:${libdir}/mono/2.0/nunit.util.dll -r:${libdir}/mono/2.0/nunit-console-runner.dll
|
||||
+24
-1
@@ -21,8 +21,21 @@ provider mono {
|
||||
|
||||
probe gc__requested (int generation, uintptr_t requested_size, int wait_to_finish);
|
||||
|
||||
probe gc__checkpoint__1 (int generation);
|
||||
probe gc__checkpoint__2 (int generation);
|
||||
probe gc__checkpoint__3 (int generation);
|
||||
probe gc__checkpoint__4 (int generation);
|
||||
probe gc__checkpoint__5 (int generation);
|
||||
probe gc__checkpoint__6 (int generation);
|
||||
probe gc__checkpoint__7 (int generation);
|
||||
probe gc__checkpoint__8 (int generation);
|
||||
probe gc__checkpoint__9 (int generation);
|
||||
|
||||
probe gc__concurrent__start__begin (int generation);
|
||||
probe gc__concurrent__start__end (int generation, long long num_major_objects_marked);
|
||||
probe gc__concurrent__update__finish__begin (int generation, long long num_major_objects_marked);
|
||||
probe gc__concurrent__update__end (int generation, long long num_major_objects_marked);
|
||||
probe gc__concurrent__finish__end (int generation, long long num_major_objects_marked);
|
||||
|
||||
probe gc__sweep__begin (int generation, int full_sweep);
|
||||
probe gc__sweep__end (int generation, int full_sweep);
|
||||
@@ -32,12 +45,19 @@ provider mono {
|
||||
probe gc__world__restart__begin (int generation);
|
||||
probe gc__world__restart__end (int generation);
|
||||
|
||||
probe gc__heap__alloc (uintptr_t addr, uintptr_t len);
|
||||
probe gc__heap__free (uintptr_t addr, uintptr_t len);
|
||||
|
||||
probe gc__locked ();
|
||||
probe gc__unlocked ();
|
||||
|
||||
probe gc__nursery__tlab__alloc (uintptr_t addr, uintptr_t len);
|
||||
probe gc__nursery__obj__alloc (uintptr_t addr, uintptr_t size, char *ns_name, char *class_name);
|
||||
|
||||
probe gc__major__obj__alloc__large (uintptr_t addr, uintptr_t size, char *ns_name, char *class_name);
|
||||
probe gc__major__obj__alloc__pinned (uintptr_t addr, uintptr_t size, char *ns_name, char *class_name);
|
||||
probe gc__major__obj__alloc__degraded (uintptr_t addr, uintptr_t size, char *ns_name, char *class_name);
|
||||
probe gc__major__obj__alloc__mature (uintptr_t addr, uintptr_t size, char *ns_name, char *class_name);
|
||||
|
||||
/* Can be nursery->nursery, nursery->major or major->major */
|
||||
probe gc__obj__moved (uintptr_t dest, uintptr_t src, int dest_gen, int src_gen, uintptr_t size, char *ns_name, char *class_name);
|
||||
@@ -50,10 +70,13 @@ provider mono {
|
||||
probe gc__finalize__enqueue (uintptr_t addr, uintptr_t size, char *ns_name, char *class_name, int generation, int is_critical);
|
||||
probe gc__finalize__invoke (uintptr_t addr, uintptr_t size, char *ns_name, char *class_name);
|
||||
|
||||
probe gc__weak__update (uintptr_t ref_addr, uintptr_t new_addr, uintptr_t size, char *ns_name, char *class_name, int track);
|
||||
probe gc__weak__update (uintptr_t ref_addr, uintptr_t old_addr, uintptr_t new_addr, uintptr_t size, char *ns_name, char *class_name, int track);
|
||||
|
||||
probe gc__global__remset__add (uintptr_t ref_addr, uintptr_t obj_addr, uintptr_t size, char *ns_name, char *class_name);
|
||||
probe gc__obj__cemented (uintptr_t addr, uintptr_t size, char *ns_name, char *class_name);
|
||||
|
||||
probe gc__internal__alloc (uintptr_t addr, uintptr_t size, int type);
|
||||
probe gc__internal__dealloc (uintptr_t add, uintptr_t size, int type);
|
||||
};
|
||||
|
||||
#pragma D attributes Evolving/Evolving/Common provider mono provider
|
||||
|
||||
@@ -13,14 +13,11 @@
|
||||
<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.diagnostics" type="System.Diagnostics.DiagnosticsConfigurationHandler, 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="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">
|
||||
<section name="dataContractSerializer" type="System.Runtime.Serialization.Configuration.DataContractSerializerSection, System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
</sectionGroup>
|
||||
<sectionGroup name="system.web" type="System.Web.Configuration.SystemWebSectionGroup, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<section name="anonymousIdentification" type="System.Web.Configuration.AnonymousIdentificationSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
|
||||
<section name="authentication" type="System.Web.Configuration.AuthenticationSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
|
||||
|
||||
+13
-7
@@ -14,6 +14,7 @@ ASSEMBLED_DOCS = \
|
||||
EXTRA_DIST = \
|
||||
abc-removal.txt \
|
||||
api-style.css \
|
||||
assembly-bundle \
|
||||
check-exports \
|
||||
check-coverage \
|
||||
convert.cs \
|
||||
@@ -22,6 +23,7 @@ EXTRA_DIST = \
|
||||
docs.make \
|
||||
documented \
|
||||
embedded-api \
|
||||
exceptions \
|
||||
exdoc \
|
||||
file-share-modes \
|
||||
gc-issues \
|
||||
@@ -33,31 +35,35 @@ EXTRA_DIST = \
|
||||
jit-imt \
|
||||
jit-thoughts \
|
||||
jit-trampolines \
|
||||
local-regalloc.txt \
|
||||
magic.diff \
|
||||
mini-doc.txt \
|
||||
mono-api-metadata.html \
|
||||
mono-file-formats.config\
|
||||
mono-file-formats.source\
|
||||
mono_handle_d \
|
||||
mono-tools.config \
|
||||
mono-tools.source \
|
||||
monoapi.source \
|
||||
new-regalloc \
|
||||
object-layout \
|
||||
opcode-decomp.txt \
|
||||
precise-gc \
|
||||
produce-lists \
|
||||
public \
|
||||
public-api \
|
||||
README \
|
||||
release-notes-1.0.html \
|
||||
remoting \
|
||||
ssapre.txt \
|
||||
stack-alignment \
|
||||
stack-overflow.txt \
|
||||
threading \
|
||||
toc.xml \
|
||||
TODO \
|
||||
tree-mover.txt \
|
||||
unmanaged-calls
|
||||
|
||||
-include $(mcs_topdir)/build/config.make
|
||||
|
||||
CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE)
|
||||
|
||||
dist-hook:
|
||||
$(mkdir_p) $(distdir)/sources
|
||||
$(mkdir_p) $(distdir)/svgs
|
||||
@@ -93,14 +99,14 @@ mono-file-formats.tree: $(srcdir)/docs.make $(srcdir)/Makefile.am $(srcdir)/depl
|
||||
deploy/.stamp: convert.exe Makefile.am
|
||||
$(mkdir_p) html
|
||||
runtimedir=`cd ../runtime && pwd`; export runtimedir; \
|
||||
MONO_PATH=$(CLASS) perl $(srcdir)/exdoc -h $(srcdir) -t . $(srcdir)/../mono/*/*.c
|
||||
MONO_PATH=../mcs/class/lib/net_2_0 perl $(srcdir)/exdoc -h $(srcdir) -t . $(srcdir)/../mono/*/*.c
|
||||
touch $@
|
||||
|
||||
extract: deploy/.stamp
|
||||
|
||||
convert.exe: convert.cs AgilityPack.dll
|
||||
$(TOOL_MAKE) convert.exe
|
||||
$(TOOL_MAKE) PROFILE=net_2_0 convert.exe
|
||||
|
||||
AgilityPack.dll:
|
||||
$(TOOL_MAKE) AgilityPack.dll
|
||||
$(TOOL_MAKE) PROFILE=net_2_0 AgilityPack.dll
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
|
||||
HOWTO bundle assemblies inside the mono runtime.
|
||||
Paolo Molaro ([email protected])
|
||||
|
||||
* Intent
|
||||
|
||||
Bundling assemblies inside the mono runtime may be useful for a number
|
||||
of reasons:
|
||||
|
||||
* creating a standalone complete runtime that can be more easily
|
||||
distributed
|
||||
|
||||
* having an application run against a known set of assemblies
|
||||
that has been tested
|
||||
|
||||
Of course, there are drawbacks, too: if there has been fixes
|
||||
to the assemblies, replacing them means recompiling the
|
||||
runtime as well and if there are other mono apps, unless they
|
||||
use the same mono binary, there will be less opportunities for
|
||||
the operating system to optimize memory usage. So use this
|
||||
feature only when really needed.
|
||||
|
||||
* Creating the Bundle
|
||||
|
||||
To bundle a set of assemblies, you need to create a file that
|
||||
lists the assembly names and the relative files. Empty lines
|
||||
and lines starting with # are ignored:
|
||||
|
||||
== cut cut ==
|
||||
# Sample bundle template
|
||||
mscorlib: /path/to/mscorlib/assembly.dll
|
||||
myapp: /path/to/myapp.exe
|
||||
== cut cut ==
|
||||
|
||||
Next you need to build the mono runtime using a special configure option:
|
||||
|
||||
./configure --with-bundle=/path/to/bundle/template
|
||||
|
||||
The path to the template should be an absolute path.
|
||||
|
||||
The script metadata/make-bundle.pl will take the specifie
|
||||
assemblies and embed them inside the runtime where the loading
|
||||
routines can find them before searching for them on disk.
|
||||
|
||||
* Open Issues
|
||||
|
||||
There are still two issues to solve:
|
||||
|
||||
* config files: sometimes they are needed but they are
|
||||
not yet bundled inside the library ()
|
||||
|
||||
* building with the included libgc makes it not
|
||||
possible to build a mono binary statically linked to
|
||||
libmono: this needs to be fixed to make bundles
|
||||
really useful.
|
||||
|
||||
|
||||
@@ -292,6 +292,7 @@ mono_free_method
|
||||
mono_free_verify_list
|
||||
mono_gc_collect
|
||||
mono_gc_collection_count
|
||||
mono_gc_enable_events
|
||||
mono_gc_get_generation
|
||||
mono_gc_get_heap_size
|
||||
mono_gc_get_used_size
|
||||
@@ -300,7 +301,9 @@ mono_gchandle_get_target
|
||||
mono_gchandle_new
|
||||
mono_gchandle_new_weakref
|
||||
mono_gc_invoke_finalizers
|
||||
mono_gc_is_finalizer_thread
|
||||
mono_gc_max_generation
|
||||
mono_gc_out_of_memory
|
||||
mono_gc_wbarrier_arrayref_copy
|
||||
mono_gc_wbarrier_generic_nostore
|
||||
mono_gc_wbarrier_generic_store
|
||||
@@ -601,6 +604,7 @@ mono_object_get_class
|
||||
mono_object_get_domain
|
||||
mono_object_get_size
|
||||
mono_object_get_virtual_method
|
||||
mono_object_is_alive
|
||||
mono_object_isinst
|
||||
mono_object_isinst_mbyref
|
||||
mono_object_new
|
||||
|
||||
@@ -269,9 +269,12 @@ mono_gc_weak_link_get
|
||||
mono_gc_weak_link_remove
|
||||
mono_gc_disable
|
||||
mono_gc_enable
|
||||
mono_gc_is_finalizer_thread
|
||||
mono_gc_out_of_memory
|
||||
mono_gc_start_world
|
||||
mono_gc_stop_world
|
||||
mono_gc_alloc_fixed
|
||||
mono_gc_enable_events
|
||||
mono_gc_free_fixed
|
||||
mono_gc_make_descr_from_bitmap
|
||||
mono_gc_base_init
|
||||
@@ -523,6 +526,7 @@ mono_object_isinst
|
||||
mono_object_register_finalizer
|
||||
mono_object_unbox
|
||||
mono_object_castclass_mbyref
|
||||
mono_object_is_alive
|
||||
mono_object_get_size
|
||||
mono_value_box
|
||||
mono_value_copy
|
||||
|
||||
@@ -71,3 +71,40 @@ unwinding code.
|
||||
|
||||
catch handler: catch hanlders are always called from the stack unwinding
|
||||
code. The exception object is passed in a local variable (cfg->exvar).
|
||||
|
||||
gcc support for Exceptions
|
||||
==========================
|
||||
|
||||
gcc supports exceptions in files compiled with the -fexception option. gcc
|
||||
generates DWARF exceptions tables in that case, so it is possible to unwind the
|
||||
stack. The method to read those exception tables is contained in libgcc.a, and
|
||||
in newer versions of glibc (glibc 2.2.5 for example), and it is called
|
||||
__frame_state_for(). Another usable glibc function is backtrace_symbols() which
|
||||
returns the function name corresponding to a code address.
|
||||
|
||||
We dynamically check if those features are available using g_module_symbol(),
|
||||
and we use them only when available. If not available we use the LMF as
|
||||
fallback.
|
||||
|
||||
Using gcc exception information prevents us from saving the LMF at each native
|
||||
call, so this is a way to speed up native calls. This is especially valuable
|
||||
for internal calls, because we can make sure that all internal calls are
|
||||
compiled with -fexceptions (we compile the whole mono runtime with that
|
||||
option).
|
||||
|
||||
All native function are able to call function without exception tables, and so
|
||||
we are unable to restore all caller saved registers if an exception is raised
|
||||
in such function. Well, its possible if the previous function already saves all
|
||||
registers. So we only omit the the LMF if a function has an exception table
|
||||
able to restore all caller saved registers.
|
||||
|
||||
One problem is that gcc almost never saves all caller saved registers, because
|
||||
it is just unnecessary in normal situations. But there is a trick forcing gcc
|
||||
to save all register, we just need to call __builtin_unwind_init() at the
|
||||
beginning of a function. That way gcc generates code to save all caller saved
|
||||
register on the stack.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,208 @@
|
||||
|
||||
* Proposal for the local register allocator
|
||||
|
||||
The local register allocator deals with allocating registers
|
||||
for temporaries inside a single basic block, while the global
|
||||
register allocator is concerned with method-wide allocation of
|
||||
variables.
|
||||
The global register allocator uses callee-saved register for it's
|
||||
purpouse so that there is no need to save and restore these registers
|
||||
at call sites.
|
||||
|
||||
There are a number of issues the local allocator needs to deal with:
|
||||
*) some instructions expect operands in specific registers (for example
|
||||
the shl instruction on x86, or the call instruction with thiscall
|
||||
convention, or the equivalent call instructions on other architectures,
|
||||
such as the need to put output registers in %oX on sparc)
|
||||
*) some instructions deliver results only in specific registers (for example
|
||||
the div instruction on x86, or the call instructionson on almost all
|
||||
the architectures).
|
||||
*) it needs to know what registers may be clobbered by an instruction
|
||||
(such as in a method call)
|
||||
*) it should avoid excessive reloads or stores to improve performance
|
||||
|
||||
While which specific instructions have limitations is architecture-dependent,
|
||||
the problem shold be solved in an arch-independent way to reduce code duplication.
|
||||
The register allocator will be 'driven' by the arch-dependent code, but it's
|
||||
implementation should be arch-independent.
|
||||
|
||||
To improve the current local register allocator, we need to
|
||||
keep more state in it than the current setup that only keeps busy/free info.
|
||||
|
||||
Possible state information is:
|
||||
|
||||
free: the resgister is free to use and it doesn't contain useful info
|
||||
freeable: the register contains data loaded from a local (there is
|
||||
also info about _which_ local it contains) as a result from previous
|
||||
instructions (like, there was a store from the register to the local)
|
||||
moveable: it contains live data that is needed in a following instruction, but
|
||||
the contents may be moved to a different register
|
||||
busy: the register contains live data and it is placed there because
|
||||
the following instructions need it exactly in that register
|
||||
allocated: the register is used by the global allocator
|
||||
|
||||
The local register allocator will have the following interfaces:
|
||||
|
||||
int get_register ();
|
||||
Searches for a register in the free state. If it doesn't find it,
|
||||
searches for a freeable register. Sets the status to moveable.
|
||||
Looking for a 'free' register before a freeable one should allow for
|
||||
removing a few redundant loads (though I'm still unsure if such
|
||||
things should be delegated entirely to the peephole pass).
|
||||
|
||||
int get_register_force (int reg);
|
||||
Returns 'reg' if it is free or freeable. If it is moveable, it moves it
|
||||
to another free or freeable register.
|
||||
Sets the status of 'reg' to busy.
|
||||
|
||||
void set_register_freeable (int reg);
|
||||
Sets the status of 'reg' to freeable.
|
||||
|
||||
void set_register_free (int reg);
|
||||
Sets the status of 'reg' to free.
|
||||
|
||||
void will_clobber (int reg);
|
||||
Spills the register to the stack. Sets the status to freeable.
|
||||
After the clobbering has occurred, set the status to free.
|
||||
|
||||
void register_unspill (int reg);
|
||||
Un-spills register reg and sets the status to moveable.
|
||||
|
||||
FIXME: how is the 'local' information represented? Maybe a MonoInst* pointer.
|
||||
|
||||
Note: the register allocator will insert instructions in the basic block
|
||||
during it's operation.
|
||||
|
||||
* Examples
|
||||
|
||||
Given the tree (on x86 the right argument to shl needs to be in ecx):
|
||||
|
||||
store (local1, shl (local1, call (some_arg)))
|
||||
|
||||
At the start of the basic block, the registers are set to the free state.
|
||||
The sequence of instructions may be:
|
||||
instruction register status -> [%eax %ecx %edx]
|
||||
start free free free
|
||||
eax = load local1 mov free free
|
||||
/* call clobbers eax, ecx, edx */
|
||||
spill eax free free free
|
||||
call mov free free
|
||||
/* now eax contains the right operand of the shl */
|
||||
mov %eax -> %ecx free busy free
|
||||
un-spill mov busy free
|
||||
shl %cl, %eax mov free free
|
||||
|
||||
The resulting x86 code is:
|
||||
mov $fffc(%ebp), %eax
|
||||
mov %eax, $fff0(%ebp)
|
||||
push some_arg
|
||||
call func
|
||||
mov %eax, %ecx
|
||||
mov $fff0(%ebp), %eax
|
||||
shl %cl, %eax
|
||||
|
||||
Note that since shl could operate directly on memory, we could have:
|
||||
|
||||
push some_arg
|
||||
call func
|
||||
mov %eax, %ecx
|
||||
shl %cl, $fffc(%ebp)
|
||||
|
||||
The above example with loading the operand in a register is just to complicate
|
||||
the example and show that the algorithm should be able to handle it.
|
||||
|
||||
Let's take another example with the this-call call convention (the first argument
|
||||
is passed in %ecx).
|
||||
In this case, will_clobber() will be called only on %eax and %edx, while %ecx
|
||||
will be allocated with get_register_force ().
|
||||
Note: when a register is allocated with get_register_force(), it should be set
|
||||
to a different state as soon as possible.
|
||||
|
||||
store (local1, shl (local1, this-call (local1)))
|
||||
|
||||
instruction register status -> [%eax %ecx %edx]
|
||||
start free free free
|
||||
eax = load local1 mov free free
|
||||
/* force load in %ecx */
|
||||
ecx = load local1 mov busy free
|
||||
spill eax free busy free
|
||||
call mov free free
|
||||
/* now eax contains the right operand of the shl */
|
||||
mov %eax -> %ecx free busy free
|
||||
un-spill mov busy free
|
||||
shl %cl, %eax mov free free
|
||||
|
||||
What happens when a register that we need to allocate with get_register_force ()
|
||||
contains an operand for the next instruction?
|
||||
|
||||
instruction register status -> [%eax %ecx %edx]
|
||||
eax = load local0 mov free free
|
||||
ecx = load local1 mov mov free
|
||||
get_register_force (ecx) here.
|
||||
We have two options:
|
||||
mov %ecx, %edx
|
||||
or:
|
||||
spill %ecx
|
||||
The first option is way better (and allows the peephole pass to
|
||||
just load the value in %edx directly, instead of loading first to %ecx).
|
||||
This doesn't work, though, if the instruction clobbers the %edx register
|
||||
(like in a this-call). So, we first need to clobber the registers
|
||||
(so the state of %ecx changes to freebale and there is no issue
|
||||
with get_register_force ()).
|
||||
What if an instruction both clobbers a register and requires it as
|
||||
an operand? Lets' take the x86 idiv instruction as an example: it
|
||||
requires the dividend in edx:eax and returns the result in eax,
|
||||
with the modulus in edx.
|
||||
|
||||
store (local1, div (local1, local2))
|
||||
|
||||
instruction register status -> [%eax %ecx %edx]
|
||||
eax = load local0 mov free free
|
||||
will_clobber eax, edx free mov free
|
||||
force mov %ecx, %eax busy free free
|
||||
set %edx busy free busy
|
||||
idiv mov free free
|
||||
|
||||
Note: edx is set to free after idiv, because the modulus is not needed
|
||||
(if it was a rem, eax would have been freed).
|
||||
If we load the divisor before will_clobber(), we'll have to spill
|
||||
eax and reload it later. If we load it just after the idiv, there is no issue.
|
||||
In any case, the algorithm should give the correct results and allow the operation.
|
||||
|
||||
Working recursively on the isntructions there shouldn't be huge issues
|
||||
with this algorithm (though, of course, it's not optimal and it may
|
||||
introduce excessive spills or register moves). The advantage over the current
|
||||
local reg allocator is that:
|
||||
1) the number of spills/moves would be smaller anyway
|
||||
2) a separate peephole pass could be able to eliminate reg moves
|
||||
3) we'll be able to remove the 'forced' spills we currently do with
|
||||
the return value of method calls
|
||||
|
||||
* Issues
|
||||
|
||||
How to best integrate such a reg allocator with the burg stuff.
|
||||
|
||||
Think about a call os sparc with two arguments: they got into %o0 and %o1
|
||||
and each of them sets the register as busy. But what if the values to put there
|
||||
are themselves the result of a call? %o0 is no problem, but for all the
|
||||
next argument n the above algorithm would spill all the 0...n-1 registers...
|
||||
|
||||
* Papers
|
||||
|
||||
More complex solutions to the local register allocator problem:
|
||||
http://dimacs.rutgers.edu/TechnicalReports/abstracts/1997/97-33.html
|
||||
|
||||
Combining register allocation and instruction scheduling:
|
||||
http://citeseer.nj.nec.com/motwani95combining.html
|
||||
|
||||
More on LRA euristics:
|
||||
http://citeseer.nj.nec.com/liberatore97hardness.html
|
||||
|
||||
Linear-time optimal code scheduling for delayedload architectures
|
||||
http://www.cs.wisc.edu/~fischer/cs701.f01/inst.sched.ps.gz
|
||||
|
||||
Precise Register Allocation for Irregular Architectures
|
||||
http://citeseer.nj.nec.com/kong98precise.html
|
||||
|
||||
Allocate registers first to subtrees that need more of them.
|
||||
http://www.upb.de/cs/ag-kastens/compii/folien/comment401-409.2.pdf
|
||||
@@ -0,0 +1,98 @@
|
||||
=pod
|
||||
|
||||
=head1 Internal design document for the mono_handle_d
|
||||
|
||||
This document is designed to hold the design of the mono_handle_d and
|
||||
not as an api reference.
|
||||
|
||||
=head2 Primary goal and purpose
|
||||
|
||||
The mono_handle_d is a process which takes care of the (de)allocation
|
||||
of scratch shared memory and handles (of files, threads, mutexes,
|
||||
sockets etc. see L<WapiHandleType>) and refcounts of the
|
||||
filehandles. It is designed to be run by a user and to be fast, thus
|
||||
minimal error checking on input is done and will most likely crash if
|
||||
given a faulty package. No effort has been, or should be, made to have
|
||||
the daemon talking to machine of different endianness/size of int.
|
||||
|
||||
=head2 How to start the daemon
|
||||
|
||||
To start the daemon you either run the mono_handle_d executable or try
|
||||
to attach to the shared memory segment via L<_wapi_shm_attach> which
|
||||
will start a daemon if one does not exist.
|
||||
|
||||
=head1 Internal details
|
||||
|
||||
The daemon works by opening a socket and listening to clients. These
|
||||
clients send packages over the socket complying to L<struct
|
||||
WapiHandleRequest>.
|
||||
|
||||
=head2 Possible requests
|
||||
|
||||
=over
|
||||
|
||||
=item WapiHandleRequest_New
|
||||
|
||||
Find a handle in the shared memory segment that is free and allocate
|
||||
it to the specified type. To destroy use
|
||||
L</WapiHandleRequest_Close>. A L<WapiHandleResponse> with
|
||||
.type=WapiHandleResponseType_New will be sent back with .u.new.handle
|
||||
set to the handle that was allocated. .u.new.type is the type that was
|
||||
requested.
|
||||
|
||||
=item WapiHandleRequestType_Open
|
||||
|
||||
Increase the ref count of an already created handle. A
|
||||
L<WapiHandleResponse> with .type=WapiHandleResponseType_Open will be sent
|
||||
back with .u.new.handle set to the handle, .u.new.type is set to the
|
||||
type of handle this is.
|
||||
|
||||
=item WapiHandleRequestType_Close
|
||||
|
||||
Decrease the ref count of an already created handle. A
|
||||
L<WapiHandleResponse> with .type=WapiHandleResponseType_Close will be
|
||||
sent back with .u.close.destroy set to TRUE if ref count for this
|
||||
client reached 0.
|
||||
|
||||
=item WapiHandleRequestType_Scratch
|
||||
|
||||
Allocate a shared memory area of size .u.scratch.length in bytes. A
|
||||
L<WapiHandleResponse> with .type=WapiHandleResponseType_Scratch will be
|
||||
sent back with .u.scratch.idx set to the index into the shared
|
||||
memory's scratch area where to memory begins. (works just like
|
||||
malloc(3))
|
||||
|
||||
=item WapiHandleRequestType_Scratch
|
||||
|
||||
Deallocate a shared memory area, this must have been allocated before
|
||||
deallocating. A L<WapiHandleResponse> with
|
||||
.type=WapiHandleResponseType_ScratchFree will be sent back (works just
|
||||
like free(3))
|
||||
|
||||
=back
|
||||
|
||||
=head1 Why a daemon
|
||||
|
||||
From an email:
|
||||
|
||||
Dennis: I just have one question about the daemon... Why does it
|
||||
exist? Isn't it better performancewise to just protect the shared area
|
||||
with a mutex when allocation a new handle/shared mem segment or
|
||||
changing refcnt? It will however be a less resilient to clients that
|
||||
crash (the deamon cleans up ref'd handles if socket closes)
|
||||
|
||||
Dick: It's precisely because with a mutex the shared memory segment
|
||||
can be left in a locked state. Also, it's not so easy to clean up
|
||||
shared memory without it (you can't just mark it deleted when creating
|
||||
it, because you can't attach any more readers to the same segment
|
||||
after that). I did some minimal performance testing, and I don't
|
||||
think the daemon is particularly slow.
|
||||
|
||||
|
||||
=head1 Authors
|
||||
|
||||
Documentaion: Dennis Haney
|
||||
|
||||
Implementation: Dick Porter
|
||||
|
||||
=cut
|
||||
@@ -0,0 +1,68 @@
|
||||
We need to switch to a new register allocator.
|
||||
The current one is split in a global and a local register allocator.
|
||||
The global one can assign only callee-saves registers and happens
|
||||
on the tree-based internal representation: it assigns local variables
|
||||
to hardware registers.
|
||||
The local one happens on the linear representation on a per basic
|
||||
block basis and assigns hard registers to virtual registers (which
|
||||
hold temporary values during expression executions) and it deals also
|
||||
with the platform-specific issues (fixed registers, call conventions).
|
||||
|
||||
Moving to a different register will help solve some of the performance
|
||||
issues introduced by the above split, make the register more easily
|
||||
portable and solve some of the issues generated by dealing with trees.
|
||||
|
||||
The general design ideas are below.
|
||||
|
||||
The new allocator should have a global view of all the method, so it can be
|
||||
able to assign variables also to some of the volatile registers if possible,
|
||||
even across basic blocks (this would improve performance).
|
||||
|
||||
The allocator would be driven by per-arch declarative data, so porting
|
||||
should be easier: an architecture needs to specify register classes,
|
||||
call convention and instructions requirements (similar to the gcc code).
|
||||
|
||||
The allocator should operate on the linear representation, this way it's
|
||||
easier and faster to track usages more correctly. We need to assign virtual
|
||||
registers on a per-method basis instead of per basic block. We can assign
|
||||
virtual registers to variables, too. Note that since we fix the stack offset
|
||||
of local vars only after this step (which happens after the burg rules are run),
|
||||
some of the burg rules that try to optimize the code won't apply anymore:
|
||||
the peephole code may need to be enhanced to do the optimizations instead.
|
||||
|
||||
We need to handle floating point registers in the global allocator, too.
|
||||
|
||||
The new allocator also needs to keep track precisely of which registers
|
||||
contain references or managed pointers to allow us to move to a precise GC.
|
||||
|
||||
It may be worth to use a single increasing set of integers for the virtual
|
||||
registers, with the class of the register stored separately (unless the
|
||||
current local allocator which keeps interger and fp registers separate).
|
||||
|
||||
Since this is a large task, we need to do it in steps as much as possible.
|
||||
The first is to run the register allocator _after_ the burg rules: this
|
||||
requires a rewrite of the liveness code, too, to use linear indexes instead
|
||||
of basic-block/tree number combinations. This can be done by:
|
||||
*) allocating virtual regs to all the locals that can be register allocated
|
||||
*) running the burg rules (some may require adjustments): the local virtual
|
||||
registers are assigned starting from global-virt-regs+1, instead of the current
|
||||
hardware-regs+1, so we can tell apart global and local virt regs.
|
||||
*) running the liveness/whatever code is needed to allocate the global registers
|
||||
*) allocate the rest of the local variables to stack slots
|
||||
*) continue with the current local allocator
|
||||
|
||||
This work could take 2-3 weeks.
|
||||
|
||||
The next step is to define the kind of declarative data an architecture needs
|
||||
and assigning virtual regs to all the registers and making the allocator
|
||||
assign from the volatile registers, too.
|
||||
Note that some of the code that is currently emitted in the arch-specific
|
||||
code, will need to be emitted as instructions that the reg allocator
|
||||
can inspect: think of a method that returns the first argument which is
|
||||
received in a register: the current code copies it to either a local slot or
|
||||
to a global reg in the prolog an copies it back to the return register
|
||||
int he basic block, but since neither the regallocator nor the peephole code
|
||||
knows about the prolog code, the first store cannot be optimized away.
|
||||
The gcc code has some example of how to specify register classes in a
|
||||
declarative way.
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
|
||||
* How to handle complex IL opcodes in an arch-independent way
|
||||
|
||||
Many IL opcodes are very simple: add, ldind etc.
|
||||
Such opcodes can be implemented with a single cpu instruction
|
||||
in most architectures (on some, a group of IL instructions
|
||||
can be converted to a single cpu op).
|
||||
There are many IL opcodes, though, that are more complex, but
|
||||
can be expressed as a series of trees or a single tree of
|
||||
simple operations. Such simple operations are architecture-independent.
|
||||
It makes sense to decompose such complex IL instructions in their
|
||||
simpler equivalent so that we gain in several ways:
|
||||
*) porting effort is easier, because only the simple instructions
|
||||
need to be implemented in arch-specific code
|
||||
*) we could apply BURG rules to the trees and do pattern matching
|
||||
on them to optimize the expressions according to the host cpu
|
||||
|
||||
The issue is: where do we do such conversion from coarse opcodes to
|
||||
simple expressions?
|
||||
|
||||
* Doing the conversion in method_to_ir ()
|
||||
|
||||
Some of these conversions can certainly be done in method_to_ir (),
|
||||
but it's not always easy to decide which are better done there and
|
||||
which in a different pass.
|
||||
For example, let's take ldlen: in the mono implementation, ldlen
|
||||
can be simply implemented with a load from a fixed position in the
|
||||
array object:
|
||||
|
||||
len = [reg + maxlen_offset]
|
||||
|
||||
However, ldlen carries also semantics information: the result is the
|
||||
length of the array, and since in the CLR arrays are of fixed size,
|
||||
this information can be useful to later do bounds check removal.
|
||||
If we convert this opcode in method_to_ir () we lost some useful
|
||||
information for further optimizations.
|
||||
|
||||
In some other ways, decomposing an opcode in method_to_ir() may
|
||||
allow for better optimizations later on (need to come up with an
|
||||
example here ...).
|
||||
|
||||
* Doing the conversion in inssel.brg
|
||||
|
||||
Some conversion may be done inside the burg rules: this has the
|
||||
disadvantage that the instruction selector is not run again on
|
||||
the resulting expression tree and we could miss some optimization
|
||||
(this is what effectively happens with the coarse opcodes in the old
|
||||
jit). This may also interfere with an efficient local register allocator.
|
||||
It may be possible to add an extension in monoburg that allows a rule
|
||||
such as:
|
||||
|
||||
recheck: LDLEN (reg) {
|
||||
create an expression tree representing LDLEN
|
||||
and return it
|
||||
}
|
||||
|
||||
When the monoburg label process gets back a recheck, it will run
|
||||
the labeling again on the resulting expression tree.
|
||||
If this is possible at all (and in an efficient way) is a
|
||||
question for dietmar:-)
|
||||
It should be noted, though, that this may not always work, since
|
||||
some complex IL opcodes may require a series of expression trees
|
||||
and handling such cases in monoburg could become quite hairy.
|
||||
For example, think of opcode that need to do multiple actions on the
|
||||
same object: this basically means a DUP...
|
||||
On the other end, if a complex opcode needs a DUP, monoburg doesn't
|
||||
actually need to create trees if it emits the instructions in
|
||||
the correct sequence and maintains the right values in the registers
|
||||
(usually the values that need a DUP are not changed...). How
|
||||
this integrates with the current register allocator is not clear, since
|
||||
that assigns registers based on the rule, but the instructions emitted
|
||||
by the rules may be different (this already happens with the current JIT
|
||||
where a MULT is replaced with lea etc...).
|
||||
|
||||
* Doing it in a separate pass.
|
||||
|
||||
Doing the conversion in a separate pass over the instructions
|
||||
is another alternative. This can be done right after method_to_ir ()
|
||||
or after the SSA pass (since the IR after the SSA pass should look
|
||||
almost like the IR we get back from method_to_ir ()).
|
||||
|
||||
This has the following advantages:
|
||||
*) monoburg will handle only the simple opcodes (makes porting easier)
|
||||
*) the instruction selection will be run on all the additional trees
|
||||
*) it's easier to support coarse opcodes that produce multiple expression
|
||||
trees (and apply the monoburg selector on all of them)
|
||||
*) the SSA optimizer will see the original opcodes and will be able to use
|
||||
the semantic info associated with them
|
||||
|
||||
The disadvantage is that this is a separate pass on the code and
|
||||
it takes time (how much has not been measured yet, though).
|
||||
|
||||
With this approach, we may also be able to have C implementations
|
||||
of some of the opcodes: this pass would insert a function call to
|
||||
the C implementation (for example in the cases when first porting
|
||||
to a new arch and implemenating some stuff may be too hard in asm).
|
||||
|
||||
* Extended basic blocks
|
||||
|
||||
IL code needs a lot of checks, bounds checks, overflow checks,
|
||||
type checks and so on. This potentially increases by a lot
|
||||
the number of basic blocks in a control flow graph. However,
|
||||
all such blocks end up with a throw opcode that gives control to the
|
||||
exception handling mechanism.
|
||||
After method_to_ir () a MonoBasicBlock can be considered a sort
|
||||
of extended basic block where the additional exits don't point
|
||||
to basic blocks in the same procedure (at least when the method
|
||||
doesn't have exception tables).
|
||||
We need to make sure the passes following method_to_ir () can cope
|
||||
with such kinds of extended basic blocks (especially the passes
|
||||
that we need to apply to all the methods: as a start, we could
|
||||
skip SSA optimizations for methods with exception clauses...)
|
||||
|
||||
+4
-2
@@ -292,6 +292,7 @@ mono_free_method
|
||||
mono_free_verify_list
|
||||
mono_gc_collect
|
||||
mono_gc_collection_count
|
||||
mono_gc_enable_events
|
||||
mono_gc_get_generation
|
||||
mono_gc_get_heap_size
|
||||
mono_gc_get_used_size
|
||||
@@ -300,7 +301,9 @@ mono_gchandle_get_target
|
||||
mono_gchandle_new
|
||||
mono_gchandle_new_weakref
|
||||
mono_gc_invoke_finalizers
|
||||
mono_gc_is_finalizer_thread
|
||||
mono_gc_max_generation
|
||||
mono_gc_out_of_memory
|
||||
mono_gc_wbarrier_arrayref_copy
|
||||
mono_gc_wbarrier_generic_nostore
|
||||
mono_gc_wbarrier_generic_store
|
||||
@@ -601,6 +604,7 @@ mono_object_get_class
|
||||
mono_object_get_domain
|
||||
mono_object_get_size
|
||||
mono_object_get_virtual_method
|
||||
mono_object_is_alive
|
||||
mono_object_isinst
|
||||
mono_object_isinst_mbyref
|
||||
mono_object_new
|
||||
@@ -750,8 +754,6 @@ mono_thread_current
|
||||
mono_thread_detach
|
||||
mono_thread_exit
|
||||
mono_thread_get_main
|
||||
mono_thread_get_managed_id
|
||||
mono_thread_get_name_utf8
|
||||
mono_thread_get_undeniable_exception
|
||||
mono_thread_hazardous_free_or_queue
|
||||
mono_thread_hazardous_try_free_all
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
With this change, we bundle Reactive Extensions from Microsoft.
|
||||
|
||||
Steps to do:
|
||||
|
||||
- Until we add submodule, check out Rx sources from http://rx.codeplex.com:
|
||||
|
||||
$ cd external
|
||||
$ git clone git://github.com/atsushieno/rx.git
|
||||
$ cd rx
|
||||
$ git checkout rx-oss-v1.0
|
||||
$ cd ../..
|
||||
|
||||
Note that the original repo at rx.codeplex.com will *fail* on Linux!
|
||||
codeplex.codeplex.com/workitem/26133
|
||||
Also note that rx.codeplex.com is huge and takes very long time to checkout.
|
||||
|
||||
- expand rx-mono-changes-3.tar.bz2
|
||||
|
||||
$ tar jxvf rx-mono-changes-3.tar.bz2
|
||||
|
||||
- Apply changes to mcs/class/Makefile:
|
||||
|
||||
$ cd mcs/class
|
||||
$ patch -i add-rx-libs.patch -p3
|
||||
$ cd ../..
|
||||
|
||||
Then it should be done.
|
||||
|
||||
Note that this does not include Mono.Reactive.Testing into the build yet -
|
||||
this library depends on nunit.framework.dll but it wouldn't be built before
|
||||
this assembly is built. This needs to be resolved.
|
||||
|
||||
** Current Status
|
||||
|
||||
- We don't have Microsoft.Reactive.Testing.dll. Instead, I created an
|
||||
alternative Mono.Reactive.Testing.dll which *mostly* uses MS sources for
|
||||
that assembly but uses NUnit.Framework instead.
|
||||
|
||||
To make it happen, I added a small script that automatically replaces
|
||||
MSTest dependency parts with that for NUnit (replacer.sh under rx tree).
|
||||
|
||||
(We'll also have to rename namespaces and have more source changes, but
|
||||
so far it is to get things runnable.)
|
||||
|
||||
- To check the build sanity, I imported unit tests (as explained above)
|
||||
and it is supposed to run by "make run-test" in Mono.Reactive.Testing
|
||||
directory (the tests were all in one place in MS tests, so I made it
|
||||
in Mono.Reactive.Testing directory instead).
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<h1>Mono 1.0 Release Notes</h1>
|
||||
|
||||
<h2>What does Mono Include</h2>
|
||||
|
||||
<h2>Missing functionality</h2>
|
||||
|
||||
<p>COM support.
|
||||
|
||||
<p>EnterpriseServices are non-existant.
|
||||
|
||||
<p>Windows.Forms is only available as a preview, it is not
|
||||
completed nor stable.
|
||||
|
||||
<h3>Assembly: System.Drawing</h3>
|
||||
|
||||
<p>System.Drawing.Printing is not supported.
|
||||
@@ -93,9 +93,12 @@
|
||||
|
||||
<h4><a name="api:mono_gc_disable">mono_gc_disable</a></h4>
|
||||
<h4><a name="api:mono_gc_enable">mono_gc_enable</a></h4>
|
||||
<h4><a name="api:mono_gc_is_finalizer_thread">mono_gc_is_finalizer_thread</a></h4>
|
||||
<h4><a name="api:mono_gc_out_of_memory">mono_gc_out_of_memory</a></h4>
|
||||
<h4><a name="api:mono_gc_start_world">mono_gc_start_world</a></h4>
|
||||
<h4><a name="api:mono_gc_stop_world">mono_gc_stop_world</a></h4>
|
||||
<h4><a name="api:mono_gc_alloc_fixed">mono_gc_alloc_fixed</a></h4>
|
||||
<h4><a name="api:mono_gc_enable_events">mono_gc_enable_events</a></h4>
|
||||
<h4><a name="api:mono_gc_free_fixed">mono_gc_free_fixed</a></h4>
|
||||
<h4><a name="api:mono_gc_make_descr_from_bitmap">mono_gc_make_descr_from_bitmap</a></h4>
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@ result = mono_object_new (mono_domain_get (), version_class);
|
||||
<h4><a name="api:mono_object_isinst">mono_object_isinst</a></h4>
|
||||
<h4><a name="api:mono_object_unbox">mono_object_unbox</a></h4>
|
||||
<h4><a name="api:mono_object_castclass_mbyref">mono_object_castclass_mbyref</a></h4>
|
||||
<h4><a name="api:mono_object_is_alive">mono_object_is_alive</a></h4>
|
||||
<h4><a name="api:mono_object_get_size">mono_object_get_size</a></h4>
|
||||
|
||||
<a name="valuetypes"></a>
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
Size and alignment requirements of stack values
|
||||
===============================================
|
||||
|
||||
P ... System.IntPtr
|
||||
I1 ... System.Int8
|
||||
I2 ... System.Int16
|
||||
I4 ... System.Int32
|
||||
I8 ... System.Int64
|
||||
F ... System.Single
|
||||
D ... System.Double
|
||||
LD ... native long double
|
||||
|
||||
-----------------------------------------------------------
|
||||
ARCH | P | I1 | I2 | I4 | I8 | F | D | LD |
|
||||
-----------------------------------------------------------
|
||||
X86 | 4/4 | 4/4 | 4/4 | 4/4 | 8/4 | 4/4 | 8/4 |12/4 |
|
||||
-----------------------------------------------------------
|
||||
X86/W32 | 4/4 | 4/4 | 4/4 | 4/4 | 8/4 | 4/4 | 8/4 |12/4 |
|
||||
-----------------------------------------------------------
|
||||
ARM | 4/4 | 4/4 | 4/4 | 4/4 | 8/4 | 4/4 | 8/4 | 8/4 |
|
||||
-----------------------------------------------------------
|
||||
M68K | 4/4 | 4/4 | 4/4 | 4/4 | 8/4 | 4/4 | 8/4 |12/4 |
|
||||
-----------------------------------------------------------
|
||||
ALPHA | 8/8 | 8/8 | 8/8 | 8/8 | 8/8 | 8/8 | 8/8 | 8/8 |
|
||||
-----------------------------------------------------------
|
||||
SPARC | 4/4 | 4/4 | 4/4 | 4/4 | 8/8 | 4/4 | 8/8 |16/8 |
|
||||
-----------------------------------------------------------
|
||||
SPARC64 | 8/8 | 8/8 | 8/8 | 8/8 | 8/8 | 8/8 | 8/8 |16/16|
|
||||
-----------------------------------------------------------
|
||||
MIPS | 4/4 | 4/4 | 4/4 | 4/4 | ?/? | 4/4 | 8/8 | 8/8 |
|
||||
-----------------------------------------------------------
|
||||
| | | | | | | | |
|
||||
-----------------------------------------------------------
|
||||
@@ -0,0 +1,261 @@
|
||||
|
||||
Purpose
|
||||
|
||||
Especially when inlining is active, it can happen that temporary
|
||||
variables add pressure to the register allocator, producing bad
|
||||
code.
|
||||
|
||||
The idea is that some of these temporaries can be totally eliminated
|
||||
my moving the MonoInst tree that defines them directly to the use
|
||||
point in the code (so the name "tree mover").
|
||||
|
||||
Please note that this is *not* an optimization: it is mostly a
|
||||
workaround to issues we have in the regalloc.
|
||||
Actually, with the new linear IR this will not be possible at all
|
||||
(there will be no more trees in the code!).
|
||||
Anyway, this workaround turns out to be useful in the current state
|
||||
of things...
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Base logic
|
||||
|
||||
If a local is defined by a value which is a proper expression (a tree
|
||||
of MonoInst, not just another local or a constant), and this definition
|
||||
is used only once, the tree can be moved directly to the use location,
|
||||
and the definition eliminated.
|
||||
Of course, none of the variables used in the tree must be defined in
|
||||
the code path between the definition and the use, and the tree must be
|
||||
free of side effects.
|
||||
We do not handle the cases when the tree is just a local or a constant
|
||||
because they are handled by copyprop and consprop, respectively.
|
||||
|
||||
To make things simpler, we restrict the tree move to the case when:
|
||||
- the definition and the use are in the same BB, and
|
||||
- the use is followed by another definition in the same BB (it is not
|
||||
possible that the 1st value is used again), or alternatively there
|
||||
is no BB in the whole CFG that contains a use of this local before a
|
||||
definition (so, again, there is no code path that can lead to a
|
||||
subsequent use).
|
||||
|
||||
To handle this, we maintain an ACT array (Available Copy Tree, similar
|
||||
to the ACP), where we store the "state" of every local.
|
||||
Ideally, every local can be in the following state:
|
||||
[E] Undefined (by a tree, it could be in the ACP but we don't care).
|
||||
[D] Defined (by a tree), and waiting for a use.
|
||||
[U] Used, with a tree definition available in the same BB, but still
|
||||
without a definition following the use (always in the same BB).
|
||||
Of course state [E] (empty) is the initial one.
|
||||
|
||||
Besides, there are two sort of "meta states", or flags:
|
||||
[W] Still waiting for a use or definition in this BB (we have seen no
|
||||
occurrence of the local yet).
|
||||
[X] Used without being previously defined in the same BB (note that if
|
||||
there is a definition that precedes the use in the same BB, even if
|
||||
the definition is not a tree or is not available because of side
|
||||
effects or because the tree value has changed the local is not in
|
||||
state [X]).
|
||||
Also note that state [X] is a sort of "global" condition, which if set
|
||||
in one BB will stay valid for the whole CFG, even if the local will
|
||||
otherwise change state. The idea of flagging a local as [X] is that if
|
||||
there is a definition/use pair that reaches the end of a BB, it could
|
||||
be that there is a CFG path that then leads to the BB flagging it as
|
||||
[X] (which contains a use), so the tree cannot be moved.
|
||||
So state [X] will always be set, and never examined in all the state
|
||||
transitions we will describe.
|
||||
In practice, we use flag [W] to set state [X]: if, when traversing a
|
||||
BB, we find a use for a local in state [W], then that local is flagged
|
||||
[X].
|
||||
|
||||
|
||||
For each BB, we initialize all states to [E] and [W], and then we
|
||||
traverse the code one inst at a time, and update the variable states
|
||||
in the ACT in the following ways:
|
||||
|
||||
[Definition]
|
||||
- Flag [W] is cleared.
|
||||
- All "affected trees" are killed (go from state [D] to [E]).
|
||||
The "affected trees" are the trees which contain (use) the defined
|
||||
local, and the rationale is that the tree value changed, so the
|
||||
tree is no longer available.
|
||||
- If the local was in state [U], *that* tree move is marked "safe"
|
||||
(because *this* definition makes us sure that the previous tree
|
||||
cannot be used again in any way).
|
||||
The idea is that "safe" moves can happen even if the local is
|
||||
flagged [X], because the second definition "covers" the use.
|
||||
The tree move is then saved in the "todo" list (and the affecting
|
||||
nodes are cleared).
|
||||
- If the local was defined by a tree, it goes to state [D], the tree
|
||||
is recorded, and all the locals used in it are marked as "affecting
|
||||
this tree" (of course these markers are lists, because each local
|
||||
could affect more than one tree).
|
||||
|
||||
[IndirectDefinition]
|
||||
- All potentially affected trees (in state [D]) are killed.
|
||||
|
||||
[Use]
|
||||
- If the local is still [W], it is flagged [X] (the [W] goes away).
|
||||
- If the local is in state [D], it goes to state [U].
|
||||
The tree move must not yet be recorded in the "todo" list, it still
|
||||
stays in the ACT slot belonging to this local.
|
||||
Anyway, the "affecting" nodes are updated, because now a definition
|
||||
of a local used in this tree will affect only "indirect" (or also
|
||||
"propagated") moves, but not *this* move (see below).
|
||||
- If the local is in state [U], then the tree cannot be moved (it is
|
||||
used two times): the move is canceled, and the state goes [E].
|
||||
- If the local is in state [E], the use is ignored.
|
||||
|
||||
[IndirectUse]
|
||||
- All potentially affected trees (in state [D] or [U]) are killed.
|
||||
|
||||
[SideEffect]
|
||||
- Tree is marked as "unmovable".
|
||||
|
||||
Then, at the end of the BB, for each ACT slot:
|
||||
- If state is [U], the tree move is recorded in the "todo" list, but
|
||||
flagged "unsafe".
|
||||
- Anyway, state goes to [E], the [W] flag is set, and all "affecting"
|
||||
lists are cleared (we get ready to traverse the next BB).
|
||||
Finally, when all BBs has been scanned, we traverse the "todo" list,
|
||||
moving all "safe" entries, and moving "unsafe" ones only if their ACT
|
||||
slot is not flagged [X].
|
||||
|
||||
So far, so good.
|
||||
But there are two issues that make things harder :-(
|
||||
|
||||
The first is the concept of "indirect tree move".
|
||||
It can happen that a tree is scheduled for moving, and its destination
|
||||
is a use that is located in a second tree, which could also be moved.
|
||||
The main issue is that a definition of a variable of the 1st tree on
|
||||
the path between the definition and the use of the 2nd one must prevent
|
||||
the move.
|
||||
But which move? The 1st or the 2nd?
|
||||
Well, any of the two!
|
||||
The point is, the 2nd move must be prevented *only* if the 1st one
|
||||
happens: if it is aborted (for an [X] flag or any other reason), the
|
||||
2nd move is OK, and vice versa...
|
||||
We must handle this in the following way:
|
||||
- The ACT must still remember if a slot is scheduled for moving in
|
||||
this BB, and if it is, all the locals used in the tree.
|
||||
We say that the slot is in state [M].
|
||||
Note that [M] is (like [X] and [W]) a sort of "meta state": a local
|
||||
is flagged [M] when it goes to state [U], and the flag is cleared
|
||||
when the tree move is cancelled
|
||||
- A tree that uses a local whose slot is in state [M] is also using all
|
||||
the locals used by the tree in state [M], but the use is "indirect".
|
||||
These use nodes are also included in the "affecting" lists.
|
||||
- The definition of a variable used in an "indirect" way has the
|
||||
effect of "linking" the two involved tree moves, saying that only one
|
||||
of the two can happen in practice, but not both.
|
||||
- When the 2nd tree is scheduled for moving, the 1st one is *still* in
|
||||
state [M], because a third move could "carry it forward", and all the
|
||||
*three* moves should be mutually exclusive (to be safe!).
|
||||
|
||||
The second tricky complication is the "tree forwarding" that can happen
|
||||
when copyprop is involved.
|
||||
It is conceptually similar to the "indirect tree move".
|
||||
Only, the 2nd tree is not really a tree, it is just the local defined
|
||||
in the 1st tree move.
|
||||
It can happen that copyprop will propagate the definition.
|
||||
We cannot make treeprop do the same job of copyprop, because copyprop
|
||||
has less constraints, and is therefore more powerful in its scope.
|
||||
The main issue is that treeprop cannot propagate a tree to *two* uses,
|
||||
while copyprop is perfectly capable of propagating one definition to
|
||||
two (or more) different places.
|
||||
So we must let copyprop do its job otherwise we'll miss optimizations,
|
||||
but we must also make it play safe with treeprop.
|
||||
Let's clarify with an example:
|
||||
a = v1 + v2; //a is defined by a tree, state [D], uses v2 and v2
|
||||
b = a; //a is used, state [U] with move scheduled, and
|
||||
//b is defined by a, ACP[b] is a, and b is in state [DC]
|
||||
c = b + v3; // b is used, goes to state [U]
|
||||
The real trouble is that copyprop happens *immediately*, while treeprop
|
||||
is deferred to the end of the CFG traversal.
|
||||
So, in the 3rd statement, the "b" is immediately turned into an "a" by
|
||||
copyprop, regardless of what treeprop will do.
|
||||
Anyway, if we are careful, this is not so bad.
|
||||
First of all, we must "accept" the fact that in the 3rd statement the
|
||||
"b" is in fact an "a", as treeprop must happen *after* copyprop.
|
||||
The real problem is that "a" is used twice: in the 2nd and 3rd lines.
|
||||
In our usual setup, the 2nd line would set it to [U], and the 3rd line
|
||||
would kill the move (and set "a" to [E]).
|
||||
I have tried to play tricks, and reason as of copyprop didn't happen,
|
||||
but everything becomes really messy.
|
||||
Instead, we should note that the 2nd line is very likely to be dead.
|
||||
At least in this BB, copyprop will turn all "b"s into "a"s as long as
|
||||
it can, and when it cannot, it will be because either "a" or "b" have
|
||||
been redefined, which would be after the tree move anyway.
|
||||
So, the reasoning gets different: let's pretend that "b" will be dead.
|
||||
This will make the "a" use in the 2nd statement useless, so there we
|
||||
can "reset" "a" to [D], but also take note that if "b" will end up
|
||||
not being dead, the tree move associated to this [D] must be aborted.
|
||||
We can detect this in the following way:
|
||||
- Either "b" is used before being defined in this BB, or
|
||||
- It will be flagged "unsafe".
|
||||
Both things are very easy to check.
|
||||
The only quirk is that the "affecting" lists must not be cleared when
|
||||
a slot goes to state [U], because a "propagation" could put it back
|
||||
to state [D] (where those lists are needed, because it can be killed
|
||||
by a definition to a used slot).
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Implementation notes
|
||||
|
||||
All the implementation runs inside the existing mono_local_cprop
|
||||
function, and a separate memory pool is used to hold the temporary
|
||||
data.
|
||||
|
||||
A struct, MonoTreeMover, contains the pointers to the pool, the ACT,
|
||||
the list of scheduled moves and auxiliary things.
|
||||
This struct is allocated if the tree move pass is requested, and is
|
||||
then passed along to all the involved functions, which are therefore
|
||||
aware of the tree mover state.
|
||||
|
||||
The ACT is an array of slots, obviously one per local.
|
||||
Each slot is of type MonoTreeMoverActSlot, and contains the used and
|
||||
affected locals, a pointer to the pending tree move and the "waiting"
|
||||
and "unsafe" flags.
|
||||
|
||||
The "affecting" lists a built from "dependency nodes", of type
|
||||
MonoTreeMoverDependencyNode.
|
||||
Each of the nodes contains the used and affected local, and is in
|
||||
two lists: the locals used by a slot, and the locals affected by a
|
||||
slot (obviously a different one).
|
||||
So, each node means: "variable x is used in tree t, so a definition
|
||||
of x affects tree t".
|
||||
The "affecting" lists are doubly linked, to allow for O(1) deletion.
|
||||
The "used" lists are simply linked, but when they are mantained there
|
||||
is always a pointer to the last element to allow for O(1) list moving.
|
||||
When a used list is dismissed (which happens often, any time a node is
|
||||
killed), its nodes are unlinked from their respective affecting lists
|
||||
and are then put in a "free" list in the MonoTreeMover to be reused.
|
||||
|
||||
Each tree move is represented by a struct (MonoTreeMoverTreeMove),
|
||||
which contains:
|
||||
- the definition and use points,
|
||||
- the "affected" moves (recall the concept of "indirect tree move"),
|
||||
- the "must be dead" slots (recall "tree forwarding"). and
|
||||
- a few utility flags.
|
||||
The tree moves stays in the relevant ACT slot until it is ready to be
|
||||
scheduled for moving, at which point it is put in a list in the
|
||||
MonoTreeMover.
|
||||
The tree moves structs are reused when they are killed, so there is
|
||||
also a "free" list for them in the MonoTreeMover.
|
||||
|
||||
The tree mover code has been added to all the relevant functions that
|
||||
participate in consprop and copyprop, particularly:
|
||||
- mono_cprop_copy_values takes care of variable uses (transitions from
|
||||
states [D] to [U] and [U] to [E] because of killing),
|
||||
- mono_cprop_invalidate_values takes care of side effects (indirect
|
||||
accesses, calls...),
|
||||
- mono_local_cprop_bb sets up and cleans the traversals for each BB,
|
||||
and for each MonoInst it takes care of variable definitions.
|
||||
To each of them has been added a MonoTreeMover parameter, which is not
|
||||
NULL if the tree mover is running.
|
||||
After mono_local_cprop_bb has run for all BBs, the MonoTreeMover has
|
||||
the list of all the pending moves, which must be walked to actually
|
||||
perform the moves (when possible, because "unsafe" flags, "affected"
|
||||
moves and "must be dead" slots can still have their effects, which
|
||||
must be handled now because they are fully known only at the end of
|
||||
the CFG traversal).
|
||||
+1
-1
@@ -26,7 +26,7 @@ i?86-*-linux*|i?86-apple-darwin*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-li
|
||||
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*|aarch64*)
|
||||
pic_options='-fPIC'
|
||||
;;
|
||||
?86-pc-cygwin*|i?86-pc-cygwin*|i?86-pc-mingw32*)
|
||||
?86-pc-cygwin*|i?86-pc-cygwin*)
|
||||
pic_options='-DDLL_EXPORT'
|
||||
;;
|
||||
i?86-apple-darwin*|arm-apple-darwin*)
|
||||
|
||||
+2
-5
@@ -135,8 +135,6 @@ AC_CHECK_SIZEOF(void *)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
AC_CHECK_SIZEOF(long long)
|
||||
AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf)
|
||||
AC_CHECK_FUNCS(getrlimit)
|
||||
AC_CHECK_FUNCS(fork execv execve)
|
||||
|
||||
#
|
||||
# Mono currently supports 10.6, but strndup is not available prior to 10.7; avoiding
|
||||
@@ -151,7 +149,7 @@ elif test x$target_ios = xno; then
|
||||
AC_CHECK_FUNCS(strndup getpwuid_r)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(NEED_VASPRINTF, test x$ac_cv_func_vasprintf = xno )
|
||||
AM_CONDITIONAL(NEED_VASPRINTF, test x$have_vasprintf = x )
|
||||
AM_ICONV()
|
||||
AC_SEARCH_LIBS(sqrtf, m)
|
||||
|
||||
@@ -181,8 +179,7 @@ if test "x$have_iso_varargs" = "xyes"; then
|
||||
fi
|
||||
AC_SUBST(G_HAVE_ISO_VARARGS)
|
||||
|
||||
AC_CHECK_HEADERS(getopt.h sys/select.h sys/time.h sys/wait.h pwd.h langinfo.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_HEADERS(getopt.h sys/select.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h localcharset.h sys/types.h)
|
||||
AC_CHECK_HEADER(alloca.h, [HAVE_ALLOCA_H=1], [HAVE_ALLOCA_H=0])
|
||||
AC_SUBST(HAVE_ALLOCA_H)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
noinst_LTLIBRARIES = libeglib.la
|
||||
noinst_LTLIBRARIES = libeglib.la libeglib-static.la
|
||||
|
||||
AM_CFLAGS = $(WERROR_CFLAGS)
|
||||
|
||||
@@ -59,6 +59,8 @@ libeglib_la_SOURCES = \
|
||||
$(vasprintf_files)
|
||||
|
||||
libeglib_la_CFLAGS = -g -Wall -D_FORTIFY_SOURCE=2
|
||||
libeglib_static_la_SOURCES=$(libeglib_la_SOURCES)
|
||||
libeglib_static_la_CFLAGS = $(libeglib_la_CFLAGS)
|
||||
|
||||
AM_CPPFLAGS = -I$(srcdir)
|
||||
|
||||
@@ -70,6 +72,9 @@ libeglib_la_LIBADD = -llog
|
||||
endif
|
||||
endif
|
||||
|
||||
libeglib_static_la_LIBADD = $(libeglib_la_LIBADD) $(LIBICONV)
|
||||
libeglib_static_la_LDFLAGS = -static
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
EXTRA_DIST = eglib-config.h.in $(win_files) $(unix_files)
|
||||
@@ -36,7 +36,7 @@ typedef signed @GSIZE@ gssize;
|
||||
#define G_HAVE_ISO_VARARGS
|
||||
#endif
|
||||
|
||||
#if defined (__native_client__) || defined (HOST_WATCHOS)
|
||||
#if defined (__native_client__)
|
||||
#undef G_BREAKPOINT
|
||||
#define G_BREAKPOINT()
|
||||
#endif
|
||||
|
||||
@@ -49,10 +49,3 @@ g_byte_array_append (GByteArray *array,
|
||||
{
|
||||
return (GByteArray *)g_array_append_vals ((GArray *)array, data, len);
|
||||
}
|
||||
|
||||
void
|
||||
g_byte_array_set_size (GByteArray *array, gint length)
|
||||
{
|
||||
g_array_set_size ((GArray *)array, length);
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ int mkstemp (char *tmp_template)
|
||||
utf16_template = _wmktemp( utf16_template);
|
||||
if (utf16_template && *utf16_template) {
|
||||
/* FIXME: _O_TEMPORARY causes file to disappear on close causing a test to fail */
|
||||
fd = _wopen( utf16_template, _O_BINARY | _O_CREAT /*| _O_TEMPORARY*/ | _O_RDWR | _O_EXCL, _S_IREAD | _S_IWRITE);
|
||||
fd = _wopen( utf16_template, _O_BINARY | _O_CREAT /*| _O_TEMPORARY*/ | _O_EXCL, _S_IREAD | _S_IWRITE);
|
||||
}
|
||||
|
||||
/* FIXME: this will crash if utf16_template == NULL */
|
||||
|
||||
@@ -57,6 +57,14 @@ typedef struct {
|
||||
Slot *slot;
|
||||
} Iter;
|
||||
|
||||
size_t
|
||||
mono_eg_hashtable_get_memory_size (GHashTable *hashtable)
|
||||
{
|
||||
return sizeof (GHashTable) +
|
||||
hashtable->in_use * sizeof (Slot) +
|
||||
hashtable->table_size * sizeof (Slot*);
|
||||
}
|
||||
|
||||
static const guint prime_tbl[] = {
|
||||
11, 19, 37, 73, 109, 163, 251, 367, 557, 823, 1237,
|
||||
1861, 2777, 4177, 6247, 9371, 14057, 21089, 31627,
|
||||
|
||||
+3
-2
@@ -176,6 +176,7 @@ typedef struct _GMemChunk GMemChunk;
|
||||
/*
|
||||
* Misc.
|
||||
*/
|
||||
#define g_atexit(func) ((void) atexit (func))
|
||||
|
||||
const gchar * g_getenv(const gchar *variable);
|
||||
gboolean g_setenv(const gchar *variable, const gchar *value, gboolean overwrite);
|
||||
@@ -466,6 +467,8 @@ guint g_spaced_primes_closest (guint x);
|
||||
#define g_hash_table_insert(h,k,v) g_hash_table_insert_replace ((h),(k),(v),FALSE)
|
||||
#define g_hash_table_replace(h,k,v) g_hash_table_insert_replace ((h),(k),(v),TRUE)
|
||||
|
||||
size_t mono_eg_hashtable_get_memory_size (GHashTable *hashtable);
|
||||
|
||||
gboolean g_direct_equal (gconstpointer v1, gconstpointer v2);
|
||||
guint g_direct_hash (gconstpointer v1);
|
||||
gboolean g_int_equal (gconstpointer v1, gconstpointer v2);
|
||||
@@ -486,7 +489,6 @@ struct _GByteArray {
|
||||
GByteArray *g_byte_array_new (void);
|
||||
GByteArray* g_byte_array_append (GByteArray *array, const guint8 *data, guint len);
|
||||
guint8* g_byte_array_free (GByteArray *array, gboolean free_segment);
|
||||
void g_byte_array_set_size (GByteArray *array, gint length);
|
||||
|
||||
/*
|
||||
* Array
|
||||
@@ -815,7 +817,6 @@ gboolean g_spawn_command_line_sync (const gchar *command_line, gchar **standard_
|
||||
gboolean g_spawn_async_with_pipes (const gchar *working_directory, gchar **argv, gchar **envp, GSpawnFlags flags, GSpawnChildSetupFunc child_setup,
|
||||
gpointer user_data, GPid *child_pid, gint *standard_input, gint *standard_output, gint *standard_error, GError **error);
|
||||
|
||||
int eg_getdtablesize (void);
|
||||
|
||||
/*
|
||||
* Timer
|
||||
|
||||
+10
-15
@@ -93,29 +93,24 @@ get_pw_data (void)
|
||||
pthread_mutex_unlock (&pw_lock);
|
||||
return;
|
||||
}
|
||||
|
||||
home_dir = g_getenv ("HOME");
|
||||
user_name = g_getenv ("USER");
|
||||
|
||||
#ifdef HAVE_GETPWUID_R
|
||||
if (home_dir == NULL || user_name == NULL) {
|
||||
if (getpwuid_r (getuid (), &pw, buf, 4096, &result) == 0) {
|
||||
if (home_dir == NULL)
|
||||
home_dir = g_strdup (pw.pw_dir);
|
||||
if (user_name == NULL)
|
||||
user_name = g_strdup (pw.pw_name);
|
||||
}
|
||||
if (getpwuid_r (getuid (), &pw, buf, 4096, &result) == 0) {
|
||||
home_dir = g_strdup (pw.pw_dir);
|
||||
user_name = g_strdup (pw.pw_name);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (user_name == NULL)
|
||||
user_name = "somebody";
|
||||
if (home_dir == NULL)
|
||||
home_dir = "/";
|
||||
home_dir = g_getenv ("HOME");
|
||||
|
||||
if (user_name == NULL) {
|
||||
user_name = g_getenv ("USER");
|
||||
if (user_name == NULL)
|
||||
user_name = "somebody";
|
||||
}
|
||||
pthread_mutex_unlock (&pw_lock);
|
||||
}
|
||||
|
||||
/* Give preference to /etc/passwd than HOME */
|
||||
const gchar *
|
||||
g_get_home_dir (void)
|
||||
{
|
||||
|
||||
+1
-2
@@ -132,7 +132,6 @@ g_assertion_message (const gchar *format, ...)
|
||||
va_start (args, format);
|
||||
g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format, args);
|
||||
va_end (args);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
|
||||
@@ -177,7 +176,7 @@ default_stderr_handler (const gchar *message)
|
||||
}
|
||||
|
||||
|
||||
#elif defined(HOST_IOS)
|
||||
#elif MONOTOUCH
|
||||
#include <asl.h>
|
||||
|
||||
static int
|
||||
|
||||
+4
-42
@@ -53,10 +53,6 @@
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_RESOURCE_H
|
||||
# include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <io.h>
|
||||
#include <winsock2.h>
|
||||
@@ -74,18 +70,13 @@
|
||||
#define NO_INTR(var,cmd) do { (var) = (cmd); } while ((var) == -1 && errno == EINTR)
|
||||
#define CLOSE_PIPE(p) do { close (p [0]); close (p [1]); } while (0)
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#if defined (TARGET_OSX)
|
||||
#if defined(__APPLE__) && !defined (__arm__)
|
||||
/* Apple defines this in crt_externs.h but doesn't provide that header for
|
||||
* arm-apple-darwin9. We'll manually define the symbol on Apple as it does
|
||||
* in fact exist on all implementations (so far)
|
||||
*/
|
||||
gchar ***_NSGetEnviron(void);
|
||||
gchar ***_NSGetEnviron();
|
||||
#define environ (*_NSGetEnviron())
|
||||
#else
|
||||
static char *mono_environ[1] = { NULL };
|
||||
#define environ mono_environ
|
||||
#endif /* defined (TARGET_OSX) */
|
||||
#elif defined(_MSC_VER)
|
||||
/* MS defines this in stdlib.h */
|
||||
#else
|
||||
@@ -222,29 +213,6 @@ write_all (int fd, const void *vbuf, size_t n)
|
||||
return nwritten;
|
||||
}
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
int
|
||||
eg_getdtablesize (void)
|
||||
{
|
||||
#ifdef HAVE_GETRLIMIT
|
||||
struct rlimit limit;
|
||||
int res;
|
||||
|
||||
res = getrlimit (RLIMIT_NOFILE, &limit);
|
||||
g_assert (res == 0);
|
||||
return limit.rlim_cur;
|
||||
#else
|
||||
return getdtablesize ();
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
int
|
||||
eg_getdtablesize (void)
|
||||
{
|
||||
g_error ("Should not be called");
|
||||
}
|
||||
#endif
|
||||
|
||||
gboolean
|
||||
g_spawn_command_line_sync (const gchar *command_line,
|
||||
gchar **standard_output,
|
||||
@@ -253,9 +221,6 @@ g_spawn_command_line_sync (const gchar *command_line,
|
||||
GError **error)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
#elif !defined (HAVE_FORK) || !defined (HAVE_EXECV)
|
||||
fprintf (stderr, "g_spawn_command_line_sync not supported on this platform\n");
|
||||
return FALSE;
|
||||
#else
|
||||
pid_t pid;
|
||||
gchar **argv;
|
||||
@@ -291,7 +256,7 @@ g_spawn_command_line_sync (const gchar *command_line,
|
||||
close (stderr_pipe [0]);
|
||||
dup2 (stderr_pipe [1], STDERR_FILENO);
|
||||
}
|
||||
for (i = eg_getdtablesize () - 1; i >= 3; i--)
|
||||
for (i = getdtablesize () - 1; i >= 3; i--)
|
||||
close (i);
|
||||
|
||||
/* G_SPAWN_SEARCH_PATH is always enabled for g_spawn_command_line_sync */
|
||||
@@ -352,9 +317,6 @@ g_spawn_async_with_pipes (const gchar *working_directory,
|
||||
GError **error)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
#elif !defined (HAVE_FORK) || !defined (HAVE_EXECVE)
|
||||
fprintf (stderr, "g_spawn_async_with_pipes is not supported on this platform\n");
|
||||
return FALSE;
|
||||
#else
|
||||
pid_t pid;
|
||||
int info_pipe [2];
|
||||
@@ -455,7 +417,7 @@ g_spawn_async_with_pipes (const gchar *working_directory,
|
||||
}
|
||||
|
||||
if ((flags & G_SPAWN_LEAVE_DESCRIPTORS_OPEN) != 0) {
|
||||
for (i = eg_getdtablesize () - 1; i >= 3; i--)
|
||||
for (i = getdtablesize () - 1; i >= 3; i--)
|
||||
close (i);
|
||||
}
|
||||
|
||||
|
||||
@@ -219,10 +219,10 @@ g_get_charset (G_CONST_RETURN char **charset)
|
||||
is_utf8 = FALSE;
|
||||
#else
|
||||
/* These shouldn't be heap allocated */
|
||||
#if defined(HAVE_LANGINFO_H)
|
||||
my_charset = nl_langinfo (CODESET);
|
||||
#elif defined(HAVE_LOCALCHARSET_H)
|
||||
#if HAVE_LOCALCHARSET_H
|
||||
my_charset = locale_charset ();
|
||||
#elif defined(HAVE_LANGINFO_H)
|
||||
my_charset = nl_langinfo (CODESET);
|
||||
#else
|
||||
my_charset = "UTF-8";
|
||||
#endif
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
/* config.h. Generated by configure. */
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include "cygconfig.h"
|
||||
#else
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
@@ -78,4 +74,3 @@
|
||||
#define VERSION "0.1"
|
||||
|
||||
#define HAVE_STRTOK_R 1
|
||||
#endif
|
||||
+1
Submodule external/Lucene.Net added at 88fb67b076.
Vendored
-1
Submodule external/Lucene.Net.Light deleted from 85978b7eb9.
Vendored
-1
Submodule external/binary-reference-assemblies deleted from fcb3074202.
+1
Submodule external/entityframework added at a5faddeca2.
Vendored
+1
-1
Submodule external/ikdasm updated: 323eeecdf1...7ded4decb9.
Vendored
+1
-1
Submodule external/ikvm updated: d6b00edf21...22534de209.
Vendored
-1
Submodule external/referencesource deleted from e833dc4ab2.
Vendored
+1
-1
Submodule external/rx updated: b29a4b0fda...00c1aadf14.
@@ -1,9 +1,9 @@
|
||||
|
||||
AM_CPPFLAGS = $(GLIB_CFLAGS)
|
||||
AM_CPPFLAGS = $(GMODULE_CFLAGS)
|
||||
|
||||
lib_LTLIBRARIES = libikvm-native.la
|
||||
|
||||
libikvm_native_la_SOURCES = jni.c os.c jni.h
|
||||
|
||||
libikvm_native_la_LDFLAGS = -avoid-version
|
||||
libikvm_native_la_LIBADD = $(GLIB_LIBS)
|
||||
libikvm_native_la_LIBADD = $(GMODULE_LIBS)
|
||||
+1
-1
@@ -26,7 +26,7 @@ i?86-*-linux*|i?86-apple-darwin*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-li
|
||||
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*|aarch64*)
|
||||
pic_options='-fPIC'
|
||||
;;
|
||||
?86-pc-cygwin*|i?86-pc-cygwin*|i?86-pc-mingw32*)
|
||||
?86-pc-cygwin*|i?86-pc-cygwin*)
|
||||
pic_options='-DDLL_EXPORT'
|
||||
;;
|
||||
i?86-apple-darwin*|arm-apple-darwin*)
|
||||
|
||||
+1
-9
@@ -644,17 +644,9 @@ GC_stop_func stop_func;
|
||||
}
|
||||
}
|
||||
|
||||
void (*GC_notify_event) GC_PROTO((GC_EventType e));
|
||||
void (*GC_notify_event) GC_PROTO((GCEventType e));
|
||||
void (*GC_on_heap_resize) GC_PROTO((size_t new_size));
|
||||
|
||||
GC_API void GC_set_on_collection_event (void (*fn) (GC_EventType))
|
||||
{
|
||||
DCL_LOCK_STATE;
|
||||
LOCK();
|
||||
GC_notify_event = fn;
|
||||
UNLOCK();
|
||||
}
|
||||
|
||||
/* Finish up a collection. Assumes lock is held, signals are disabled, */
|
||||
/* but the world is otherwise running. */
|
||||
void GC_finish_collection()
|
||||
|
||||
Executable
+436
@@ -0,0 +1,436 @@
|
||||
#! /bin/sh
|
||||
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
# Copyright 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
# 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 2, 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, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <[email protected]>.
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
# `libtool' can also be set to `yes' or `no'.
|
||||
|
||||
if test -z "$depfile"; then
|
||||
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
|
||||
dir=`echo "$object" | sed 's,/.*$,/,'`
|
||||
if test "$dir" = "$object"; then
|
||||
dir=
|
||||
fi
|
||||
# FIXME: should be _deps on DOS.
|
||||
depfile="$dir.deps/$base"
|
||||
fi
|
||||
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. This file always lives in the current directory.
|
||||
# Also, the AIX compiler puts `$object:' at the start of each line;
|
||||
# $object doesn't have directory information.
|
||||
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
outname="$stripped.o"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
|
||||
base=`echo "$object" | sed -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
tmpdepfile1="$base.o.d"
|
||||
tmpdepfile2="$base.d"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile1"; then
|
||||
tmpdepfile="$tmpdepfile1"
|
||||
else
|
||||
tmpdepfile="$tmpdepfile2"
|
||||
fi
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a space and a tab in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
( IFS=" "
|
||||
case " $* " in
|
||||
*" --mode=compile "*) # this is libtool, let us make it quiet
|
||||
for arg
|
||||
do # cycle over the arguments
|
||||
case "$arg" in
|
||||
"--mode=compile")
|
||||
# insert --quiet before "--mode=compile"
|
||||
set fnord "$@" --quiet
|
||||
shift # fnord
|
||||
;;
|
||||
esac
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # "$arg"
|
||||
done
|
||||
;;
|
||||
esac
|
||||
"$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
) &
|
||||
proc=$!
|
||||
"$@"
|
||||
stat=$?
|
||||
wait "$proc"
|
||||
if test "$stat" != 0; then exit $stat; fi
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
# X makedepend
|
||||
(
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in no)
|
||||
set ""; shift
|
||||
cleared=yes
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift;;
|
||||
-*)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
) &
|
||||
proc=$!
|
||||
"$@"
|
||||
stat=$?
|
||||
wait "$proc"
|
||||
if test "$stat" != 0; then exit $stat; fi
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
( IFS=" "
|
||||
case " $* " in
|
||||
*" --mode=compile "*)
|
||||
for arg
|
||||
do # cycle over the arguments
|
||||
case $arg in
|
||||
"--mode=compile")
|
||||
# insert --quiet before "--mode=compile"
|
||||
set fnord "$@" --quiet
|
||||
shift # fnord
|
||||
;;
|
||||
esac
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # "$arg"
|
||||
done
|
||||
;;
|
||||
esac
|
||||
"$@" -E |
|
||||
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
) &
|
||||
proc=$!
|
||||
"$@"
|
||||
stat=$?
|
||||
wait "$proc"
|
||||
if test "$stat" != 0; then exit $stat; fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
( IFS=" "
|
||||
case " $* " in
|
||||
*" --mode=compile "*)
|
||||
for arg
|
||||
do # cycle over the arguments
|
||||
case $arg in
|
||||
"--mode=compile")
|
||||
# insert --quiet before "--mode=compile"
|
||||
set fnord "$@" --quiet
|
||||
shift # fnord
|
||||
;;
|
||||
esac
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # "$arg"
|
||||
done
|
||||
;;
|
||||
esac
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
) &
|
||||
proc=$!
|
||||
"$@"
|
||||
stat=$?
|
||||
wait "$proc"
|
||||
if test "$stat" != 0; then exit $stat; fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
+10
-20
@@ -313,7 +313,7 @@ typedef struct {
|
||||
GC_hidden_pointer weak_ref;
|
||||
} GCToggleRef;
|
||||
|
||||
static GC_ToggleRefStatus (*GC_toggleref_callback) (GC_PTR obj);
|
||||
static int (*GC_toggleref_callback) (GC_PTR obj);
|
||||
static GCToggleRef *GC_toggleref_array;
|
||||
static int GC_toggleref_array_size;
|
||||
static int GC_toggleref_array_capacity;
|
||||
@@ -326,7 +326,7 @@ GC_process_togglerefs (void)
|
||||
int toggle_ref_counts [3] = { 0, 0, 0 };
|
||||
|
||||
for (i = w = 0; i < GC_toggleref_array_size; ++i) {
|
||||
GC_ToggleRefStatus res;
|
||||
int res;
|
||||
GCToggleRef r = GC_toggleref_array [i];
|
||||
|
||||
GC_PTR obj;
|
||||
@@ -341,14 +341,14 @@ GC_process_togglerefs (void)
|
||||
res = GC_toggleref_callback (obj);
|
||||
++toggle_ref_counts [res];
|
||||
switch (res) {
|
||||
case GC_TOGGLE_REF_DROP:
|
||||
case 0:
|
||||
break;
|
||||
case GC_TOGGLE_REF_STRONG:
|
||||
case 1:
|
||||
GC_toggleref_array [w].strong_ref = obj;
|
||||
GC_toggleref_array [w].weak_ref = (GC_hidden_pointer)NULL;
|
||||
++w;
|
||||
break;
|
||||
case GC_TOGGLE_REF_WEAK:
|
||||
case 2:
|
||||
GC_toggleref_array [w].strong_ref = NULL;
|
||||
GC_toggleref_array [w].weak_ref = HIDE_POINTER (obj);
|
||||
++w;
|
||||
@@ -370,7 +370,7 @@ GC_process_togglerefs (void)
|
||||
static void (*GC_object_finalized_proc) (GC_PTR obj);
|
||||
|
||||
void
|
||||
GC_set_await_finalize_proc (void (*proc) (GC_PTR obj))
|
||||
GC_set_finalizer_notify_proc (void (*proc) (GC_PTR obj))
|
||||
{
|
||||
GC_object_finalized_proc = proc;
|
||||
}
|
||||
@@ -423,19 +423,17 @@ static void GC_clear_togglerefs ()
|
||||
|
||||
|
||||
|
||||
void GC_set_toggleref_func(GC_ToggleRefStatus (*proccess_toggleref) (GC_PTR obj))
|
||||
void GC_toggleref_register_callback(int (*proccess_toggleref) (GC_PTR obj))
|
||||
{
|
||||
GC_toggleref_callback = proccess_toggleref;
|
||||
}
|
||||
|
||||
static GC_bool
|
||||
static void
|
||||
ensure_toggleref_capacity (int capacity)
|
||||
{
|
||||
if (!GC_toggleref_array) {
|
||||
GC_toggleref_array_capacity = 32;
|
||||
GC_toggleref_array = (GCToggleRef *) GC_INTERNAL_MALLOC_IGNORE_OFF_PAGE (GC_toggleref_array_capacity * sizeof (GCToggleRef), NORMAL);
|
||||
if (!GC_toggleref_array)
|
||||
return FALSE;
|
||||
}
|
||||
if (GC_toggleref_array_size + capacity >= GC_toggleref_array_capacity) {
|
||||
GCToggleRef *tmp;
|
||||
@@ -444,19 +442,15 @@ ensure_toggleref_capacity (int capacity)
|
||||
GC_toggleref_array_capacity *= 2;
|
||||
|
||||
tmp = (GCToggleRef *) GC_INTERNAL_MALLOC_IGNORE_OFF_PAGE (GC_toggleref_array_capacity * sizeof (GCToggleRef), NORMAL);
|
||||
if (!tmp)
|
||||
return FALSE;
|
||||
memcpy (tmp, GC_toggleref_array, GC_toggleref_array_size * sizeof (GCToggleRef));
|
||||
GC_INTERNAL_FREE (GC_toggleref_array);
|
||||
GC_toggleref_array = tmp;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
void
|
||||
GC_toggleref_add (GC_PTR object, int strong_ref)
|
||||
{
|
||||
int res = GC_SUCCESS;
|
||||
DCL_LOCK_STATE;
|
||||
# ifdef THREADS
|
||||
DISABLE_SIGNALS();
|
||||
@@ -466,10 +460,7 @@ GC_toggleref_add (GC_PTR object, int strong_ref)
|
||||
if (!GC_toggleref_callback)
|
||||
goto end;
|
||||
|
||||
if (!ensure_toggleref_capacity (1)) {
|
||||
res = GC_NO_MEMORY;
|
||||
goto end;
|
||||
}
|
||||
ensure_toggleref_capacity (1);
|
||||
GC_toggleref_array [GC_toggleref_array_size].strong_ref = strong_ref ? object : NULL;
|
||||
GC_toggleref_array [GC_toggleref_array_size].weak_ref = strong_ref ? (GC_hidden_pointer)NULL : HIDE_POINTER (object);
|
||||
++GC_toggleref_array_size;
|
||||
@@ -479,7 +470,6 @@ end:
|
||||
UNLOCK();
|
||||
ENABLE_SIGNALS();
|
||||
# endif
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+12
-36
@@ -104,11 +104,11 @@ typedef enum {
|
||||
GC_EVENT_POST_STOP_WORLD,
|
||||
GC_EVENT_PRE_START_WORLD,
|
||||
GC_EVENT_POST_START_WORLD
|
||||
} GC_EventType;
|
||||
} GCEventType;
|
||||
|
||||
GC_API void GC_set_on_collection_event GC_PROTO((void (*) (GC_EventType)));
|
||||
/* Set callback invoked at specific points */
|
||||
/* during every collection. */
|
||||
GC_API void (*GC_notify_event) GC_PROTO((GCEventType event_type));
|
||||
/* Invoked at specific points during every collection.
|
||||
*/
|
||||
|
||||
GC_API void (*GC_on_heap_resize) GC_PROTO((size_t new_size));
|
||||
/* Invoked when the heap grows or shrinks */
|
||||
@@ -431,10 +431,7 @@ int GC_get_suspend_signal GC_PROTO((void));
|
||||
|
||||
/* Return the signal used by the gc to resume threads on posix platforms. */
|
||||
/* Return -1 otherwise. */
|
||||
int GC_get_thr_restart_signal GC_PROTO((void));
|
||||
|
||||
/* Explicitly enable GC_register_my_thread() invocation. */
|
||||
GC_API void GC_allow_register_threads GC_PROTO((void));
|
||||
int GC_get_restart_signal GC_PROTO((void));
|
||||
|
||||
/* Disable garbage collection. Even GC_gcollect calls will be */
|
||||
/* ineffective. */
|
||||
@@ -776,21 +773,13 @@ GC_API int GC_unregister_disappearing_link GC_PROTO((GC_PTR * /* link */));
|
||||
GC_API int GC_register_long_link GC_PROTO((GC_PTR * /* link */, GC_PTR obj));
|
||||
GC_API int GC_unregister_long_link GC_PROTO((GC_PTR * /* link */));
|
||||
|
||||
typedef enum {
|
||||
GC_TOGGLE_REF_DROP,
|
||||
GC_TOGGLE_REF_STRONG,
|
||||
GC_TOGGLE_REF_WEAK
|
||||
} GC_ToggleRefStatus;
|
||||
|
||||
/* toggleref support */
|
||||
GC_API void GC_set_toggleref_func GC_PROTO(
|
||||
(GC_ToggleRefStatus (*proccess_toggleref) (GC_PTR obj)));
|
||||
GC_API int GC_toggleref_add (GC_PTR object, int strong_ref);
|
||||
/* Returns GC_SUCCESS if registration succeeded (or no callback */
|
||||
/* registered yet), GC_NO_MEMORY if failed for lack of memory. */
|
||||
GC_API void GC_toggleref_register_callback GC_PROTO((int (*proccess_toggleref) (GC_PTR obj)));
|
||||
GC_API void GC_toggleref_add (GC_PTR object, int strong_ref);
|
||||
|
||||
/* finalizer callback support */
|
||||
GC_API void GC_set_await_finalize_proc GC_PROTO((void (*object_finalized) (GC_PTR obj)));
|
||||
GC_API void GC_set_finalizer_notify_proc GC_PROTO((void (*object_finalized) (GC_PTR obj)));
|
||||
|
||||
|
||||
/* Returns !=0 if GC_invoke_finalizers has something to do. */
|
||||
@@ -870,21 +859,6 @@ GC_API GC_PTR GC_is_visible GC_PROTO((GC_PTR p));
|
||||
/* Always returns its argument. */
|
||||
GC_API GC_PTR GC_is_valid_displacement GC_PROTO((GC_PTR p));
|
||||
|
||||
#define GC_SUCCESS 0
|
||||
#define GC_DUPLICATE 1 /* Was already registered. */
|
||||
#define GC_NO_MEMORY 2 /* Failure due to lack of memory. */
|
||||
#define GC_UNIMPLEMENTED 3 /* Not yet implemented on the platform. */
|
||||
|
||||
/* Structure representing the base of a thread stack. */
|
||||
struct GC_stack_base {
|
||||
void * mem_base; /* Base of memory stack. */
|
||||
};
|
||||
|
||||
/* Register the current thread, with the indicated stack base. */
|
||||
/* Returns GC_SUCCESS on success, GC_DUPLICATE if already registered. */
|
||||
/* On some platforms it returns GC_UNIMPLEMENTED. */
|
||||
GC_API int GC_register_my_thread GC_PROTO((struct GC_stack_base *));
|
||||
|
||||
/* Returns 1 if the calling thread is registered with the GC, 0 otherwise */
|
||||
GC_API int GC_thread_is_registered GC_PROTO((void));
|
||||
|
||||
@@ -953,7 +927,11 @@ GC_API void (*GC_is_visible_print_proc)
|
||||
|
||||
#if !defined(GC_USE_LD_WRAP) && \
|
||||
(defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS) || defined(GC_DARWIN_THREADS) || defined(GC_MACOSX_THREADS))
|
||||
#if defined(_IN_LIBGC) || defined(USE_INCLUDED_LIBGC)
|
||||
# include "gc_pthread_redirects.h"
|
||||
#else
|
||||
# include <gc/gc_pthread_redirects.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
# if defined(PCR) || defined(GC_SOLARIS_THREADS) || \
|
||||
@@ -975,9 +953,7 @@ extern void GC_thr_init(void); /* Needed for Solaris/X86 */
|
||||
#if defined(GC_WIN32_THREADS) && !defined(__CYGWIN32__) && !defined(__CYGWIN__)
|
||||
# include <windows.h>
|
||||
|
||||
# ifdef GC_INSIDE_DLL
|
||||
BOOL WINAPI GC_DllMain(HINSTANCE inst, ULONG reason, LPVOID reserved);
|
||||
# endif
|
||||
|
||||
/*
|
||||
* All threads must be created using GC_CreateThread, so that they will be
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
# define GC_LINUX_THREADS
|
||||
#endif
|
||||
#if defined(WIN32_THREADS)
|
||||
# define GC_WIN32_THREADS 1
|
||||
# define GC_WIN32_THREADS
|
||||
#endif
|
||||
#if defined(USE_LD_WRAP)
|
||||
# define GC_USE_LD_WRAP
|
||||
|
||||
@@ -1214,8 +1214,6 @@ extern long GC_large_alloc_warn_suppressed;
|
||||
extern GC_bool GC_world_stopped;
|
||||
#endif
|
||||
|
||||
extern void (*GC_notify_event) GC_PROTO((GC_EventType));
|
||||
|
||||
/* Operations */
|
||||
# ifndef abs
|
||||
# define abs(x) ((x) < 0? (-(x)) : (x))
|
||||
|
||||
@@ -16,23 +16,6 @@
|
||||
|
||||
/* We use the allocation lock to protect thread-related data structures. */
|
||||
|
||||
#ifdef THREAD_LOCAL_ALLOC
|
||||
# if CPP_WORDSZ == 64 && defined(ALIGN_DOUBLE)
|
||||
# define GRANULARITY 16
|
||||
# define NFREELISTS 49
|
||||
# else
|
||||
# define GRANULARITY 8
|
||||
# define NFREELISTS 65
|
||||
# endif
|
||||
struct thread_local_freelists {
|
||||
ptr_t ptrfree_freelists[NFREELISTS];
|
||||
ptr_t normal_freelists[NFREELISTS];
|
||||
# ifdef GC_GCJ_SUPPORT
|
||||
ptr_t gcj_freelists[NFREELISTS];
|
||||
# endif
|
||||
};
|
||||
#endif
|
||||
|
||||
/* The set of all known threads. We intercept thread creation and */
|
||||
/* joins. */
|
||||
/* Protected by allocation/GC lock. */
|
||||
@@ -77,12 +60,23 @@ typedef struct GC_Thread_Rep {
|
||||
/* reclamation of any data it might */
|
||||
/* reference. */
|
||||
# ifdef THREAD_LOCAL_ALLOC
|
||||
# if CPP_WORDSZ == 64 && defined(ALIGN_DOUBLE)
|
||||
# define GRANULARITY 16
|
||||
# define NFREELISTS 49
|
||||
# else
|
||||
# define GRANULARITY 8
|
||||
# define NFREELISTS 65
|
||||
# endif
|
||||
/* The ith free list corresponds to size i*GRANULARITY */
|
||||
# define INDEX_FROM_BYTES(n) ((ADD_SLOP(n) + GRANULARITY - 1)/GRANULARITY)
|
||||
# define BYTES_FROM_INDEX(i) ((i) * GRANULARITY - EXTRA_BYTES)
|
||||
# define SMALL_ENOUGH(bytes) (ADD_SLOP(bytes) <= \
|
||||
(NFREELISTS-1)*GRANULARITY)
|
||||
struct thread_local_freelists tlfs;
|
||||
ptr_t ptrfree_freelists[NFREELISTS];
|
||||
ptr_t normal_freelists[NFREELISTS];
|
||||
# ifdef GC_GCJ_SUPPORT
|
||||
ptr_t gcj_freelists[NFREELISTS];
|
||||
# endif
|
||||
/* Free lists contain either a pointer or a small count */
|
||||
/* reflecting the number of granules allocated at that */
|
||||
/* size. */
|
||||
|
||||
+1
-1
@@ -480,7 +480,7 @@ int GC_get_suspend_signal GC_PROTO(())
|
||||
#endif
|
||||
}
|
||||
|
||||
int GC_get_thr_restart_signal GC_PROTO(())
|
||||
int GC_get_restart_signal GC_PROTO(())
|
||||
{
|
||||
#if defined(SIG_THR_RESTART) && defined(GC_PTHREADS) && !defined(GC_MACOSX_THREADS) && !defined(GC_OPENBSD_THREADS)
|
||||
return SIG_THR_RESTART;
|
||||
|
||||
Executable
+336
@@ -0,0 +1,336 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <[email protected]>, 1996.
|
||||
|
||||
# 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 2, 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, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing 0.4 - GNU automake"
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aclocal*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1Help2man' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
|
||||
# We have makeinfo, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar ${1+"$@"} && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar ${1+"$@"} && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" ${1+"$@"} && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" ${1+"$@"} && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequirements for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
+23
-29
@@ -294,17 +294,17 @@ void GC_init_thread_local(GC_thread p)
|
||||
ABORT("Failed to set thread specific allocation pointers");
|
||||
}
|
||||
for (i = 1; i < NFREELISTS; ++i) {
|
||||
p -> tlfs.ptrfree_freelists[i] = (ptr_t)1;
|
||||
p -> tlfs.normal_freelists[i] = (ptr_t)1;
|
||||
p -> ptrfree_freelists[i] = (ptr_t)1;
|
||||
p -> normal_freelists[i] = (ptr_t)1;
|
||||
# ifdef GC_GCJ_SUPPORT
|
||||
p -> tlfs.gcj_freelists[i] = (ptr_t)1;
|
||||
p -> gcj_freelists[i] = (ptr_t)1;
|
||||
# endif
|
||||
}
|
||||
/* Set up the size 0 free lists. */
|
||||
p -> tlfs.ptrfree_freelists[0] = (ptr_t)(&size_zero_object);
|
||||
p -> tlfs.normal_freelists[0] = (ptr_t)(&size_zero_object);
|
||||
p -> ptrfree_freelists[0] = (ptr_t)(&size_zero_object);
|
||||
p -> normal_freelists[0] = (ptr_t)(&size_zero_object);
|
||||
# ifdef GC_GCJ_SUPPORT
|
||||
p -> tlfs.gcj_freelists[0] = (ptr_t)(-1);
|
||||
p -> gcj_freelists[0] = (ptr_t)(-1);
|
||||
# endif
|
||||
}
|
||||
|
||||
@@ -320,10 +320,10 @@ void GC_destroy_thread_local(GC_thread p)
|
||||
# ifndef HANDLE_FORK
|
||||
GC_ASSERT(GC_getspecific(GC_thread_key) == (void *)p);
|
||||
# endif
|
||||
return_freelists(p -> tlfs.ptrfree_freelists, GC_aobjfreelist);
|
||||
return_freelists(p -> tlfs.normal_freelists, GC_objfreelist);
|
||||
return_freelists(p -> ptrfree_freelists, GC_aobjfreelist);
|
||||
return_freelists(p -> normal_freelists, GC_objfreelist);
|
||||
# ifdef GC_GCJ_SUPPORT
|
||||
return_freelists(p -> tlfs.gcj_freelists, GC_gcjobjfreelist);
|
||||
return_freelists(p -> gcj_freelists, GC_gcjobjfreelist);
|
||||
# endif
|
||||
}
|
||||
|
||||
@@ -357,7 +357,7 @@ GC_PTR GC_local_malloc(size_t bytes)
|
||||
GC_ASSERT(tsd == (void *)GC_lookup_thread(pthread_self()));
|
||||
UNLOCK();
|
||||
# endif
|
||||
my_fl = ((GC_thread)tsd) -> tlfs.normal_freelists + index;
|
||||
my_fl = ((GC_thread)tsd) -> normal_freelists + index;
|
||||
my_entry = *my_fl;
|
||||
if (EXPECT((word)my_entry >= HBLKSIZE, 1)) {
|
||||
ptr_t next = obj_link(my_entry);
|
||||
@@ -384,7 +384,7 @@ GC_PTR GC_local_malloc_atomic(size_t bytes)
|
||||
} else {
|
||||
int index = INDEX_FROM_BYTES(bytes);
|
||||
ptr_t * my_fl = ((GC_thread)GC_getspecific(GC_thread_key))
|
||||
-> tlfs.ptrfree_freelists + index;
|
||||
-> ptrfree_freelists + index;
|
||||
ptr_t my_entry = *my_fl;
|
||||
|
||||
if (EXPECT((word)my_entry >= HBLKSIZE, 1)) {
|
||||
@@ -424,7 +424,7 @@ GC_PTR GC_local_gcj_malloc(size_t bytes,
|
||||
} else {
|
||||
int index = INDEX_FROM_BYTES(bytes);
|
||||
ptr_t * my_fl = ((GC_thread)GC_getspecific(GC_thread_key))
|
||||
-> tlfs.gcj_freelists + index;
|
||||
-> gcj_freelists + index;
|
||||
ptr_t my_entry = *my_fl;
|
||||
if (EXPECT((word)my_entry >= HBLKSIZE, 1)) {
|
||||
GC_PTR result = (GC_PTR)my_entry;
|
||||
@@ -463,7 +463,7 @@ GC_PTR GC_local_gcj_malloc(size_t bytes,
|
||||
void * GC_local_gcj_fast_malloc(size_t lw, void * ptr_to_struct_containing_descr)
|
||||
{
|
||||
ptr_t * my_fl = ((GC_thread)GC_getspecific(GC_thread_key))
|
||||
-> tlfs.gcj_freelists + lw;
|
||||
-> gcj_freelists + lw;
|
||||
ptr_t my_entry = *my_fl;
|
||||
|
||||
GC_ASSERT(GC_gcj_malloc_initialized);
|
||||
@@ -666,12 +666,12 @@ void GC_mark_thread_local_free_lists(void)
|
||||
for (i = 0; i < THREAD_TABLE_SZ; ++i) {
|
||||
for (p = GC_threads[i]; 0 != p; p = p -> next) {
|
||||
for (j = 1; j < NFREELISTS; ++j) {
|
||||
q = p -> tlfs.ptrfree_freelists[j];
|
||||
q = p -> ptrfree_freelists[j];
|
||||
if ((word)q > HBLKSIZE) GC_set_fl_marks(q);
|
||||
q = p -> tlfs.normal_freelists[j];
|
||||
q = p -> normal_freelists[j];
|
||||
if ((word)q > HBLKSIZE) GC_set_fl_marks(q);
|
||||
# ifdef GC_GCJ_SUPPORT
|
||||
q = p -> tlfs.gcj_freelists[j];
|
||||
q = p -> gcj_freelists[j];
|
||||
if ((word)q > HBLKSIZE) GC_set_fl_marks(q);
|
||||
# endif /* GC_GCJ_SUPPORT */
|
||||
}
|
||||
@@ -1462,18 +1462,13 @@ void * GC_start_routine_head(void * arg, void *base_addr,
|
||||
return me;
|
||||
}
|
||||
|
||||
void GC_allow_register_threads (void)
|
||||
{
|
||||
/* No-op for GC pre-v7. */
|
||||
}
|
||||
|
||||
int GC_register_my_thread (struct GC_stack_base *sb)
|
||||
int GC_thread_register_foreign (void *base_addr)
|
||||
{
|
||||
struct start_info si = { 0, }; /* stacked for legibility & locking */
|
||||
GC_thread me;
|
||||
|
||||
# ifdef DEBUG_THREADS
|
||||
GC_printf1( "GC_register_my_thread %p\n", &si );
|
||||
GC_printf1( "GC_thread_register_foreign %p\n", &si );
|
||||
# endif
|
||||
|
||||
si.flags = FOREIGN_THREAD;
|
||||
@@ -1481,13 +1476,12 @@ int GC_register_my_thread (struct GC_stack_base *sb)
|
||||
if (!parallel_initialized) GC_init_parallel();
|
||||
LOCK();
|
||||
if (!GC_thr_initialized) GC_thr_init();
|
||||
me = GC_lookup_thread(pthread_self());
|
||||
UNLOCK();
|
||||
if (me != NULL)
|
||||
return GC_DUPLICATE;
|
||||
|
||||
(void)GC_start_routine_head(&si, sb -> mem_base, NULL, NULL);
|
||||
return GC_SUCCESS;
|
||||
UNLOCK();
|
||||
|
||||
me = GC_start_routine_head(&si, base_addr, NULL, NULL);
|
||||
|
||||
return me != NULL;
|
||||
}
|
||||
|
||||
void * GC_start_routine(void * arg)
|
||||
|
||||
@@ -642,15 +642,10 @@ int GC_thread_is_registered (void)
|
||||
return ptr ? 1 : 0;
|
||||
}
|
||||
|
||||
void GC_allow_register_threads (void)
|
||||
{
|
||||
/* No-op for GC pre-v7. */
|
||||
}
|
||||
|
||||
int GC_register_my_thread (struct GC_stack_base *sb)
|
||||
int GC_thread_register_foreign (void *base_addr)
|
||||
{
|
||||
/* FIXME: */
|
||||
return GC_UNIMPLEMENTED;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void GC_register_altstack (void *stack, int stack_size, void *altstack, int altstack_size)
|
||||
|
||||
@@ -85,22 +85,6 @@ int GC_thread_is_registered (void)
|
||||
#endif
|
||||
}
|
||||
|
||||
void GC_allow_register_threads (void)
|
||||
{
|
||||
/* No-op for GC pre-v7. */
|
||||
}
|
||||
|
||||
int GC_register_my_thread (struct GC_stack_base *sb)
|
||||
{
|
||||
# if defined(GC_DLL) || defined(GC_INSIDE_DLL)
|
||||
/* Registered by DllMain. */
|
||||
return GC_DUPLICATE;
|
||||
# else
|
||||
/* TODO: Implement. */
|
||||
return GC_UNIMPLEMENTED;
|
||||
# endif
|
||||
}
|
||||
|
||||
void GC_register_altstack (void *stack, int stack_size, void *altstack, int altstack_size)
|
||||
{
|
||||
}
|
||||
|
||||
+1
-2
@@ -56,7 +56,6 @@ man_MANS = \
|
||||
xsd.1 \
|
||||
mono-configuration-crypto.1 \
|
||||
ccrewrite.1 \
|
||||
cccheck.1 \
|
||||
mono-symbolicate.1
|
||||
cccheck.1
|
||||
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
@@ -4,7 +4,7 @@ al, al2 \- Mono Assembly Linker
|
||||
.SH SYNOPSIS
|
||||
.B al [option] [source-files]
|
||||
.SH DESCRIPTION
|
||||
AL is the Mono assembly linker.
|
||||
AL is the Mono assembly linkder.
|
||||
.PP
|
||||
This linker is used to put together assemblies from a collection of
|
||||
modules (.netmodule files), assembly manifest files and resources.
|
||||
|
||||
@@ -20,26 +20,6 @@ revocation lists (CRL) or certificate trust lists (CTL) to/from a
|
||||
certificate store. Certificate stores are used to build and validate
|
||||
certificate chains for Authenticode(r) code signing validation and SSL
|
||||
server certificates.
|
||||
.SH STORES
|
||||
The
|
||||
.I store
|
||||
represents the certificate store to use. It can be one of the
|
||||
following:
|
||||
.TP
|
||||
.I "My"
|
||||
This is the personal certificate store.
|
||||
.TP
|
||||
.I "AddressBook"
|
||||
This is the store for other people.
|
||||
.TP
|
||||
.I "CA"
|
||||
This is a store for intermediate certificate authorities.
|
||||
.TP
|
||||
.I "Trust"
|
||||
This is for trusted roots.
|
||||
.TP
|
||||
.I "Disallowed"
|
||||
This is for untrusted roots
|
||||
.SH ACTIONS
|
||||
.TP
|
||||
.I "-list"
|
||||
|
||||
+4
-4
@@ -358,9 +358,9 @@ gmcs(1), mcs(1), mdb(1), mono(1), pkg-config(1)
|
||||
.SH BUGS
|
||||
To report bugs in the compiler, you must file them on our bug tracking
|
||||
system, at:
|
||||
http://www.mono-project.com/community/bugs/
|
||||
http://www.mono-project.com/Bugs
|
||||
.SH MAILING LIST
|
||||
The Mono Mailing lists are listed at http://www.mono-project.com/community/help/mailing-lists/
|
||||
The Mono Mailing lists are listed at http://www.mono-project.com/Mailing_Lists
|
||||
.SH MORE INFORMATION
|
||||
The Mono C# compiler was developed by Novell, Inc
|
||||
(http://www.novell.com, http) and is based on the
|
||||
@@ -368,5 +368,5 @@ ECMA C# language standard available here:
|
||||
http://www.ecma.ch/ecma1/STAND/ecma-334.htm
|
||||
.PP
|
||||
The home page for the Mono C# compiler is at
|
||||
http://www.mono-project.com/docs/about-mono/languages/csharp/ information about the
|
||||
interactive mode for C# is available in http://mono-project.com/docs/tools+libraries/tools/repl/
|
||||
http://www.mono-project.com/CSharp_Compiler information about the
|
||||
interactive mode for C# is available in http://mono-project.com/CsharpRepl
|
||||
+2
-2
@@ -54,7 +54,7 @@ httpcfg -add -port 8081 -pvk myfile.pvk -cert MyCert
|
||||
For more details on creating the certificate file and the private key,
|
||||
see the following web page:
|
||||
.PP
|
||||
http://www.mono-project.com/docs/web/using-clientcertificates-with-xsp/
|
||||
http://www.mono-project.com/UsingClientCertificatesWithXSP
|
||||
.SH FILES
|
||||
The certificates are stored in the ~/.mono/httplistener directory
|
||||
.SH AUTHOR
|
||||
@@ -72,4 +72,4 @@ Visit http://www.mono-project.com for details
|
||||
The private key format:
|
||||
.nf
|
||||
http://www.drh-consultancy.demon.co.uk/pvk.html
|
||||
.fi
|
||||
.fi
|
||||
@@ -78,7 +78,7 @@ version and publickeytoken.
|
||||
|
||||
.SH MAILING LISTS
|
||||
Mailing lists are listed at the
|
||||
http://www.mono-project.com/community/help/mailing-lists/
|
||||
http://www.mono-project.com/Mailing_Lists
|
||||
.SH WEB SITE
|
||||
http://www.mono-project.com
|
||||
.SH SEE ALSO
|
||||
|
||||
@@ -183,11 +183,11 @@ Restrict the compiler to use only the features available in C# 3.0
|
||||
Restrict the compiler to use only the features available in C# 4.0
|
||||
specification.
|
||||
.TP
|
||||
.I "experimental"
|
||||
.I "future"
|
||||
Enables unstable features from upcoming versions of the language.
|
||||
.PP
|
||||
Notice that this flag only restricts the language features available to
|
||||
the programmer. A version of produced assemblies can be controlled using
|
||||
the programmer. A version of produced assemblies can be controled using
|
||||
.I SDK
|
||||
option.
|
||||
.ne
|
||||
@@ -249,6 +249,29 @@ This will instruct the compiler to reference the System.* libraries
|
||||
available on a typical dotnet framework installation, notice that this
|
||||
does not include all of the Mono libraries, only the System.* ones. This
|
||||
is a convenient shortcut for those porting code.
|
||||
.TP
|
||||
.I \-pkg:olive
|
||||
Use this to reference the "Olive" libraries (the 3.0 and 3.5 extended
|
||||
libraries).
|
||||
.TP
|
||||
.I \-pkg:silver
|
||||
References the assemblies for creating Moonlight/Silverlight
|
||||
applications.
|
||||
.TP
|
||||
.I \-pkg:silverdesktop
|
||||
Use this option to create Moonlight/Silverlight applications that
|
||||
target the desktop. This option allows developers to consume the
|
||||
Silverlight APIs with the full 2.0 profile API available to them,
|
||||
unlike
|
||||
.I smcs
|
||||
it gives full access to all the APIs that are part of Mono. The only
|
||||
downside is that applications created with silverdesktop will not run
|
||||
on the browser. Typically these applications will be launched
|
||||
with the
|
||||
.I mopen
|
||||
command line tool.
|
||||
.TP
|
||||
For more details see the PACKAGE section in this document
|
||||
.ne
|
||||
.RE
|
||||
.TP
|
||||
@@ -515,13 +538,13 @@ csharp(1), mdb(1), mono(1), mopen(1), pkg-config(1), sn(1)
|
||||
.SH BUGS
|
||||
To report bugs in the compiler, you must file them on our bug tracking
|
||||
system, at:
|
||||
http://www.mono-project.com/community/bugs/
|
||||
http://www.mono-project.com/Bugs
|
||||
.SH MAILING LIST
|
||||
The Mono Mailing lists are listed at http://www.mono-project.com/community/help/mailing-lists/
|
||||
The Mono Mailing lists are listed at http://www.mono-project.com/Mailing_Lists
|
||||
.SH MORE INFORMATION
|
||||
The Mono C# compiler was developed by Novell, Inc
|
||||
(http://www.novell.com) and Xamarin Inc (http://www.xamarin.com) is based on the
|
||||
ECMA C# language standard available here:
|
||||
http://www.ecma.ch/ecma1/STAND/ecma-334.htm
|
||||
.PP
|
||||
The home page for the Mono C# compiler is at http://www.mono-project.com/docs/about-mono/languages/csharp/
|
||||
The home page for the Mono C# compiler is at http://www.mono-project.com/CSharp_Compiler
|
||||
+2
-2
@@ -198,7 +198,7 @@ file for a list of PATH values
|
||||
.I //node/@name
|
||||
values).
|
||||
.sp
|
||||
See also: http://www.mono-project.com/docs/tools+libraries/tools/monodoc/generating-documentation/
|
||||
See also: http://www.mono-project.com/Generating_Documentation
|
||||
.TP
|
||||
.I Create your documentation
|
||||
See also the
|
||||
@@ -256,4 +256,4 @@ Visit http://lists.ximian.com/mailman/listinfo/mono-docs-list for details.
|
||||
.SH WEB SITE
|
||||
See also: http://www.mono-project.com
|
||||
and
|
||||
http://www.mono-project.com/docs/tools+libraries/tools/mdassembler/
|
||||
http://www.mono-project.com/Assembler
|
||||
+1
-1
@@ -207,4 +207,4 @@ file and looks for referenced documents to create the help source.
|
||||
.TP
|
||||
Visit http://lists.ximian.com/mailman/listinfo/mono-docs-list for details.
|
||||
.SH WEB SITE
|
||||
See also: http://www.mono-project.com/docs/tools+libraries/tools/mdoc/
|
||||
See also: http://www.mono-project.com/mdoc
|
||||
@@ -148,4 +148,4 @@ See the \fICREF FORMAT\fR section of \fBmdoc\fR(5) for more information.
|
||||
.TP
|
||||
Visit http://lists.ximian.com/mailman/listinfo/mono-docs-list for details.
|
||||
.SH WEB SITE
|
||||
Visit http://www.mono-project.com/docs/tools+libraries/tools/mdoc/ for details
|
||||
Visit http://www.mono-project.com/mdoc for details
|
||||
@@ -34,4 +34,4 @@ Display a help message and exit.
|
||||
.TP
|
||||
Visit http://lists.ximian.com/mailman/listinfo/mono-docs-list for details.
|
||||
.SH WEB SITE
|
||||
Visit http://www.mono-project.com/docs/tools+libraries/tools/mdoc/ for details
|
||||
Visit http://www.mono-project.com/mdoc for details
|
||||
+1
-1
@@ -51,4 +51,4 @@ documentation within that directory, recursively), use:
|
||||
.TP
|
||||
Visit http://lists.ximian.com/mailman/listinfo/mono-docs-list for details.
|
||||
.SH WEB SITE
|
||||
Visit http://www.mono-project.com/docs/tools+libraries/tools/mdoc/ for details
|
||||
Visit http://www.mono-project.com/mdoc for details
|
||||
+1
-1
@@ -195,4 +195,4 @@ mdoc-validate(1)
|
||||
.TP
|
||||
Visit http://lists.ximian.com/mailman/listinfo/mono-docs-list for details.
|
||||
.SH WEB SITE
|
||||
Visit http://www.mono-project.com/docs/tools+libraries/tools/mdoc/ for details
|
||||
Visit http://www.mono-project.com/mdoc for details
|
||||
@@ -11,7 +11,7 @@ longer necessary, but the metadata still is.
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) 2008 Novell, Inc (http://www.novell.com)
|
||||
.SH MAILING LISTS
|
||||
Mailing lists are listed at http://www.mono-project.com/community/help/mailing-lists/
|
||||
Mailing lists are listed at http://www.mono-project.com/Mailing_Lists
|
||||
.SH LICENSE
|
||||
mono-cil-strip is licensed under the MIT/X11 license. Please read the accompayning
|
||||
MIT.X11 file for details.
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
.\"
|
||||
.\" mono-symbolicate manual page.
|
||||
.\" Copyright 2015 Xamarin
|
||||
.\" Author:
|
||||
.\" Marcos Henrich <[email protected]>
|
||||
.\"
|
||||
.TH "mono-symbolicate" 1
|
||||
.SH NAME
|
||||
mono-symbolicate \- Mono Symbolicate Tool
|
||||
.SH SYNOPSIS
|
||||
.PP
|
||||
.B mono-symbolicate exefile stacktracesfile [directories...]
|
||||
.SH DESCRIPTION
|
||||
mono-symbolicate is a tool that converts a stack trace with <filename unknown>:0
|
||||
into one with file names and line numbers.
|
||||
.PP
|
||||
The output of calling this tool will be the provided
|
||||
.I stacktracesfile
|
||||
where <filename unknown>:0 parts are replaced by
|
||||
a file name and a line number.
|
||||
.PP
|
||||
For the tool to work it needs to load referenced assemblies, it will first look
|
||||
in the same folder as
|
||||
.I exefile
|
||||
then from one of the provided
|
||||
.I directories.
|
||||
.PP
|
||||
The tool assumes that the folder with a referenced assembly called for example
|
||||
name.dll will also include name.dll.mdb,
|
||||
if the referenced assembly is AOT compiled then the tool is also expecting to find
|
||||
name.dll.msym.
|
||||
.SH AUTHOR
|
||||
Written by Marcos Henrich
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) 2015 Xamarin.
|
||||
.SH MAILING LISTS
|
||||
Visit http://lists.ximian.com/mailman/listinfo/mono-devel-list for details.
|
||||
.SH WEB SITE
|
||||
Visit http://www.mono-project.com for details
|
||||
+1
-1
@@ -78,7 +78,7 @@ specified it reads the standard input. If
|
||||
is not specified, the output is sent to the standard output.
|
||||
.SH MAILING LISTS
|
||||
Mailing lists are listed at the
|
||||
http://www.mono-project.com/community/help/mailing-lists/
|
||||
http://www.mono-project.com/Mailing_Lists
|
||||
.SH WEB SITE
|
||||
http://www.mono-project.com
|
||||
.SH SEE ALSO
|
||||
|
||||
+87
-239
@@ -119,21 +119,10 @@ If specified, forces the generated AOT files to be bound to the
|
||||
runtime version of the compiling Mono. This will prevent the AOT
|
||||
files from being consumed by a different Mono runtime.
|
||||
.I full
|
||||
.Sp
|
||||
This is currently an experimental feature as it is not complete.
|
||||
This instructs Mono to precompile code that has historically not been
|
||||
precompiled with AOT.
|
||||
.TP
|
||||
.I data-outfile=FILE.dll.aotdata
|
||||
.Sp
|
||||
This instructs the AOT code generator to output certain data
|
||||
constructs into a separate file. This can reduce the executable
|
||||
images some five to twenty percent. Developers need to then ship the
|
||||
resulting aotdata as a resource and register a hook to load the data
|
||||
on demand by using the
|
||||
.I mono_install_load_aot_data_hook
|
||||
method.
|
||||
.TP
|
||||
.I direct-pinvoke
|
||||
.Sp
|
||||
When this option is specified, P/Invoke methods are invoked directly
|
||||
@@ -142,11 +131,6 @@ instead of going through the operating system symbol lookup operation.
|
||||
.I llvm-path=<PREFIX>
|
||||
Same for the llvm tools 'opt' and 'llc'.
|
||||
.TP
|
||||
.I gen-seq-points-file=FILE.msym
|
||||
Instructs the AOT compiler to generate offline sequence points .msym files.
|
||||
The path is optional, if none is passed then a .msym file will be generated
|
||||
next to the input assembly.
|
||||
.TP
|
||||
.I mtriple=<TRIPLE>
|
||||
Use the GNU style target triple <TRIPLE> to determine some code generation options, i.e.
|
||||
--mtriple=armv7-linux-gnueabi will generate code that targets ARMv7. This is currently
|
||||
@@ -154,21 +138,13 @@ only supported by the ARM backend. In LLVM mode, this triple is passed on to the
|
||||
llc compiler.
|
||||
.TP
|
||||
.I nimt-trampolines=[number]
|
||||
When compiling in full aot mthis data at startup
|
||||
usingode, the IMT trampolines must be precreated
|
||||
When compiling in full aot mode, the IMT trampolines must be precreated
|
||||
in the AOT image. You can add additional method trampolines with this argument.
|
||||
Defaults to 128.
|
||||
.TP
|
||||
.I nodebug
|
||||
Instructs the AOT compiler to not output any debugging information.
|
||||
.TP
|
||||
.I no-direct-calls
|
||||
This prevents the AOT compiler from generating a direct calls to a
|
||||
method. The AOT compiler usually generates direct calls for certain
|
||||
methods that do not require going through the PLT (for example,
|
||||
methods that are known to not require a hook like a static
|
||||
constructor) or call into simple internal calls.
|
||||
.TP
|
||||
.I dwarfdebug
|
||||
Instructs the AOT compiler to emit DWARF debugging information. When
|
||||
used together with the nodebug option, only DWARF debugging
|
||||
@@ -245,7 +221,7 @@ example, --tool=prefix=arm-linux-gnueabi- will make the AOT compiler run
|
||||
.I write-symbols
|
||||
Instructs the AOT compiler to emit debug symbol information.
|
||||
.PP
|
||||
For more information about AOT, see: http://www.mono-project.com/docs/advanced/aot/
|
||||
For more information about AOT, see: http://www.mono-project.com/AOT
|
||||
.RE
|
||||
.TP
|
||||
\fB--attach=[options]\fR
|
||||
@@ -333,13 +309,6 @@ Currently this merely ensures that you are running either the
|
||||
\fBMONO_ENV_OPTIONS\fR environment variable to force all of your child
|
||||
processes to use one particular kind of GC with the Mono runtime.
|
||||
.TP
|
||||
\fB--arch=32\fR, \fB--arch=64\fR
|
||||
(Mac OS X only): Selects the bitness of the Mono binary used, if
|
||||
available. If the binary used is already for the selected bitness, nothing
|
||||
changes. If not, the execution switches to a binary with the selected
|
||||
bitness suffix installed side by side (for example, '/bin/mono --arch=64'
|
||||
will switch to '/bin/mono64' iff '/bin/mono' is a 32-bit build).
|
||||
.TP
|
||||
\fB--help\fR, \fB-h\fR
|
||||
Displays usage instructions.
|
||||
.TP
|
||||
@@ -348,7 +317,7 @@ If the Mono runtime has been compiled with LLVM support (not available
|
||||
in all configurations), Mono will use the LLVM optimization and code
|
||||
generation engine to JIT or AOT compile.
|
||||
.Sp
|
||||
For more information, consult: http://www.mono-project.com/docs/advanced/mono-llvm/
|
||||
For more information, consult: http://www.mono-project.com/Mono_LLVM
|
||||
.TP
|
||||
\fB--nollvm\fR
|
||||
When using a Mono that has been compiled with LLVM support, it forces
|
||||
@@ -363,31 +332,31 @@ In general, Mono has been tuned to use the default set of flags,
|
||||
before using these flags for a deployment setting, you might want to
|
||||
actually measure the benefits of using them.
|
||||
.Sp
|
||||
The following optimization flags are implemented in the core engine:
|
||||
The following optimizations are implemented:
|
||||
.nf
|
||||
abcrem Array bound checks removal
|
||||
all Turn on all optimizations
|
||||
aot Usage of Ahead Of Time compiled code
|
||||
peephole Peephole postpass
|
||||
branch Branch optimizations
|
||||
inline Inline method calls
|
||||
cfold Constant folding
|
||||
cmov Conditional moves [arch-dependency]
|
||||
deadce Dead code elimination
|
||||
consprop Constant propagation
|
||||
copyprop Copy propagation
|
||||
fcmov Fast x86 FP compares [arch-dependency]
|
||||
float32 Perform 32-bit float arithmetic using 32-bit operations
|
||||
gshared Enable generic code sharing.
|
||||
inline Inline method calls
|
||||
intrins Intrinsic method implementations
|
||||
deadce Dead code elimination
|
||||
linears Linear scan global reg allocation
|
||||
leaf Leaf procedures optimizations
|
||||
loop Loop related optimizations
|
||||
peephole Peephole postpass
|
||||
precomp Precompile all methods before executing Main
|
||||
sched Instruction scheduling
|
||||
cmov Conditional moves [arch-dependency]
|
||||
shared Emit per-domain code
|
||||
sse2 SSE2 instructions on x86 [arch-dependency]
|
||||
sched Instruction scheduling
|
||||
intrins Intrinsic method implementations
|
||||
tailc Tail recursion and tail calls
|
||||
loop Loop related optimizations
|
||||
fcmov Fast x86 FP compares [arch-dependency]
|
||||
leaf Leaf procedures optimizations
|
||||
aot Usage of Ahead Of Time compiled code
|
||||
precomp Precompile all methods before executing Main
|
||||
abcrem Array bound checks removal
|
||||
ssapre SSA based Partial Redundancy Elimination
|
||||
sse2 SSE2 instructions on x86 [arch-dependency]
|
||||
gshared Enable generic code sharing.
|
||||
.fi
|
||||
.Sp
|
||||
For example, to enable all the optimization but dead code
|
||||
@@ -400,23 +369,6 @@ The flags that are flagged with [arch-dependency] indicate that the
|
||||
given option if used in combination with Ahead of Time compilation
|
||||
(--aot flag) would produce pre-compiled code that will depend on the
|
||||
current CPU and might not be safely moved to another computer.
|
||||
.RS
|
||||
.ne 8
|
||||
.PP
|
||||
The following optimizations are supported
|
||||
.TP
|
||||
.I float32
|
||||
Requests that the runtime performn 32-bit floating point operations
|
||||
using only 32-bits. By default the Mono runtime tries to use the
|
||||
highest precision available for floating point operations, but while
|
||||
this might render better results, the code might run slower. This
|
||||
options also affects the code generated by the LLVM backend.
|
||||
.TP
|
||||
.I inline
|
||||
Controls whether the runtime should attempt to inline (the default),
|
||||
or not inline methods invocations
|
||||
.ne
|
||||
.RE
|
||||
.TP
|
||||
\fB--runtime=VERSION\fR
|
||||
Mono supports different runtime versions. The version used depends on the program
|
||||
@@ -440,11 +392,15 @@ Using security without parameters is equivalent as calling it with the
|
||||
"cas" parameter.
|
||||
.PP
|
||||
The following modes are supported:
|
||||
.TP
|
||||
.I cas
|
||||
This allows mono to support declarative security attributes,
|
||||
e.g. execution of Code Access Security (CAS) or non-CAS demands.
|
||||
.TP
|
||||
.I core-clr
|
||||
Enables the core-clr security system, typically used for
|
||||
Moonlight/Silverlight applications. It provides a much simpler
|
||||
security system than CAS, see http://www.mono-project.com/docs/web/moonlight/
|
||||
security system than CAS, see http://www.mono-project.com/Moonlight
|
||||
for more details and links to the descriptions of this new system.
|
||||
.TP
|
||||
.I validil
|
||||
@@ -618,16 +574,6 @@ Currently this option is only supported on Linux.
|
||||
The maintainer options are only used by those developing the runtime
|
||||
itself, and not typically of interest to runtime users or developers.
|
||||
.TP
|
||||
\fB--bisect=optimization:filename\fR
|
||||
This flag is used by the automatic optimization bug bisector. It
|
||||
takes an optimization flag and a filename of a file containing a list
|
||||
of full method names, one per line. When it compiles one of the
|
||||
methods in the file it will use the optimization given, in addition to
|
||||
the optimizations that are otherwise enabled. Note that if the
|
||||
optimization is enabled by default, you should disable it with `-O`,
|
||||
otherwise it will just apply to every method, whether it's in the file
|
||||
or not.
|
||||
.TP
|
||||
\fB--break method\fR
|
||||
Inserts a breakpoint before the method whose name is `method'
|
||||
(namespace.class:methodname). Use `Main' as method name to insert a
|
||||
@@ -790,7 +736,7 @@ 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/)
|
||||
site (www.mono-project.com/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
|
||||
@@ -894,9 +840,7 @@ environment variable to limit the extent of the messages you get:
|
||||
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-threadpool" (thread pool I/O), "io-layer" (I/O layer - sockets, handles, shared memory etc)
|
||||
and "all".
|
||||
"security" (e.g. Moonlight CoreCLR support) 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
|
||||
@@ -909,27 +853,6 @@ The following is a common use to track down problems with P/Invoke:
|
||||
|
||||
.fi
|
||||
.PP
|
||||
.SH DEBUGGING WITH LLDB
|
||||
If you are using LLDB, you can use the
|
||||
.B mono.py
|
||||
script to print some internal data structures with it. To use this,
|
||||
add this to your
|
||||
.B $HOME/.lldbinit
|
||||
file:
|
||||
.nf
|
||||
command script import $PREFIX/lib/mono/lldb/mono.py
|
||||
.fi
|
||||
.PP
|
||||
Where $PREFIX is the prefix value that you used when you configured
|
||||
Mono (typically /usr).
|
||||
.PP
|
||||
Once this is done, then you can inspect some Mono Runtime data structures,
|
||||
for example:
|
||||
.nf
|
||||
(lldb) p method
|
||||
|
||||
(MonoMethod *) $0 = 0x05026ac0 [mscorlib]System.OutOfMemoryException:.ctor()
|
||||
.fi
|
||||
.SH SERIALIZATION
|
||||
Mono's XML serialization engine by default will use a reflection-based
|
||||
approach to serialize which might be slow for continuous processing
|
||||
@@ -959,12 +882,7 @@ by setting the option
|
||||
Turns off the garbage collection in Mono. This should be only used
|
||||
for debugging purposes
|
||||
.TP
|
||||
\fBHTTP_PROXY\fR
|
||||
(Also \fBhttp_proxy\fR) If set, web requests using the Mono
|
||||
Class Library will be automatically proxied through the given URL.
|
||||
Not supported on Windows, Mac OS, iOS or Android. See also \fBNO_PROXY\fR.
|
||||
.TP
|
||||
\fBLLVM_COUNT\fR
|
||||
\fBLVM_COUNT\fR
|
||||
When Mono is compiled with LLVM support, this instructs the runtime to
|
||||
stop using LLVM after the specified number of methods are JITed.
|
||||
This is a tool used in diagnostics to help isolate problems in the
|
||||
@@ -1030,15 +948,6 @@ where V is the architecture number 4, 5, 6, 7 and the options can be currently b
|
||||
|
||||
.fi
|
||||
.TP
|
||||
\fBMONO_ARM_FORCE_SOFT_FLOAT\fR
|
||||
When Mono is built with a soft float fallback on ARM and this variable is set to
|
||||
"1", Mono will always emit soft float code, even if a VFP unit is
|
||||
detected.
|
||||
.TP
|
||||
\fBMONO_DARWIN_WATCHER_MAXFDS\fR
|
||||
This is a debugging aid used to force limits on the FileSystemWatcher
|
||||
implementation in Darwin. There is no limit by default.
|
||||
.TP
|
||||
\fBMONO_DISABLE_AIO\fR
|
||||
If set, tells mono NOT to attempt using native asynchronous I/O services. In
|
||||
that case, a default select/poll implementation is used. Currently only epoll()
|
||||
@@ -1081,20 +990,6 @@ For platforms that do not otherwise have a way of obtaining random bytes
|
||||
this can be set to the name of a file system socket on which an egd or
|
||||
prngd daemon is listening.
|
||||
.TP
|
||||
\fBMONO_ENABLE_COOP\fR
|
||||
This makes the Mono runtime and the SGen garbage collector run in cooperative
|
||||
mode as opposed to run on preemptive mode. Preemptive mode is the mode
|
||||
that Mono has used historically, going back to the Boehm days, where the
|
||||
garbage collector would run at any point and suspend execution of all
|
||||
threads as required to perform a garbage collection. The cooperative mode
|
||||
on the other hand requires the cooperation of all threads to stop at a
|
||||
safe point. This makes for an easier to debug garbage collector. As
|
||||
of Mono 4.3.0 it is a work in progress, and while it works, it has not
|
||||
been used extensively. This option enabled the feature and allows us to
|
||||
find spots that need to be tuned for this mode of operation. Alternatively,
|
||||
this mode can be enabled at compile time by using the --with-cooperative-gc
|
||||
flag when calling configure.
|
||||
.TP
|
||||
\fBMONO_ENABLE_SHM\fR
|
||||
Unix only: Enable support for cross-process handles. Cross-process
|
||||
handles are used to expose process handles, thread handles, named
|
||||
@@ -1172,16 +1067,6 @@ separated list of words.
|
||||
.RS
|
||||
.ne 8
|
||||
.TP
|
||||
\fBmax-heap-size=\fIsize\fR
|
||||
Sets the maximum size of the heap. The size is specified in bytes and must
|
||||
be a power of two. The suffixes `k', `m' and `g' can be used to
|
||||
specify kilo-, mega- and gigabytes, respectively. The limit is the sum
|
||||
of the nursery, major heap and large object heap. Once the limit is reached
|
||||
the application will receive OutOfMemoryExceptions when trying to allocate.
|
||||
Not the full extent of memory set in max-heap-size could be available to
|
||||
satisfy a single allocation due to internal fragmentation. By default heap
|
||||
limits is disabled and the GC will try to use all available memory.
|
||||
.TP
|
||||
\fBnursery-size=\fIsize\fR
|
||||
Sets the size of the nursery. The size is specified in bytes and must
|
||||
be a power of two. The suffixes `k', `m' and `g' can be used to
|
||||
@@ -1190,10 +1075,19 @@ first generation (of two). A larger nursery will usually speed up the
|
||||
program but will obviously use more memory. The default nursery size
|
||||
4 MB.
|
||||
.TP
|
||||
\fBmajor=\fIcollector\fR Specifies which major collector to use.
|
||||
Options are `marksweep' for the Mark&Sweep collector, and
|
||||
`marksweep-conc' for concurrent Mark&Sweep. The non-concurrent
|
||||
Mark&Sweep collector is the default.
|
||||
\fBmajor=\fIcollector\fR
|
||||
Specifies which major collector to use. Options are `marksweep' for
|
||||
the Mark&Sweep collector, `marksweep-conc' for concurrent Mark&Sweep,
|
||||
`marksweep-par' for parallel Mark&Sweep, `marksweep-fixed' for
|
||||
Mark&Sweep with a fixed heap, and `marksweep-fixed-par' for parallel
|
||||
Mark&Sweep with a fixed heap. The Mark&Sweep collector is the default.
|
||||
.TP
|
||||
\fBmajor-heap-size=\fIsize\fR
|
||||
Sets the size of the major heap (not including the large object space)
|
||||
for the fixed-heap Mark&Sweep collector (i.e. `marksweep-fixed' and
|
||||
`marksweep-fixed-par'). The size is in bytes, with optional suffixes
|
||||
`k', `m' and `g' to specify kilo-, mega- and gigabytes, respectively.
|
||||
The default is 512 megabytes.
|
||||
.TP
|
||||
\fBsoft-heap-limit=\fIsize\fR
|
||||
Once the heap size gets larger than this size, ignore what the default
|
||||
@@ -1211,16 +1105,9 @@ to 100 percent. A value of 0 turns evacuation off.
|
||||
.TP
|
||||
\fB(no-)lazy-sweep\fR
|
||||
Enables or disables lazy sweep for the Mark&Sweep collector. If
|
||||
enabled, the sweeping of individual major heap blocks is done
|
||||
piecemeal whenever the need arises, typically during nursery
|
||||
collections. Lazy sweeping is enabled by default.
|
||||
.TP
|
||||
\fB(no-)concurrent-sweep\fR
|
||||
Enables or disables concurrent sweep for the Mark&Sweep collector. If
|
||||
enabled, the iteration of all major blocks to determine which ones can
|
||||
be freed and which ones have to be kept and swept, is done
|
||||
concurrently with the running program. Concurrent sweeping is enabled
|
||||
by default.
|
||||
enabled, the sweep phase of the garbage collection is done piecemeal
|
||||
whenever the need arises, typically during nursery collections. Lazy
|
||||
sweeping is enabled by default.
|
||||
.TP
|
||||
\fBstack-mark=\fImark-mode\fR
|
||||
Specifies how application threads should be scanned. Options are
|
||||
@@ -1275,12 +1162,6 @@ Valid values are integers between 1 and 14. Default is 2.
|
||||
Enables or disables cementing. This can dramatically shorten nursery
|
||||
collection times on some benchmarks where pinned objects are referred
|
||||
to from the major heap.
|
||||
.TP
|
||||
\fBallow-synchronous-major\fR
|
||||
This forbids the major collector from performing synchronous major collections.
|
||||
The major collector might want to do a synchronous collection due to excessive
|
||||
fragmentation. Disabling this might trigger OutOfMemory error in situations that
|
||||
would otherwise not happen.
|
||||
.ne
|
||||
.RE
|
||||
.TP
|
||||
@@ -1386,24 +1267,6 @@ sgen-gc.c. You can then use this command to explore the output
|
||||
.nf
|
||||
sgen-grep-binprot 0x1234 0x5678 < file
|
||||
.fi
|
||||
.TP
|
||||
\fBnursery-canaries\fR
|
||||
If set, objects allocated in the nursery are suffixed with a canary (guard)
|
||||
word, which is checked on each minor collection. Can be used to detect/debug
|
||||
heap corruption issues.
|
||||
|
||||
.TP
|
||||
\fBdo-not-finalize(=\fIclasses\fB)\fR
|
||||
If enabled, finalizers will not be run. Everything else will be
|
||||
unaffected: finalizable objects will still be put into the
|
||||
finalization queue where they survive until they're scheduled to
|
||||
finalize. Once they're not in the queue anymore they will be
|
||||
collected regularly. If a list of comma-separated class names is
|
||||
given, only objects from those classes will not be finalized.
|
||||
|
||||
.TP
|
||||
\fBlog-finalizers\fR
|
||||
Log verbosely around the finalization process to aid debugging.
|
||||
.ne
|
||||
.RE
|
||||
.TP
|
||||
@@ -1512,7 +1375,7 @@ libraries side-by-side with the main executable.
|
||||
.Sp
|
||||
For a complete description of recommended practices for application
|
||||
deployment, see
|
||||
http://www.mono-project.com/docs/getting-started/application-deployment/
|
||||
http://www.mono-project.com/Guidelines:Application_Deployment
|
||||
.TP
|
||||
\fBMONO_RTC\fR
|
||||
Experimental RTC support in the statistical profiler: if the user has
|
||||
@@ -1585,13 +1448,6 @@ ftps, smtps...). The default is 'nocheck', which performs no revocation check
|
||||
at all. The other possible values are 'offline', which performs CRL check (not
|
||||
implemented yet) and 'online' which uses OCSP and CRL to verify the revocation
|
||||
status (not implemented yet).
|
||||
.TP
|
||||
\fBNO_PROXY\fR
|
||||
(Also \fBno_proxy\fR) If both \fBHTTP_PROXY\fR and \fBNO_PROXY\fR are
|
||||
set, \fBNO_PROXY\fR will be treated as a comma-separated list of "bypass" domains
|
||||
which will not be sent through the proxy. Domains in \fBNO_PROXY\fR may contain
|
||||
wildcards, as in "*.mono-project.com" or "build????.local". Not supported on
|
||||
Windows, Mac OS, iOS or Android.
|
||||
.SH ENVIRONMENT VARIABLES FOR DEBUGGING
|
||||
.TP
|
||||
\fBMONO_ASPNET_NODELETE\fR
|
||||
@@ -1606,13 +1462,6 @@ Currently, the following options are supported:
|
||||
.RS
|
||||
.ne 8
|
||||
.TP
|
||||
\fBalign-small-structs\fR
|
||||
Enables small structs alignment to 4/8 bytes.
|
||||
.TP
|
||||
\fBarm-use-fallback-tls\fR
|
||||
When this option is set on ARM, a fallback TLS will be used instead
|
||||
of the default fast TLS.
|
||||
.TP
|
||||
\fBbreak-on-unverified\fR
|
||||
If this variable is set, when the Mono VM runs into a verification
|
||||
problem, instead of throwing an exception it will break into the
|
||||
@@ -1623,22 +1472,12 @@ This option can be used to get more detailed information from
|
||||
InvalidCast exceptions, it will provide information about the types
|
||||
involved.
|
||||
.TP
|
||||
\fBcheck-pinvoke-callconv\fR
|
||||
This option causes the runtime to check for calling convention
|
||||
mismatches when using pinvoke, i.e. mixing cdecl/stdcall. It only
|
||||
works on windows. If a mismatch is detected, an
|
||||
ExecutionEngineException is thrown.
|
||||
.TP
|
||||
\fBcollect-pagefault-stats\fR
|
||||
Collects information about pagefaults. This is used internally to
|
||||
track the number of page faults produced to load metadata. To display
|
||||
this information you must use this option with "--stats" command line
|
||||
option.
|
||||
.TP
|
||||
\fBdebug-domain-unload\fR
|
||||
When this option is set, the runtime will invalidate the domain memory
|
||||
pool instead of destroying it.
|
||||
.TP
|
||||
\fBdont-free-domains\fR
|
||||
This is an Optimization for multi-AppDomain applications (most
|
||||
commonly ASP.NET applications). Due to internal limitations Mono,
|
||||
@@ -1656,12 +1495,6 @@ using this feature).
|
||||
Instructs the runtime to try to use a generic runtime-invoke wrapper
|
||||
instead of creating one invoke wrapper.
|
||||
.TP
|
||||
\fBexplicit-null-checks\fR
|
||||
Makes the JIT generate an explicit NULL check on variable dereferences
|
||||
instead of depending on the operating system to raise a SIGSEGV or
|
||||
another form of trap event when an invalid memory location is
|
||||
accessed.
|
||||
.TP
|
||||
\fBgdb\fR
|
||||
Equivalent to setting the \fBMONO_XDEBUG\fR variable, this emits
|
||||
symbols into a shared library as the code is JITed that can be loaded
|
||||
@@ -1672,11 +1505,11 @@ Automatically generates sequence points where the
|
||||
IL stack is empty. These are places where the debugger can set a
|
||||
breakpoint.
|
||||
.TP
|
||||
\fBgen-compact-seq-points\fR
|
||||
This option generates sequence points data that maps native offsets to
|
||||
IL offsets. Sequence point data is used to display IL offset in
|
||||
stacktraces. Stacktraces with IL offsets can be symbolicated using
|
||||
mono-symbolicate tool.
|
||||
\fBexplicit-null-checks\fR
|
||||
Makes the JIT generate an explicit NULL check on variable dereferences
|
||||
instead of depending on the operating system to raise a SIGSEGV or
|
||||
another form of trap event when an invalid memory location is
|
||||
accessed.
|
||||
.TP
|
||||
\fBhandle-sigint\fR
|
||||
Captures the interrupt signal (Control-C) and displays a stack trace
|
||||
@@ -1696,14 +1529,6 @@ passed to unmanaged code, and no references kept in managed code,
|
||||
which will garbage collect the code. With this option it is possible
|
||||
to track down the source of the problems.
|
||||
.TP
|
||||
\fBno-gdb-backtrace\fR
|
||||
This option will disable the GDB backtrace emitted by the runtime
|
||||
after a SIGSEGV or SIGABRT in unmanaged code.
|
||||
.TP
|
||||
\fBpartial-sharing\fR
|
||||
When this option is set, the runtime can share generated code between
|
||||
generic types effectively reducing the amount of code generated.
|
||||
.TP
|
||||
\fBreverse-pinvoke-exceptions
|
||||
This option will cause mono to abort with a descriptive message when
|
||||
during stack unwinding after an exception it reaches a native stack
|
||||
@@ -1714,25 +1539,20 @@ will skip any native stack frames in the process. This leads to
|
||||
undefined behaviour (since mono doesn't know how to process native
|
||||
frames), leaks, and possibly crashes too.
|
||||
.TP
|
||||
\fBsingle-imm-size\fR
|
||||
This guarantees that each time managed code is compiled the same
|
||||
instructions and registers are used, regardless of the size of used
|
||||
values.
|
||||
.TP
|
||||
\fBsoft-breakpoints\fR
|
||||
This option allows using single-steps and breakpoints in hardware
|
||||
where we cannot do it with signals.
|
||||
\fBno-gdb-backtrace\fR
|
||||
This option will disable the GDB backtrace emitted by the runtime
|
||||
after a SIGSEGV or SIGABRT in unmanaged code.
|
||||
.TP
|
||||
\fBsuspend-on-sigsegv\fR
|
||||
This option will suspend the program when a native SIGSEGV is received.
|
||||
This is useful for debugging crashes which do not happen under gdb,
|
||||
since a live process contains more information than a core file.
|
||||
.TP
|
||||
\fBsuspend-on-exception\fR
|
||||
This option will suspend the program when an exception occurs.
|
||||
.TP
|
||||
\fBsuspend-on-unhandled\fR
|
||||
This option will suspend the program when an unhandled exception occurs.
|
||||
\fBcheck-pinvoke-callconv\fR
|
||||
This option causes the runtime to check for calling convention
|
||||
mismatches when using pinvoke, i.e. mixing cdecl/stdcall. It only
|
||||
works on windows. If a mismatch is detected, an
|
||||
ExecutionEngineException is thrown.
|
||||
.ne
|
||||
.RE
|
||||
.TP
|
||||
@@ -1796,6 +1616,34 @@ as it forces all of the commands send to X11 server to be done
|
||||
synchronously. The default mode of operation is asynchronous which
|
||||
makes it hard to isolate the root of certain problems.
|
||||
.TP
|
||||
\fBMONO_GENERIC_SHARING\fR
|
||||
This environment variable controls the kind of generic sharing used.
|
||||
This variable is used by internal JIT developers and should not be
|
||||
changed in production. Do not use it.
|
||||
.Sp
|
||||
The variable controls which classes will have generic code sharing
|
||||
enabled.
|
||||
.Sp
|
||||
Permissible values are:
|
||||
.RS
|
||||
.TP
|
||||
.I "all"
|
||||
All generated code can be shared.
|
||||
.TP
|
||||
.I "collections"
|
||||
Only the classes in System.Collections.Generic will have its code
|
||||
shared (this is the default value).
|
||||
.TP
|
||||
.I "corlib"
|
||||
Only code in corlib will have its code shared.
|
||||
.TP
|
||||
.I "none"
|
||||
No generic code sharing will be performed.
|
||||
.RE
|
||||
.Sp
|
||||
Generic code sharing by default only applies to collections. The
|
||||
Mono JIT by default turns this on.
|
||||
.TP
|
||||
\fBMONO_XDEBUG\fR
|
||||
When the the MONO_XDEBUG env var is set, debugging info for JITted
|
||||
code is emitted into a shared library, loadable into gdb. This enables,
|
||||
@@ -1911,7 +1759,7 @@ on this subject see the http://www.mono-project.com/Config_system.web
|
||||
page.
|
||||
.SH MAILING LISTS
|
||||
Mailing lists are listed at the
|
||||
http://www.mono-project.com/community/help/mailing-lists/
|
||||
http://www.mono-project.com/Mailing_Lists
|
||||
.SH WEB SITE
|
||||
http://www.mono-project.com
|
||||
.SH SEE ALSO
|
||||
@@ -1920,6 +1768,6 @@ certmgr(1), csharp(1), mcs(1), mdb(1), monocov(1), monodis(1),
|
||||
mono-config(5), mozroots(1), mprof-report(1), pdb2mdb(1), xsp(1), mod_mono(8).
|
||||
.PP
|
||||
For more information on AOT:
|
||||
http://www.mono-project.com/docs/advanced/aot/
|
||||
http://www.mono-project.com/AOT
|
||||
.PP
|
||||
For ASP.NET-related documentation, see the xsp(1) manual page
|
||||
Loaded 100 of 14206 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user