Compare commits

..
1 Commits
Author SHA1 Message Date
nobody b0784aa131 This commit was manufactured by cvs2svn to create tag 'MCS_0_4'.
svn path=/tags/MCS_0_4/mcs/; revision=171
2001-07-16 01:07:36 +00:00
21843 changed files with 24240 additions and 4019182 deletions

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
config.h
Makefile
config.cache
stamp-h.in
config.status
aclocal.m4
configure
stamp-h
libtool
Makefile.in
config.log
-2
View File
@@ -1,3 +1 @@
Miguel de Icaza ([email protected])
Paolo Molaro ([email protected])
Dietmar Maurer ([email protected])
-485
View File
@@ -1,485 +0,0 @@
The Mono runtime is licensed under the terms of the GNU
Library General Public License, version 2.
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Library General Public License, applies to some
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the library, or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link a program with the library, you must provide
complete object files to the recipients so that they can relink them
with the library, after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright
the library, and (2) offer you this license which gives you legal
permission to copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, so that any problems introduced by others will not reflect on
the original authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
Most GNU software, including some libraries, is covered by the ordinary
GNU General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.
The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.
Because of this blurred distinction, using the ordinary General
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.
However, unrestricted linking of non-free programs would deprive the
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, while the latter only
works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also compile or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
c) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
d) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Library General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
-3568
View File
File diff suppressed because it is too large. Load diff
-101
View File
@@ -1,101 +0,0 @@
Mono is made up of many pieces of code, all of them open source, but
different pieces of Mono use different licensing terms.
For comments, corrections and updates, please contact [email protected]
* Dual Licensing
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 Novell for when 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.
Contributions to dual-licensed module require that the author
contributes the code under the terms of the MIT X11 code, or
to sign an agreement that allows Novell to redistribute the
code under other licenses.
Contributions for other modules should be under the same license
terms as the rest of the module, or under MIT X11 terms.
If you ned further information, please contact [email protected]
* The Modules
** mono/mono: the Mono VM
This code is dual licensed under the LGPL or commercial licenses.
The LGPL ensures that Mono can be used in most scenarios, but
gives Novell the flexibility to relicense the code for embedded
systems or commercial settings where the LGPL can not be used.
Contact [email protected] for details on obtaining the Mono
runtime under other terms.
** mono/eglib: Mono's X11 glib implementation
This is a minimal subset of glib that is to be licensed under
the terms of the MIT X11, this means that this code can be
used for any purposes by anyone.
** mcs/mcs, mcs/gmcs
The C# Compilers (1.0 and 2.0)
These compilers are dual licensed under the GPL and commercial
terms.
** tests
Unless explicitly stated, the tests are under the MIT X11 license.
** mcs/class
The class libraries developed by the Mono team are licensed
under the MIT X11 terms.
In addition to the class libraries developed by the Mono team,
there are a number of class libraries that we bundle as part
of the distribution that were integrated from third-parties or
that contain code that was originally licensed under different
terms, these are:
ByteFX.Data: LGPL
Npgsql: LGPL
FirebirdSql.Data.Firebird: Firebird public license.
See: mcs/class/FirebirdSql.Data.Firebird/license.txt
ICSharpCode.SharpZipLib, GPL with exceptions.
See: mcs/class/ICSharpCode.SharpZipLib/README
** mcs/tools
These are licensed under the MIT X11 license, except where the
GPL is explicitly used.
** mcs/jay
This is a port of Berkeley yacc, so it is available under the BSD
license. See the license in the individual C files for details.
** mono/man
Manual pages and Mono documentation are covered by the MIT X11 license.
* The Licenses
These are the licenses used in Mono, the files are located:
GNU GPL: details avaliable in the file mcs/LICENSE.GPL
GNU LGPL: details available in the file mcs/LICENSE.LGPL
MIT X11: text available in the file mcs/MIT.X11
MPL: text available in the file mcs/LICENSE.MPL
+1 -92
View File
@@ -1,92 +1 @@
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I .
SUBDIRS = $(libgc_dir) mono $(ikvm_native_dir) support docs data runtime scripts man samples web
# Keep in sync with SUBDIRS
## 'tools' is not normally built
DIST_SUBDIRS = libgc mono ikvm-native support docs data runtime scripts man samples web tools
vs_files = genmdesc.vcproj libmono.vcproj mono.vcproj mono.sln
EXTRA_DIST= mono.pc.in mint.pc.in mono-uninstalled.pc.in dotnet.pc.in mono-cairo.pc.in LICENSE $(vs_files)
DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
# Distribute the 'mcs' tree too
dist-hook:
test -d $(distdir)/mcs || mkdir $(distdir)/mcs
d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) PROFILE=default distdir=$$d dist-recursive
pkgconfigdir = $(libdir)/pkgconfig
if JIT_SUPPORTED
if INTERP_SUPPORTED
pkgconfig_DATA= mono.pc mint.pc dotnet.pc mono-cairo.pc
else
pkgconfig_DATA= mono.pc dotnet.pc mono-cairo.pc
endif
else
pkgconfig_DATA= mint.pc mono-cairo.pc
endif
noinst_DATA = mono-uninstalled.pc
DISTCLEANFILES= mono.pc mint.pc mono-uninstalled.pc dotnet.pc mono-cairo.pc
.PHONY: get-monolite-latest mcs-do-compiler-tests compiler-tests bootstrap-world
# building with monolite
mcslib = $(mcs_topdir)/class/lib
monolite = $(mcslib)/monolite
get-monolite-latest:
-rm -fr $(mcslib)/monolite-*
test ! -d $(monolite) || test ! -d $(monolite).old || rm -fr $(monolite).old
test ! -d $(monolite) || mv -f $(monolite) $(monolite).old
cd $(mcslib) && { wget -O- http://www.go-mono.com/daily/monolite-latest.tar.gz | gzip -d | tar xf - ; }
cd $(mcslib) && mv -f monolite-* monolite
compiler-tests: mcs-do-clean
$(MAKE) all
$(MAKE) mcs-do-compiler-tests
compiler-tests-net_2_0:
-rm -f $(mcs_topdir)/build/common/Consts.cs.save
-mv -f $(mcs_topdir)/build/common/Consts.cs $(mcs_topdir)/build/common/Consts.cs.save
cd $(mcs_topdir) && $(MAKE) PROFILE=net_2_0_bootstrap clean
cd $(mcs_topdir) && $(MAKE) PROFILE=net_2_0 clean
-mv -f $(mcs_topdir)/build/common/Consts.cs.save $(mcs_topdir)/build/common/Consts.cs
$(MAKE) all
$(MAKE) build_profiles=net_2_0 mcs-do-compiler-tests
bootstrap-world: compiler-tests
$(MAKE) install
bootstrap-world-net_2_0: compiler-tests-net_2_0
$(MAKE) install
# internal targets
mcs-do-clean:
cd runtime && $(MAKE) clean-local
cd mono/tests && $(MAKE) clean
mcs-do-compiler-tests:
cd runtime && $(MAKE) test_select='TEST_SUBDIRS="tests errors"' check-local
cd mono/tests && $(MAKE) check
win32getdeps:
wget http://www.go-mono.com/archive/pkgconfig-0.11-20020310.zip
wget http://www.go-mono.com/archive/glib-2.0.4-20020703.zip
wget http://www.go-mono.com/archive/glib-dev-2.0.4-20020703.zip
wget http://www.go-mono.com/archive/libiconv-1.7.zip
wget http://www.go-mono.com/archive/libiconv-dev-1.7.zip
wget http://www.go-mono.com/archive/libintl-0.10.40-20020101.zip
unzip -n -d / pkgconfig-0.11-20020310.zip
unzip -n -d / glib-2.0.4-20020703.zip
unzip -n -d / glib-dev-2.0.4-20020703.zip
unzip -n -d / libiconv-1.7.zip
unzip -n -d / libiconv-dev-1.7.zip
unzip -n -d / libintl-0.10.40-20020101.zip
win32setup:
makensis /DMILESTONE=$(VERSION) /DSOURCE_INSTALL_DIR=$(SOURCE_INSTALL_DIR) /DBUILDNUM=$(BUILDNUM) monowiz.win32.nsi
bootstrap: all
@echo "*** 'make bootstrap' is obsolete. Just run 'make' to perform a combined mono+mcs build"
exit 1
SUBDIRS = mono doc
+10 -5
View File
@@ -1,8 +1,13 @@
Release notes for Mono are hosted on the web, please see:
2001-07-12 Miguel de Icaza <[email protected]>
http://www.go-mono.com/archive/VERSION
New XSLT file from Sergey Chaban for CIL opcodes
Where version is the version of this Mono package, for example:
http://www.go-mono.com/archive/1.1.9
Paolo got the beginning of an interpreter in.
Further work on the dissasembler.
Fix various parts of the metadata library
2001-05-30 Miguel de Icaza <[email protected]>
Project started
+4 -392
View File
@@ -1,396 +1,8 @@
This is MonoNet.
This is Mono.
Ximian's portable implementation of .NET
1. Installation
2. Using Mono
3. Directory Roadmap
1. Compilation and Installation
===============================
a. Build Requirements
---------------------
To build Mono, you will need the following components:
* pkg-config
Available from: http://www.freedesktop.org/Software/pkgconfig
* glib 2.4
Available from: http://www.gtk.org/
On Itanium, you must obtain libunwind:
http://www.hpl.hp.com/research/linux/libunwind/download.php4
On Solaris, 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.
On Solaris, make sure that you use the GNU toolchain to build the software.
Optional dependencies:
* libgdiplus
If you want to get support for System.Drawing, you will need to get
Libgdiplus.
* libzlib
This library and the development headers are required for compression
file support in the 2.0 profile.
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, 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
c. Building the software from SVN
---------------------------------
If you are building the software from SVN, make sure that you
have up-to-date mcs and mono sources:
svn co svn+ssh://[email protected]/source/trunk/mono
svn co svn+ssh://[email protected]/source/trunk/mcs
Then, go into the mono directory, and configure:
cd mono
./autogen.sh --prefix=/usr/local
make
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, 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.
You can also try a slightly more risky approach: this may not work,
so start from the released tarball as detailed above.
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 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
To ensure that you're using the 'monolite' distribution, you can
also try passing EXTERNAL_MCS=false on the make command-line.
Testing and Installation
------------------------
You can run (part of) the mono and mcs testsuites 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 testsuite failures. As a sanity check, you
can compare the failures you got with
http://go-mono.com/tests/displayTestResults.php
You can now install mono with:
make install
Failure to follow these steps may result in a broken installation.
d. Common Configuration Options
-------------------------------
The following are the configuration options that someone
building Mono might want to use:
--with-gc=[boehm, included, sgen, none]
Selects the garbage collector engine to use, the
default is the "included" value.
included:
This is the default value, and its
the most feature complete, it will allow Mono
to use typed allocations and support the
debugger.
It is essentially a slightly modified Boehm GC
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.
sgen:
The under-development Generational GC for
Mono, do not use this in production.
none:
Disables the inclusion of a garbage
collector.
--with-tls=__thread,pthread
Controls how Mono should access thread local storage,
pthread forces Mono to use the pthread APIs, while
__thread uses compiler-optimized access to it.
Although __thread is faster, it requires support from
the compiler, kernel and libc. Old Linux systems do
not support with __thread.
This value is typically pre-configured and there is no
need to set it, unless you are trying to debug a
problem.
--with-sigaltstack=yes,no
This controls whether Mono will install a special
signal handler to handle stack overflows. If set to
"yes", it will turn stack overflows into the
StackOverflowException. Otherwise when a stack
overflow happens, your program will receive a
segmentation fault.
The configure script will try to detect if your
operating system supports this. Some older Linux
systems do not support this feature, or you might want
to override the auto-detection.
--with-static-mono=yes,no
This controls whether `mono' should link against a
static library (libmono.a) or a shared library
(libmono.so).
This defaults to yes, and will improve the performance
of the `mono' program.
This only affects the `mono' binary, the shared
library libmono.so will always be produced for
developers that want to embed the runtime in their
application.
--with-xen-opt=yes,no
The default value for this is `yes', and it makes Mono
generate code which might be slightly slower on
average systems, but the resulting executable will run
faster under the Xen virtualization system.
--with-large-heap=yes,no
Enable support for GC heaps larger than 3GB.
This value is set to `no' by default.
--with-ikvm-native=yes,no
Controls whether the IKVM JNI interface library is
built or not. This is used if you are planning on
using the IKVM Java Virtual machine with Mono.
This defaults to `yes'.
--with-preview=yes,no
Whether you want to build libraries that are still not
completed (The 2.0 APIs). It defaults to `yes'.
--with-libgdiplus=installed,sibling,<path>
This is used to configure where should Mono look for
libgdiplus when running the System.Drawing tests.
It defaults to `installed', which means that the
library is available to Mono through the regular
system setup.
`sibling' can be used to specify that a libgdiplus
that resides as a sibling of this directory (mono)
should be used.
Or you can specify a path to a libgdiplus.
--enable-minimal=LIST
Use this feature to specify optional runtime
components that you might not want to include. This
is only useful for developers embedding Mono that
require a subset of Mono functionality.
The list is a comma-separated list of components that
should be removed, these are:
aot:
Disables support for the Ahead of Time
compilation.
profiler:
Disables support for the default profiler.
decimal:
Disables support for System.Decimal.
pinvoke:
Support for Platform Invocation services,
disabling this will drop support for any
libraries using DllImport.
debug:
Drop debugging support.
reflection_emit:
Drop System.Reflection.Emit support
large_code:
Disables support for large assemblies.
logging:
Disables support for debug logging.
com:
Disables COM support.
ssa:
Disables compilation for the SSA optimization
framework, and the various SSA-based
optimizations.
generics:
Generics support. Disabling this will not
allow Mono to run any 2.0 libraries or
code that contains generics.
--disable-dev-random
Mono uses /dev/random to obtain good random data for
any source that requires random numbers. If your
system does not support this, you might want to
disable it.
There are a number of runtime options to control this
also, see the man page.
2. Using Mono
=============
Once you have installed the software, you can run a few programs:
* runtime engine
mono program.exe
* C# compiler
mcs program.cs
* CIL Disassembler
monodis program.exe
See the man pages for mono(1), mint(1), monodis(1) and mcs(2)
for further details.
3. Directory Roadmap
====================
docs/
Technical documents about the Mono runtime.
data/
Configuration files installed as part of the Mono runtime.
mono/
The core of the Mono Runtime.
metadata/
The object system and metadata reader.
mini/
The Just in Time Compiler.
dis/
CIL executable Disassembler
cli/
Common code for the JIT and the interpreter.
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.
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.
----------
To edit the go-mono website, see doc/README.
-120
View File
@@ -1,120 +0,0 @@
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
-38
View File
@@ -1,38 +0,0 @@
#undef HAVE_INET_PTON
#undef HAVE_INET_ATON
#undef HAVE_MSG_NOSIGNAL
#undef HAVE_SOL_IP
#undef HAVE_SOL_TCP
#undef HAVE_SOL_IPV6
#undef HAVE_IP_PKTINFO
#undef HAVE_IPV6_PKTINFO
#undef HAVE_STRUCT_IP_MREQN
#undef HAVE_STRUCT_IP_MREQ
#undef HAVE_PTHREAD_MUTEX_TIMEDLOCK
#undef USE_MONO_MUTEX
#undef HAVE_LARGE_FILE_SUPPORT
#undef HAVE_NEW_ICONV
#undef NAME_DEV_RANDOM
#undef HAVE_CRYPT_RNG
#undef HAVE_BOEHM_GC
#undef USE_INCLUDED_LIBGC
#undef DISABLE_SHARED_HANDLES
#undef HAVE_TIMEZONE
#undef HAVE_TM_GMTOFF
#undef MONO_SIZEOF_SUNPATH
#undef MONO_ZERO_ARRAY_LENGTH
#undef PTHREAD_POINTER_ID
#undef HAVE_GC_H
#undef HAVE_GC_GCJ_MALLOC
#undef HAVE_GC_ENABLE
#undef WITH_BUNDLE
#undef HAVE_GETHOSTBYNAME2_R
#undef HAVE_ICU
#undef HAVE_KW_THREAD
#undef HAVE_SIGNBIT
#undef USE_MACH_SEMA
#undef HAVE_SOCKLEN_T
#undef HAVE_TRUNCL
#undef HAVE_AINTL
#undef HAVE_SCANDIR
#undef HAVE_WORKING_SIGALTSTACK
+6 -142
View File
@@ -1,142 +1,6 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
# Ripped off from GNOME macros version
DIE=0
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
if [ -n "$MONO_PATH" ]; then
# from -> /mono/lib:/another/mono/lib
# to -> /mono /another/mono
for i in `echo ${MONO_PATH} | tr ":" " "`; do
i=`dirname ${i}`
if [ -n "{i}" -a -d "${i}/share/aclocal" ]; then
ACLOCAL_FLAGS="-I ${i}/share/aclocal $ACLOCAL_FLAGS"
fi
if [ -n "{i}" -a -d "${i}/bin" ]; then
PATH="${i}/bin:$PATH"
fi
done
export PATH
fi
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`autoconf' installed to compile Mono."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
if [ -z "$LIBTOOL" ]; then
LIBTOOL=`which glibtool 2>/dev/null`
if [ ! -x "$LIBTOOL" ]; then
LIBTOOL=`which libtool`
fi
fi
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`libtool' installed to compile Mono."
echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
}
grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
(gettext --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`gettext' installed to compile Mono."
echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`automake' installed to compile Mono."
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
NO_AUTOMAKE=yes
}
# if no automake, don't bother testing for aclocal
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: Missing \`aclocal'. The version of \`automake'"
echo "installed doesn't appear recent enough."
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
if test "$DIE" -eq 1; then
exit 1
fi
if test -z "$*"; then
echo "**Warning**: I am going to run \`configure' with no arguments."
echo "If you wish to pass any to it, please specify them on the"
echo \`$0\'" command line."
echo
fi
case $CC in
xlc )
am_opt=--include-deps;;
esac
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
if test -z "$NO_LIBTOOLIZE" ; then
echo "Running libtoolize..."
${LIBTOOL}ize --force --copy
fi
fi
echo "Running aclocal $ACLOCAL_FLAGS ..."
aclocal $ACLOCAL_FLAGS || {
echo
echo "**Error**: aclocal failed. This may mean that you have not"
echo "installed all of the packages you need, or you may need to"
echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
echo "for the prefix where you installed the packages whose"
echo "macros were not found"
exit 1
}
if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
echo "Running autoheader..."
autoheader || { echo "**Error**: autoheader failed."; exit 1; }
fi
echo "Running automake --gnu $am_opt ..."
automake --add-missing --gnu $am_opt ||
{ echo "**Error**: automake failed."; exit 1; }
echo "Running autoconf ..."
autoconf || { echo "**Error**: autoconf failed."; exit 1; }
if test -d $srcdir/libgc; then
echo Running libgc/autogen.sh ...
(cd $srcdir/libgc ; NOCONFIGURE=1 ./autogen.sh "$@")
echo Done running libgc/autogen.sh ...
fi
conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
if test x$NOCONFIGURE = x; then
echo Running $srcdir/configure $conf_flags "$@" ...
$srcdir/configure $conf_flags "$@" \
&& echo Now type \`make\' to compile $PKG_NAME || exit 1
else
echo Skipping configure process.
fi
libtoolize --automake
automake -a
autoheader
aclocal $ACLOCAL_FLAGS
autoconf
./configure $*
+10 -2016
View File
File diff suppressed because it is too large. Load diff
-10
View File
@@ -1,10 +0,0 @@
SUBDIRS = net_1_1 net_2_0
monodir = $(sysconfdir)/mono
EXTRA_DIST = config.in \
browscap.ini mono.supp README
mono_DATA = config \
browscap.ini
-20
View File
@@ -1,20 +0,0 @@
Files in this directory:
config.in, config:
These files are installed into $prefix/etc/mono and
contain the global mappings of dllnames into native
library names.
browscap.ini
This file contains the browser capabilty database,
this is used by ASP.NET to determine in a per-browser
basis what kind of features it can depend on when
producing the HTML code.
mono.supp
This is a valgrind data file, it lists the warnings
that should be supressed when reporting Mono-related
errors.
net_1_1 and net_2_0
They contain profile-specific data files
-14679
View File
File diff suppressed because it is too large. Load diff
-18
View File
@@ -1,18 +0,0 @@
<configuration>
<dllmap dll="cygwin1.dll" target="@LIBC@" />
<dllmap dll="libc" target="@LIBC@" />
<dllmap dll="intl" target="@INTL@" />
<dllmap dll="libintl" target="@INTL@" />
<dllmap dll="libxslt.dll" target="libxslt@libsuffix@" />
<dllmap dll="libmySQL.dll" target="libmysqlclient@libsuffix@" />
<dllmap dll="odbc32.dll" target="libodbc@libsuffix@" />
<dllmap os="osx" dll="odbc32.dll" target="libiodbc.dylib" />
<dllmap dll="oci" target="libclntsh@libsuffix@" os="!windows"/>
<dllmap dll="db2cli" target="libdb2_36@libsuffix@" />
<dllmap dll="msvcrt" target="@LIBC@" />
<dllmap dll="MonoPosixHelper" target="libMonoPosixHelper@libsuffix@" />
<dllmap dll="sqlite" target="@SQLITE@" />
<dllmap dll="sqlite3" target="@SQLITE3@" />
<dllmap dll="libX11" target="@X11@" />
<dllmap dll="libcairo-2.dll" target="libcairo.so.2" />
</configuration>
-40
View File
@@ -1,40 +0,0 @@
##
## mono-specific suppressions (Boehm-GC) for use with valgrind
##
{
mono - Conditional jump or move depends on uninitialised value
Memcheck:Cond
fun:GC_*
fun:*
obj:*mono
}
{
mono - Use of uninitialized value of size 4
Memcheck:Value4
fun:GC_*
fun:*
obj:*mono
}
{
mono - Use of uninitialized value of size 8
Memcheck:Value8
fun:GC_*
fun:*
obj:*mono
}
{
mono - Use of uninitialized value of size 1
Memcheck:Value1
fun:GC_*
fun:*
obj:*mono
}
{
mono - Invalid read of size 4
Memcheck:Addr4
fun:GC_*
fun:*
obj:*mono
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
-8
View File
@@ -1,8 +0,0 @@
monodir = $(sysconfdir)/mono/1.0
EXTRA_DIST = machine.config \
DefaultWsdlHelpGenerator.aspx
mono_DATA = machine.config \
DefaultWsdlHelpGenerator.aspx
-239
View File
@@ -1,239 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="appSettings" type="System.Configuration.NameValueFileSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="system.diagnostics" type="System.Diagnostics.DiagnosticsConfigurationHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="system.runtime.remoting" type="System.Configuration.IgnoreSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
<sectionGroup name="system.web">
<section name="httpHandlers"
type="System.Web.Configuration.HttpHandlersSectionHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="httpModules"
type="System.Web.Configuration.HttpModulesConfigurationHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="machineKey"
type="System.Web.Configuration.MachineKeyConfigHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="authentication"
type="System.Web.Configuration.AuthenticationConfigHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="authorization"
type="System.Web.Configuration.AuthorizationConfigHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="globalization"
type="System.Web.Configuration.GlobalizationConfigurationHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="sessionState"
type="System.Web.SessionState.SessionStateSectionHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="trace"
type="System.Web.Configuration.TraceConfigurationHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="webServices"
type="System.Web.Services.Configuration.WebServicesConfigurationSectionHandler, System.Web.Services, Version=1.0.5000.0 Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="webControls"
type="System.Web.Configuration.WebControlsSectionHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="compilation"
type="System.Web.Configuration.CompilationConfigurationHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="httpRuntime"
type="System.Web.Configuration.HttpRuntimeConfigurationHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="customErrors"
type="System.Web.Configuration.CustomErrorsConfigHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="pages"
type="System.Web.Configuration.PagesConfigurationHandler, System.Web, Version=1.0.5000.0, Culture=neutral" />
<section name="clientTarget"
type="System.Web.Configuration.ClientTargetSectionHandler, System.Web, Version=1.0.5000.0, Culture=neutral" />
</sectionGroup>
<sectionGroup name="system.net">
<section name="settings"
type="System.Net.Configuration.NetConfigurationHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="connectionManagement"
type="System.Net.Configuration.ConnectionManagementHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="authenticationModules"
type="System.Net.Configuration.NetAuthenticationModuleHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="defaultProxy"
type="System.Net.Configuration.DefaultProxyHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="webRequestModules"
type="System.Net.Configuration.WebRequestModuleHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</sectionGroup>
<section name="system.drawing" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
<system.net>
<connectionManagement>
<add address="*" maxconnection="2" />
</connectionManagement>
<authenticationModules>
<add type="System.Net.BasicClient, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add type="System.Net.DigestClient, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add type="System.Net.NtlmClient, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</authenticationModules>
<defaultProxy>
<proxy
usesystemdefault = "true"
bypassonlocal = "true"
/>
<!-- proxyaddress can also be set -->
</defaultProxy>
<webRequestModules>
<add prefix="http" type="System.Net.HttpRequestCreator, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="https" type="System.Net.HttpRequestCreator, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</webRequestModules>
<settings>
<ipv6 enabled="false"/>
</settings>
</system.net>
<system.web>
<httpHandlers>
<add verb="*" path="Trace.axd" type="System.Web.Handlers.TraceHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.asmx" validate="false" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.ashx" type="System.Web.UI.SimpleHandlerFactory, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="GET" path="WebResource.axd" type="System.Web.Handlers.AssemblyResourceLoader, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.asax" type="System.Web.HttpForbiddenHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.ascx" type="System.Web.HttpForbiddenHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.config" type="System.Web.HttpForbiddenHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.Config" type="System.Web.HttpForbiddenHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.cs" type="System.Web.HttpForbiddenHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.dll" type="System.Web.HttpForbiddenHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.rem" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
<add verb="*" path="*.soap" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
<add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*" type="System.Web.HttpMethodNotAllowedHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</httpHandlers>
<httpModules>
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="Session" type="System.Web.SessionState.SessionStateModule, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</httpModules>
<authentication mode="Forms">
<forms name=".MONOAUTH" loginUrl="login.aspx" protection="All" timeout="30" path="/">
<credentials passwordFormat="Clear">
<!--<user name="gonzalo" password="gonz"/>-->
</credentials>
</forms>
</authentication>
<machineKey validationKey="AutoGenerate" decryptionKey="AutoGenerate" validation="SHA1" />
<globalization requestEncoding="utf-8"
responseEncoding="utf-8"
fileEncoding="utf-8"/>
<!--
culture="en-US"
uiculture="en-US" />
-->
<sessionState mode="InProc" />
<webServices>
<protocols>
<add name="HttpSoap"/>
<add name="HttpPost"/>
<add name="HttpGet"/>
<add name="Documentation"/>
</protocols>
<wsdlHelpGenerator href="DefaultWsdlHelpGenerator.aspx" />
</webServices>
<webControls clientScriptsLocation="/web_scripts" />
<compilation debug="false" defaultLanguage="c#" explicit="true" strict="false" >
<compilers>
<compiler language="cs;c#;csharp" extension=".cs" warningLevel="1" compilerOptions=""
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
warningLevel="1" compilerOptions=""
type="Microsoft.VisualBasic.VBCodeProvider, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</compilers>
<assemblies>
<!--<add assembly="mscorlib" /> -->
<add assembly="System" />
<add assembly="System.Xml" />
<add assembly="System.Data" />
<add assembly="System.Web" />
<add assembly="System.Web.Services" />
<add assembly="System.Drawing" />
<add assembly="*" /> <!-- Add assemblies in bin directory -->
</assemblies>
</compilation>
<!--
RequestLengthDiskThreshold is a 2.0 feature that we
enable for 1.x too.
-->
<httpRuntime executionTimeout="90"
maxRequestLength="4096"
requestLengthDiskThreshold="256"
useFullyQualifiedRedirectUrl="false"
minFreeThreads="8"
minLocalRequestFreeThreads="4"
appRequestQueueLimit="100" />
<pages buffer="true"
enableSessionState="true"
autoEventWireup="true"
validateRequest="true" />
<clientTarget>
<add alias="ie5" userAgent="Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)" />
<add alias="ie4" userAgent="Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 4.0)" />
<add alias="uplevel" userAgent="Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 4.0)" />
<add alias="downlevel" userAgent="Unknown" />
</clientTarget>
</system.web>
<system.runtime.remoting>
<application>
<channels>
<channel ref="http client" displayName="http client (delay loaded)" delayLoadAsClientChannel="true" />
<channel ref="tcp client" displayName="tcp client (delay loaded)" delayLoadAsClientChannel="true" />
</channels>
</application>
<channels>
<channel id="http" type="System.Runtime.Remoting.Channels.Http.HttpChannel, System.Runtime.Remoting, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="http client" type="System.Runtime.Remoting.Channels.Http.HttpClientChannel, System.Runtime.Remoting, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="http server" type="System.Runtime.Remoting.Channels.Http.HttpServerChannel, System.Runtime.Remoting, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="tcp" type="System.Runtime.Remoting.Channels.Tcp.TcpChannel, System.Runtime.Remoting, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="tcp client" type="System.Runtime.Remoting.Channels.Tcp.TcpClientChannel, System.Runtime.Remoting, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="tcp server" type="System.Runtime.Remoting.Channels.Tcp.TcpServerChannel, System.Runtime.Remoting, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</channels>
<channelSinkProviders>
<clientProviders>
<formatter id="soap" type="System.Runtime.Remoting.Channels.SoapClientFormatterSinkProvider, System.Runtime.Remoting, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<formatter id="binary" type="System.Runtime.Remoting.Channels.BinaryClientFormatterSinkProvider, System.Runtime.Remoting, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</clientProviders>
<serverProviders>
<formatter id="soap" type="System.Runtime.Remoting.Channels.SoapServerFormatterSinkProvider, System.Runtime.Remoting, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<formatter id="binary" type="System.Runtime.Remoting.Channels.BinaryServerFormatterSinkProvider, System.Runtime.Remoting, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<provider id="wsdl" type="System.Runtime.Remoting.MetadataServices.SdlChannelSinkProvider, System.Runtime.Remoting, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</serverProviders>
</channelSinkProviders>
</system.runtime.remoting>
<appSettings>
<!--<add key="yourkey" value="your value" /> -->
<!--<remove key="a key defined higher in the hierarchy" /> -->
<!--<clear/> Removes all defined settings -->
</appSettings>
<system.diagnostics>
<trace autoflush="false" indentsize="4" />
</system.diagnostics>
<system.drawing>
</system.drawing>
<mscorlib>
<cryptographySettings>
<cryptoNameMapping>
<cryptoClasses>
<cryptoClass monoMD2="Mono.Security.Cryptography.MD2Managed, Mono.Security, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
</cryptoClasses>
<nameEntry name="MD2" class="monoMD2" />
</cryptoNameMapping>
<oidMap>
<oidEntry OID="1.2.840.113549.2.2" name="MD2" />
</oidMap>
</cryptographySettings>
</mscorlib>
<strongNames>
<pubTokenMapping>
<!-- ECMA key -->
<map Token="b77a5c561934e089" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
<!-- Microsoft (final) key -->
<map Token="b03f5f7f11d50a3a" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
<!-- Microsoft (Web Service Enhancement) key -->
<map Token="31bf3856ad364e35" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
<!-- IBM (DB2 Data Provider) key -->
<map Token="7c307b91aa13d208" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
</pubTokenMapping>
</strongNames>
</configuration>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
-10
View File
@@ -1,10 +0,0 @@
monodir = $(sysconfdir)/mono/2.0
EXTRA_DIST = machine.config \
web.config \
DefaultWsdlHelpGenerator.aspx
mono_DATA = machine.config \
web.config \
DefaultWsdlHelpGenerator.aspx
-175
View File
@@ -1,175 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="configProtectedData" type="System.Configuration.ProtectedConfigurationSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="appSettings" type="System.Configuration.AppSettingsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="connectionStrings" type="System.Configuration.ConnectionStringsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="mscorlib" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="runtime" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="startup" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="system.codedom" type="System.CodeDom.Compiler.CodeDomConfigurationHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="system.data" type="System.Data.Common.DbProviderFactoriesConfigurationHandler, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="system.diagnostics" type="System.Diagnostics.DiagnosticsConfigurationHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="system.runtime.remoting" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
<section name="strongNames" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
<sectionGroup name="system.web" type="System.Web.Configuration.SystemWebSectionGroup, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<section name="anonymousIdentification" type="System.Web.Configuration.AnonymousIdentificationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="authentication" type="System.Web.Configuration.AuthenticationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="authorization" type="System.Web.Configuration.AuthorizationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="clientTarget" type="System.Web.Configuration.ClientTargetSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="compilation" type="System.Web.Configuration.CompilationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="customErrors" type="System.Web.Configuration.CustomErrorsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="globalization" type="System.Web.Configuration.GlobalizationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="httpHandlers" type="System.Web.Configuration.HttpHandlersSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="httpModules" type="System.Web.Configuration.HttpModulesSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="httpRuntime" type="System.Web.Configuration.HttpRuntimeSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="machineKey" type="System.Web.Configuration.MachineKeySection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="membership" type="System.Web.Configuration.MembershipSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="pages" type="System.Web.Configuration.PagesSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="profile" type="System.Web.Configuration.ProfileSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="roleManager" type="System.Web.Configuration.RoleManagerSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="sessionState" type="System.Web.Configuration.SessionStateSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="siteMap" type="System.Web.Configuration.SiteMapSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="trace" type="System.Web.Configuration.TraceSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="webControls" type="System.Web.Configuration.WebControlsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="webServices" type="System.Web.Services.Configuration.WebServicesSection, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="xhtmlConformance" type="System.Web.Services.Configuration.XhtmlConformanceSection, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<sectionGroup name="caching" type="System.Web.Configuration.SystemWebCachingSectionGroup, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<section name="cache" type="System.Web.Configuration.CacheSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="outputCache" type="System.Web.Configuration.OutputCacheSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="outputCacheSettings" type="System.Web.Configuration.OutputCacheSettingsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="sqlCacheDependency" type="System.Web.Configuration.OutputCacheSettingsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</sectionGroup>
</sectionGroup>
<sectionGroup name="system.net">
<section name="settings"
type="System.Net.Configuration.SettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="connectionManagement"
type="System.Net.Configuration.ConnectionManagementSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="authenticationModules"
type="System.Net.Configuration.NetAuthenticationModuleHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="defaultProxy"
type="System.Net.Configuration.DefaultProxySection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="webRequestModules"
type="System.Net.Configuration.WebRequestModulesSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</sectionGroup>
<section name="system.drawing" type="System.Configuration.NameValueSectionHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
<configProtectedData defaultProvider="RsaProtectedConfigurationProvider">
<providers>
<add name="RsaProtectedConfigurationProvider" type="System.Configuration.RsaProtectedConfigurationProvider, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
description="" keyContainerName="MonoFrameworkConfigurationKey" cspProviderName="" useMachineContainer="true" useOAEP="false" />
<add name="DataProtectionConfigurationProvider" type="System.Configuration.DpapiProtectedConfigurationProvider, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
description="" useMachineProtection="true" keyEntropy="" />
</providers>
</configProtectedData>
<system.net>
<connectionManagement>
<add address="*" maxconnection="2" />
</connectionManagement>
<authenticationModules>
<add type="System.Net.BasicClient, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add type="System.Net.DigestClient, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add type="System.Net.NtlmClient, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</authenticationModules>
<webRequestModules>
<add prefix="http" type="System.Net.HttpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="https" type="System.Net.HttpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</webRequestModules>
<settings>
<ipv6 enabled="false"/>
</settings>
</system.net>
<system.runtime.remoting>
<application>
<channels>
<channel ref="http client" displayName="http client (delay loaded)" delayLoadAsClientChannel="true" />
<channel ref="tcp client" displayName="tcp client (delay loaded)" delayLoadAsClientChannel="true" />
<channel ref="ipc client" displayName="ipc client (delay loaded)" delayLoadAsClientChannel="true" />
</channels>
</application>
<channels>
<channel id="http" type="System.Runtime.Remoting.Channels.Http.HttpChannel, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="http client" type="System.Runtime.Remoting.Channels.Http.HttpClientChannel, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="http server" type="System.Runtime.Remoting.Channels.Http.HttpServerChannel, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="tcp" type="System.Runtime.Remoting.Channels.Tcp.TcpChannel, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="tcp client" type="System.Runtime.Remoting.Channels.Tcp.TcpClientChannel, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="tcp server" type="System.Runtime.Remoting.Channels.Tcp.TcpServerChannel, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="ipc" type="System.Runtime.Remoting.Channels.Ipc.IpcChannel, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="ipc client" type="System.Runtime.Remoting.Channels.Ipc.IpcClientChannel, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="ipc server" type="System.Runtime.Remoting.Channels.Ipc.IpcServerChannel, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</channels>
<channelSinkProviders>
<clientProviders>
<formatter id="soap" type="System.Runtime.Remoting.Channels.SoapClientFormatterSinkProvider, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<formatter id="binary" type="System.Runtime.Remoting.Channels.BinaryClientFormatterSinkProvider, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</clientProviders>
<serverProviders>
<formatter id="soap" type="System.Runtime.Remoting.Channels.SoapServerFormatterSinkProvider, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<formatter id="binary" type="System.Runtime.Remoting.Channels.BinaryServerFormatterSinkProvider, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<provider id="wsdl" type="System.Runtime.Remoting.MetadataServices.SdlChannelSinkProvider, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</serverProviders>
</channelSinkProviders>
</system.runtime.remoting>
<appSettings>
<!--<add key="yourkey" value="your value" /> -->
<!--<remove key="a key defined higher in the hierarchy" /> -->
<!--<clear/> Removes all defined settings -->
</appSettings>
<system.diagnostics>
<trace autoflush="false" indentsize="4" />
</system.diagnostics>
<system.drawing>
</system.drawing>
<mscorlib>
<cryptographySettings>
<cryptoNameMapping>
<cryptoClasses>
<cryptoClass monoMD2="Mono.Security.Cryptography.MD2Managed, Mono.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
</cryptoClasses>
<nameEntry name="MD2" class="monoMD2" />
</cryptoNameMapping>
<oidMap>
<oidEntry OID="1.2.840.113549.2.2" name="MD2" />
</oidMap>
</cryptographySettings>
</mscorlib>
<strongNames>
<pubTokenMapping>
<!-- ECMA key -->
<map Token="b77a5c561934e089" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
<!-- Microsoft (final) key -->
<map Token="b03f5f7f11d50a3a" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
<!-- Microsoft (Web Service Enhancement) key -->
<map Token="31bf3856ad364e35" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
<!-- IBM (DB2 Data Provider) key -->
<map Token="7c307b91aa13d208" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
</pubTokenMapping>
</strongNames>
<system.web>
<membership>
<providers>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" applicationName="/" connectionStringName="LocalSqlServer" />
</providers>
</membership>
<roleManager>
<providers>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" applicationName="/" connectionStringName="LocalSqlServer" />
</providers>
</roleManager>
</system.web>
</configuration>
-121
View File
@@ -1,121 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<authorization>
<allow users="*" />
</authorization>
<httpHandlers>
<add verb="*" path="Trace.axd" type="System.Web.Handlers.TraceHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.asmx" validate="false" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.ashx" type="System.Web.UI.SimpleHandlerFactory, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="GET" path="WebResource.axd" type="System.Web.Handlers.AssemblyResourceLoader, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.master" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.resources" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.skin" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.browser" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.sitemap" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.webinfo" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.resx" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.asax" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.ascx" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.config" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.Config" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.cs" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.vb" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.csproj" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.vbproj" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.licx" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.dll" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.rem" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
<add verb="*" path="*.soap" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
<add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*" type="System.Web.HttpMethodNotAllowedHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</httpHandlers>
<httpModules>
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="RoleManager" type="System.Web.Security.RoleManagerModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="Session" type="System.Web.SessionState.SessionStateModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</httpModules>
<authentication mode="Forms">
<forms name=".MONOAUTH" loginUrl="login.aspx" protection="All" timeout="30" path="/">
<credentials passwordFormat="Clear">
<!--<user name="gonzalo" password="gonz"/>-->
</credentials>
</forms>
</authentication>
<machineKey validationKey="AutoGenerate" decryptionKey="AutoGenerate" validation="SHA1" />
<globalization requestEncoding="utf-8"
responseEncoding="utf-8"
fileEncoding="utf-8"/>
<!--
culture="en-US"
uiculture="en-US" />
-->
<sessionState mode="InProc" />
<webServices>
<protocols>
<add name="HttpSoap"/>
<add name="HttpPost"/>
<add name="HttpGet"/>
<add name="Documentation"/>
</protocols>
<wsdlHelpGenerator href="DefaultWsdlHelpGenerator.aspx" />
</webServices>
<webControls clientScriptsLocation="/web_scripts" />
<compilation debug="false" defaultLanguage="c#" explicit="true" strict="false" >
<compilers>
<compiler language="cs;c#;csharp" extension=".cs" warningLevel="1" compilerOptions=""
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
warningLevel="1" compilerOptions=""
type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</compilers>
<assemblies>
<!--<add assembly="mscorlib" /> -->
<add assembly="System" />
<add assembly="System.Xml" />
<add assembly="System.Configuration" />
<add assembly="System.Data" />
<add assembly="System.Web" />
<add assembly="System.Web.Services" />
<add assembly="System.Drawing" />
<add assembly="*" /> <!-- Add assemblies in bin directory -->
</assemblies>
<expressionBuilders>
<add expressionPrefix="Resources"
type="System.Web.Compilation.ResourceExpressionBuilder, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add expressionPrefix="ConnectionStrings"
type="System.Web.Compilation.ConnectionStringsExpressionBuilder, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add expressionPrefix="AppSettings"
type="System.Web.Compilation.AppSettingsExpressionBuilder, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</expressionBuilders>
</compilation>
<httpRuntime executionTimeout="90"
maxRequestLength="4096"
useFullyQualifiedRedirectUrl="false"
minFreeThreads="8"
minLocalRequestFreeThreads="4"
appRequestQueueLimit="100" />
<clientTarget>
<add alias="ie5" userAgent="Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)" />
<add alias="ie4" userAgent="Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 4.0)" />
<add alias="uplevel" userAgent="Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 4.0)" />
<add alias="downlevel" userAgent="Unknown" />
</clientTarget>
<siteMap enabled="false">
<providers>
<add name="AspNetXmlSiteMapProvider"
description="Default site map provider that reads in .sitemap xml files."
type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
siteMapFile="Web.sitemap" />
</providers>
</siteMap>
</system.web>
</configuration>
+3
View File
@@ -0,0 +1,3 @@
Makefile.in
Makefile
all-docs
+16
View File
@@ -0,0 +1,16 @@
WEB_FILES=
c-sharp class-library contact contributing documentation download \
faq gcc-frontend ideas index makefile passport rationale resources \
roadmap runtime status team testing thanks tools
OTHERS= pending resources-pending todo
EXTRA_DIST = $(WEB_FILES) README $(OTHERS)
all-docs: $(WEB_FILES)
cat rationale roadmap c-sharp tools class-library \
runtime documentation download faq contributing \
resources status > all-docs
webit:
(cd web; make && make push)
+17
View File
@@ -0,0 +1,17 @@
To edit the website appearance:
cd doc/web
edit template.html.in
make
To edit website content:
cd doc (this directory)
edit files carefully
cd web
make
To publish changes:
cd web
make push
+151
View File
@@ -0,0 +1,151 @@
* MCS: The Ximian C# compiler
MCS began as an experiment to learn the features of C# by
writing a large C# program. MCS is currently able to parse C#
programs and create an internal tree representation of the
program. MCS can parse itself.
Work is progressing quickly on various fronts in the C#
compiler. Recently I started using the System.Reflection API
to load system type definitions and avoid self-population of
types in the compiler and dropped my internal Type
representation in favor of using the CLI's System.Type.
** Phases of the compiler
The compiler has a number of phases:
<ul>
* Lexical analyzer: hand-coded lexical analyzer that
provides tokens to the parser.
* The Parser: the parser is implemented using Jay (A
Berkeley Yacc port to Java, that I ported to C#).
The parser does minimal work and syntax checking,
and only constructs a parsed tree.
Each language element gets its own class. The code
convention is to use an uppercase name for the
language element. So a C# class and its associated
information is kept in a "Class" class, a "struct"
in a "Struct" class and so on. Statements derive
from the "Statement" class, and Expressions from the
Expr class.
* Parent class resolution: before the actual code
generation, we need to resolve the parents and
interfaces for interface, classe and struct
definitions.
* Semantic analysis: since C# can not resolve in a
top-down pass what identifiers actually mean, we
have to postpone this decision until the above steps
are finished.
* Code generation: nothing done so far, but I do not
expect this to be hard, as I will just use
System.Reflection.Emit to generate the code.
</ul>
<a name="tasks">
** Current pending tasks
Simple tasks:
<ul>
* Array declarations are currently being ignored,
* PInvoke declarations are not supported.
* Pre-processing is not supported.
* Attribute declarations and passing currently ignored.
* Compiler does not pass around line/col information from tokenizer for error reporting.
* Jay does not work correctly with `error'
productions, making parser errors hard to point. It
would be best to port the Bison-To-Java compiler to
become Bison-to-C# compiler ([email protected]
might have more information)
</ul>
Critical tasks:
<ul>
* Resolve "base" classes and "base" interfaces for
classes, structs and interfaces.
Once this is done, we can actually do the semantic
analysis, because otherwise we do not know who our
parents are.
</ul>
Interesting tasks:
<ul>
* Finishing the JB port from Java to C#. If you are
interested in working on this, please contact Brian
Jepson (bjepson at oreilly d-o-t com).
More on JB at: <a href="http://www.cs.colorado.edu/~dennis/software/jb.html">
http://www.cs.colorado.edu/~dennis/software/jb.html</a>
JB will allow us to move from the Berkeley Yacc
based Jay to a Bison-based compiler (better error
reporting and recovery).
</ul>
** Questions and Answers
Q: Why not write a C# front-end for GCC?
A: I wanted to learn about C#, and this was an exercise in this
task. The resulting compiler is highly object-oriented, which has
lead to a very nice, easy to follow and simple implementation of
the compiler.
I found that the design of this compiler is very similar to
Guavac's implementation.
Targeting the CIL/MSIL byte codes would require to re-architecting
GCC, as GCC is mostly designed to be used for register machines.
The GCC Java engine that generates Java byte codes cheats: it does
not use the GCC backend; it has a special backend just for Java, so
you can not really generate Java bytecodes from the other languages
supported by GCC.
Q: If your C# compiler is written in C#, how do you plan on getting
this working on a non-Microsoft environment.
We will do this through an implementation of the CLI Virtual
Execution System for Unix (our JIT engine).
Q: Do you use Bison?
A: No, currently I am using Jay which is a port of Berkeley Yacc to
Java that I later ported to C#. This means that error recovery is
not as nice as I would like to, and for some reason error
productions are not being caught.
In the future I want to port one of the Bison/Java ports to C# for
the parser.
Q: How do I compile it?
A: Compiling MCS currently requires you to run my port of <a
href="http://primates.ximian.com/~miguel/code/jay.cs.tar.gz">Jay to
C#</a> on a Unix system to generate the parser, and then you need
to use Microsoft's .NET csc.exe compiler to compile the compiler.
You only need to compile the compiler compiler (C code), the
samples are Java samples that I did not port, and you do not need
them.
It might be simple to port Jay.cs to Windows, but I have not tried
this.
You might also want to look at the <a href="faq.html#gcc">GCC</a>
section on the main FAQ
+174
View File
@@ -0,0 +1,174 @@
* The Class Library
The Class Library should be compatible with Microsoft's .NET
implementation.
Please see the <a href="class-status.html">Class Status</a>
page for a status of who is working on which classes.
We will write as much code as possible in C#. We may need to
interface with code written in C to gain access to the
functionality of libraries like libart, Gtk+, and libc.
** Contributing
We welcome contributions to the the Class Library. To get
started, check the status page for information about which
APIs are being worked on, and how to get in touch with
individual maintainers.
If you want to work on a class, first check the <a
href="download.html">Classes Distribution</a> to see if it is
not implemented yet, if not, check the <a
href="class-status.html">Class Status</a> to see if someone is
already working on it, and maybe contact them.
If nobody is working on it, mail <a
href="mailto:[email protected]">[email protected]</a>
with the class you want to implement and CC <a
href="mailto:[email protected]">[email protected]</a>
** Layout
The Class Library resides in the `mcs' module in the directoy
`class'.
Each directory in the directory represents the assembly where
the code belongs to, and inside each directory we divide the
code based on the namespace they implement.
There are two cases when we should consider portability: when
we are dealing with a couple of classes only that differ from
system to system (Consider System.Net and System.IO for Win32
and Unix). In those cases we will just place the files for
example on <t>corlib/System/System.IO/Unix-Console.cs</t> and
<t>corlib/System/System.IO/Win32-Console.cs</t>.
For classes that might differ more (for example, the
implementation of Windows.Forms), we might have different
directories altogether: <t>System.Windows.Forms/Win32</t>,
<t>System.Windows.Forms/Gtk+</t> and
<t>System.Windows.Forms/Cocoa</t>.
** Using existing components from GNOME.
Our current plan is to implement the GUI tools on top of
Gtk+. The only obstacle here is that applications from Windows
might expect to be able to pull the HWND property from the
widgets and use PInvoke to call Windows functions.
** Class Library and Win32 dependencies.
There are a few spots where the Win32 foundation is exposed to
the class library (for example, the HDC and HWND properties in
the GDI+). Casual inspection suggests that these can be
safely mapped to Gdk's GC and GdkWindow pointers without
breaking anything.
The only drawback is that support for PInvoke of Win32 code
won't be available. An alternate solution would be to use
portions of Wine, or even to use Wine as our toolkit.
*** Initial GDI+ and WinForms implementation
The initial implementation will use Gtk+ as the underlying
toolkit. Since GTK+ has already been ported to many windowing
systems other than X (including frame buffer, Win32, and BeOS)
its use should cover most applications for most users.
*** Database access
We will implement ADO.NET functionality by reusing <a
href="http://www.gnome-db.org">GNOME-DB</a>. This is an ideal
choice, since GNOME-DB was implemented precisely to provide an
ADO-like system for GNOME.
*** Component Integration
We will provide a new namespace to use GNOME specific features
as well as a namespace to host Bonobo interfaces and classes
in Mono.
** Licensing
The class library will be licensed under the terms of the GNU
LGPL. Some people have pointed out that the plain LGPL is
troublesome for embedded use of the Mono class libraries. So
we are considering to use the GPL with a special exception
(like the <a
href="http://www.gnu.org/software/classpath/classpath.html">GNU
Classpath</a> project did.
The exception to the GPL would be:
<i>The library is distributed under the terms of the GNU General
Public License with the following exception:
If you link this library against your own program, then you do not
need to release the source code for that program. However, any
changes that you make to the library itself, or to any native
methods upon which the library relies, must be re-distributed in
accordance with the terms of the GPL.</i>
If you are going to contribute, please keep in mind that we
might require you to agree that Ximian might adjust the
license to enable the use of the class libraries on embedded
systems or to develop proprietary applications using Mono.
We suggest that you assign the copyright of your work to the
GNOME Foundation or the Free Software Foundation to simplify
defending the code in case it is used inappropiately.
** Class Library testing
We need to write regression tests that will verify
the correctness of the class library, compiler, and JIT
engine.
** Coding conventions
Please follow the conventions on the ECMA specification (On
the Annex Partition) for your coding your libraries.
Use 8 space tabs for writing your code (hopefully we can keep
this consistent). If you are modifying someone else's code, try
to keep the coding style similar.
For a rationale on 8 space tabs, read Linus Torvald's Coding
Style guidelines in the Linux kernel source for a rationale.
*** Missing implementation bits
If you implement a class and you are missing implementation bits,
please put in the code the word "TODO" and a description of what
is missing to be implemented.
*** Tagging buggy code
If there is a bug in your implementation tag the problem by using
the word "FIXME" in the code, together with a description of the
problem.
Do not use XXX or obscure descriptions, because otherwise people
will not be able to understand what you mean.
*** Tagging Lame specs
Sometimes the specification will be lame (consider Version.ToString (fieldCount)
where there is no way of knowing how many fields are available, making the API
not only stupid, but leading to unreliable code).
In those cases, use the keyword "LAMESPEC".
** FAQ
Frequently asked questions about the class library:
Q: I am writing a new class that overrides one of the system classes,
and I am getting a 1595 warning from the compiler. Should we use a
different namespace?
A: There is a quick solution to the problem, you can pass the command
line argument /nowarn:1595 and this will effectively let you use
your implementation of the code, while overriding the ones from the
system assemblies.
+27
View File
@@ -0,0 +1,27 @@
* Status of the various pieces of the class library
You can browse the status of the class library and see who has
registered to work on what parts of the system. These list
work-in-progress components currently.
<ul>
* Per <a href="class-status/per-assembly.html">Assembly</a>
* Per <a href="class-status/per-completion.html">Completion</a>
* Per <a href="class-status/per-maintainer.html">Maintainer</a>
* Per <a href="class-status/per-unimplemented.html">Unimplemented</a>
</ul>
A better mechanism will soon be in place, I just did this
really quickly, as we already got one duplicated implementation.
You can also download the XML <a
href="class-status/maintainers.xml">maintainers</a> file that
contains the actual maintainers list.
I am sure we can generate better reports, if you are
interested in contributing, let <a
href="mailto:[email protected]">me</a> know.
+16
View File
@@ -0,0 +1,16 @@
* Contacting the Mono team.
You can contact the Mono Team by sending e-mail to `<a
href="mailto:[email protected]">mailto:[email protected]</a>'.
You can contact the general forum of discussion by sending
e-mail to <a href="mailto:[email protected]">[email protected]</a>
You can contact me (Miguel de Icaza) by sending e-mail to <a
href="mailto:[email protected]">[email protected]</a>. My web
page is <a
href="http://primates.ximian.com/~miguel">http://primates.ximian.com/~miguel"</a>
You can also <a
href="http://www.ximian.com/about/contact.php3">reach Ximian.</a>
+53
View File
@@ -0,0 +1,53 @@
* Contributing to the Mono project
There are many ways in which you can help in the Mono project:
<ul>
* <b>Programmers:</b> You can work on a free
implementation of the <a
href="class-library.html">class libraries</a>, the
<a href="runtime.html">runtime engine</a>, <a
href="tools.html">the tools</a>, the <a
href="testing.html">testing framework</a>
* <b>Writers:</b> You can help us with writing <a
href="documentation.html">documentation</a>.
</ul>
Those are just broad things that need to be worked on, but
something that would help tremendously would be to help with
small duties in the project that need to be addressed.
** Small tasks
A few smaller tasks are here, dropped in no particular order:
<ul>
* <b>MCS compilation process:</b> Currently MCS does
not build with a single `make' command. This should
be fixed (this being part of the `Joel Test' that
software has to pass).
* <b>Mono/doc and web site:</b> They need to be
packaged up in the official `distribution'
* <b>Enthusiasts: </b>
</ul>
* Special note
If you have looked at Microsoft's implementation of .NET or
their shared source code, you may not be able to contribute
to Mono. Details will follow when we know more about this.
In general be careful when you are implementing free software
and you have access to proprietary code. We need to make sure
that we are not using someone else's copyrighted code
accidentally.
Please do not use the <b>ildasm</b> program to disassemble
proprietary code when you are planning to reimplement a class
for Mono. If you have done this, we might not be able to use
your code.
Please stick to published documentation for implementing any
classes.
+50
View File
@@ -0,0 +1,50 @@
* Documentation
Although most of the concepts from Microsoft.NET can
be applied to the completed Mono platform, we do need to
have a complete set of free documentation written specifically
for Mono.
The documentation license we have chosen is the GNU Free
Documentation License (FDL), the standard for most documents
in the free software world.
We need documentation on a number of topics:
<ul>
* The development tools (compilers, assembler tools,
language reference, design time features).
* Frequently Asked Question compilations.
* HOWTO documents.
* The Class Libraries
* Tutorials on Mono and the specifics of running it.
* A guide to Mono as compared to the Microsoft.NET
Framework SDK
</ul>
** Class Library documentation
When contributing to the Class Library effort, please use the
inline XML documentation tags to document your classes so we
can automatically generate the documentation from the class
libraries.
If you provide examples, please do not embed them into the
source code, as that will make the source code harder to read
and maintain. Instead, put examples for your code into a
subdirectory of the class libraries. Make your sample
code a full standalone application that people can compile.
Ideally the Mono documentation browser will let you edit, modify
and run the sample programs.
+44
View File
@@ -0,0 +1,44 @@
* Software Availability
The Virtual Execution System is available in package `mono'.
Currently this contains a metadata library and the
disassembler. Please reffer to our <a
href="runtime.html">Runtime</a> description for more details
on this part of the project.
The code for the C# compiler as well as the language error
test suite and the class library are in the `mcs' package, we
will move this later into `mono' itself.
The mcs compiler requires the `jay' parser generator, this is
available in module `jay'.
** Sources
Currently we will be providing CVS snapshots every day, until
we make the first tarball release.
<ul>
<a name="july-14">
<b>July 14th, 2001</b>
<ul>
* <a href="archive/jay.cs.tar.gz">archive/jay.cs.tar.gz</a>: Sources to Jay.
* <a href="archive/mcs-12-Jul-2001.tar.gz">mcs-12-Jul-2001.tar.gz</a>: CVS snapshot.
* <a href="archive/mono-0.3.tar.gz">mono-0.3.tar.gz</a>: Packaged Source Code.
</ul>
<a name="july-8">
<b>July 8th, 2001</b>
<ul>
* <a href="archive/jay.cs.tar.gz">archive/jay.cs.tar.gz</a>: Sources.
* <a href="archive/mcs-08-Jul-2001.tar.gz">mcs-08-Jul-2001.tar.gz</a>: CVS Snapshot
* <a href="archive/mono-08-Jul-2001.tar.gz">mono-08-Jul-2001.tar.gz</a>: CVS Snapshot
</ul>
</ul>
** CVS
We are trying to figure out where to put our CVS repository.
We are debating between the GNOME CVS or SourceForge. Watch
this spot.
+609
View File
@@ -0,0 +1,609 @@
** Basics
Q: Is Mono the same as Microsoft's .NET initiative?
A: It is not.
.NET is a company-wide initiative at Microsoft that
encompasses many different areas. The .NET development framework,
Passport, Biztalk, new server products, and anything that is
remotely connected to .NET gets the ".NET-stamping" treatment.
Some components of Microsoft's .NET initiative have been announced
and some others are in the works.
Mono is a project to implement several technologies developed by
Microsoft that have now been submitted to the ECMA Standards Body.
Q: What technologies are included in Mono?
A: Mono contains a number of components useful for building new
software:
<ul>
* A Common Language Infrastructure (CLI) virtual
machine that contains a class loader, Just-in-time
compiler, and a garbage collecting runtime.
* A class library that can work with any language
which works on the CLR.
* A compiler for the C# language. In the future we
might work on other compilers that target the Common
Language Runtime.
Windows has compilers that target the
virtual machine from
<a href="http://msdn.microsoft.com/net/thirdparty/default.asp#lang">a
number of languages:</a> Managed C++, Java Script,
Eiffel, Component Pascal, APL, Cobol, Oberon, Perl,
Python, Scheme, Smalltalk, Standard ML, Haskell,
Mercury and Oberon.
</ul>
The CLR and the Common Type System (CTS) enables applications and
libraries to be written in a number of languages. Classes and
methods created in one language can be used from a different
language.
This means for example that if you define a class to do algebraic
manipulation in C#, that class can be reused from any other
language that supports the CLI. You could create a class in C#,
subclass it in C++ and instantiate it in an Eiffel program.
A single object system, threading system, class libraries, and
garbage collection system can be shared across all these languages.
Q: Where can I find the specification for these technologies?
A: You can find the work-in-progress documentation from the T3G ECMA
group here:
<a href="http://www.dotnetexperts.com">http://www.dotnetexperts.com</a>
Q: Will you implement the .NET Framework SDK class libraries?
A: Yes, we will be implementing the APIs of the .NET Framework SDK
class libraries.
Q: What does Mono stand for?
A: Mono is the word for `Monkey' in Spanish. We like monkeys.
Q: When will you ship it?
A: We do not know when the code will be shipped. The more
contributions we get to the project, the sooner it will ship.
A rough estimate is that we might be able to run our C# compiler on
Linux by the end of the year. That means running the Windows
Executable generated by a Microsoft .NET compiler on the Linux
platform.
We expect that doing GUI applications will require more work on the
class libraries. That could take another six months.
Q: How can I contribute?
A: Check the <a href="contributing.html">contributing</a> section.
Q: You guys should innovate instead of copying.
A: In this particular case, we see a clear advantage in the platform
and we are interested in using the features of the CLI on open source systems.
We have decided that we should spend our limited resources towards
implementing an existing specification instead of designing and
implementing our own.
Designing and implementing our own would be possible, but it doesn't make
sense to do that just because the specification comes from a
proprietary vendor.
** Ximian
Q: Why is Ximian working on .NET?
A: We are interested in providing the best tools for programmers to
develop applications for Free Operating Systems.
For more information, read the project <a
href="rationale.html">rationale</a> page.
Q: Will Ximian be able to take on a project of this size?
A: Ximian will not be able to taken on the whole project on its own.
Mono will be a free software/open source community project, that is
the only way we can hope to implement something of this size. You
can <a href="contributing.html">contribute</a> to this effort.
Q: What pieces will Ximian be working on?
A: We will focus on building a development and execution
environment.
The idea is to get Mono to a state of that would allow
third parties to actually be able to use it real-world development.
Q: Why does Ximian even care?
A: We like the features that the CLI and its related technologies
bring to the table. An exciting addition to the developer toolkit.
The goal of Mono is to bring this technology to non-Windows
platforms (although we hope Mono will also run on Windows, for
debugging and comparative purposes).
** Licensing
Q: Will I be able to write proprietary applications that run with
Mono?
A: Yes. We will make sure that the licensing will allow developers to
create proprietary applications.
Q: What license is Mono on?
A: The C# Compiler is released under the terms of the GPL. The class
libraries will be under the LGPL or the GPL with a special
exception. The runtime libraries are under the LGPL.
Here is the exception for the class libraries:
The library is distributed under the terms of the GNU General
Public License with the following exception:
If you link this library against your own program, then you do not
need to release the source code for that program. However, any
changes that you make to the library itself, or to any native
methods upon which the library relies, must be re-distributed in
accordance with the terms of the GPL.
This is similar in spirit to <a
href="http://www.gnu.org/software/classpath/classpath.html">GNU
Classpath.</a>
Q: Will you accept code under the XXX License?
A: If the XXX License is compatible with the license we use in that
specific piece of code, then yes. If you want to use the BSD license, make
sure you use the BSD license without the advertisement clause (The
`Ousterhout License').
** Mono and .NET
Q: If applications use Mono, does that mean that I have to pay a service fee?
A: No. Mono is not related to Microsoft's initiative of
software-as-a-service.
Q: If you implement .NET, will I depend on Microsoft Passport to run my software?
A: No. The .NET Framework is a runtime infrastructure and collection
of class libraries. Passport may be required to access certain web
services written for that framework, but only if the programmer
chooses Passport as the authentication mechanism.
Q: Is .NET just a bunch of marketing slogans?
A: Although the `.NET initiative' is still quite nebulous, The .NET Framework
has been available for some time. Mono is not an implementation of the .NET
initiative, just the development framework.
Q: What is a 100% .NET application?
A: A `100% .NET application' is one that only uses the APIs defined
under the System namespace and does not use PInvoke. These
applications would in theory run unmodified on Windows, Linux,
HP-UX, Solaris, MacOS X and others.
Q: But Microsoft will release a port of the real thing under the
`Shared Source' license, why bother with anything else?
A: The Shared Source implementation will not be usable for commercial
purposes. We are working towards an implementation that will grant
a number of rights to recipients: use for any purpose,
redistribution, modification, and redistribution of modifications.
This is what we call <a
href="http://www.gnu.org/philosophy/free-sw.html">Free Software</a>
** Passport
Q: Is this a free implementation of Passport?
A: No. Passport is part of Microsoft's Hailstorm initiative. Mono
is just a runtime, a compiler and a set of class libraries.
Q: Will the System.Web.Security.PassportIdentity class, mean
that my software will depend on Passport?
A: No. That just means that applications might use that API to
contact a Passport site.
As long as your application does not use Passport, you will not
need Passport.
It might even be possible to implement that class with
a set of dummy functions, or use an alternate Passport implementation.
We do not know at this time whether the Passport protocol is
documented and whether we will be able to talk to
passport.com
Q: What is your opinion?
A: You can read my personal <a href="passport.html">opinion on
passport</a>.
** Mono and Windows
Q: Will Mono allow me to run Microsoft Office on Linux?
A: No, it will not. Microsoft Office is a Windows application. To
run Windows applications on Intel Unix systems refer to <a
href="http://www.winehq.com">the Wine Project</a>
** GNOME
Q: How is this related to GNOME?
A: In a number of ways:
* Mono will use existing
components that have been developed for GNOME when it makes
sense. For example on X systems, we will use Gtk+ and
Libart to implement Winforms and the Drawing2D API.
For database access, we will use LibGDA (not really
depending on GNOME, but related to).
* This project was born out of the need of providing improved
tools for the GNOME community.
* We would like to add support to our CLR implementation to
deal with GObjects (in GNOME 1.x, they are called
GtkObjects), and allow Mono developers to provide GObjects
or use and extend existing GObjects.
Q: Has the GNOME Foundation or the GNOME team adopted Mono?
A: Mono is too new to be adopted by those groups. We hope that the
tools that we will provide will be adopted by free software
programmers including the GNOME Foundation members and the GNOME
project generally.
Q: Should GNOME programmers switch over to Mono?
A: Mono will not be ready even within the next six months, and a
complete implementation is probably one year away.
We encourage GNOME developers to continue using the existing tools,
libraries and components. Improvements made to GNOME will have an
impact on Mono, as they will provide the "backend" for various
classes.
Q: Will Mono include compatibility with Bonobo components?
A: Yes, we will provide a set of classes for implementing and using
Bonobo components from within Mono.
** Mono and the Web
Q: Is Mono a way of running Java applets?
A: No.
** Web Services
Q: Is Mono just a new way of writing Web Services?
A: No.
Q: If this implements the SDK classes, will I be able to write and
execute .NET Web Services with this?
A: Yes, you will.
When the project is finished, you will be able to use the same
technologies that are available through the .NET Framework SDK on
Windows to write Web Services.
Q: What about Soup?
A: Soup is a library for GNOME applications to create SOAP server and
SOAP clients. You can browse the source code for soup using <a
href="http://cvs.gnome.org/bonsai">GNOME's Bonsai</a>
Q: Can I use CORBA?
A: Yes. The CLI contains enough information about a class that
exposing it to other RPC systems (like CORBA) is really simple, and
does not even require support from an object.
We will be implementing CORBA interoperation as an extension to the
Mono classes so that we can integrate with Bonobo, just like
Microsoft provides COM interoperation classes and support
mechanisms.
Q: Can I serialize my objects to other things other than XML?
A: Yes, although the serializing tools have not yet been planned, and
you would probably have to implement them yourself.
** Development Tools
Q: Will it be possible to use the CLI features without using bytecodes
or the JIT?
A: Yes. The CLI engine will be made available as a shared library.
The garbage collection engine, the threading abstraction, the
object system, the dynamic type code system and the JIT will be
available for C developers to integreate with their applications if
they wish to do so.
Q: Will you have new development tools?
A: Hopefully Free Software enthusiasts will contribute tools to
improve the developer environment. These tools could be developed
initially using Microsoft implementation of the CLI and then
executed later with Mono.
** Mono and Java
Q: What about using Java? After all there are many languages that
target the Java VM.
A: You can get very good tools for doing Java development on free
systems right now. <a href="http://www.redhat.com">Red Hat</a> has
contributed a <a href="http://gcc.gnu.org">GCC</a> <a
href="http://gcc.gnu.org/java">frontend for Java</a> that can take
Java sources or Java byte codes and generate native executables; <a
href="http://www.transvirtual.com">Transvirtual</a> has implemented
<a href="http://www.kaffe.org">Kaffe</a> a JIT engine for Java;
Intel also has a Java VM called <a
href="http://www.intel.com/research/mrl/orp">ORP</a>.
The JVM is not designed to be a general purpose virtual machine.
The Common Intermediate Language (CIL), on the other hand, is
designed to be a target for a
wide variety of programming languages, and has a set of rules
designed to be optimal for JITers.
Q: What kind of rules make the Common Intermediate Language useful for
JITers?
A: The main rule is that the stack in the CLI is not a general purpose
stack. You are not allowed to use it for other purposes than
computing values and passing arguments to functions or return
values.
At any given call or return instruction, the types on the stack
have to be the same independently of the flow of execution of your
code.
Q: I heard that the CIL is ideal for JITing and not efficient for
interpreters, is this the case?
A: The CIL is better suited to be JITed than JVM byte codes, but you
can interpret them as trivially as you can interpret JVM byte
codes.
** Extending Mono
Q: Would you allow other classes other than those in the
specification?
A: Yes. The Microsoft class collection is very big, but it is by no
means complete. It would be nice to have a port of `Camel' (the
Mail API used by Evolution inspired by Java Mail) for Mono
applications.
You might also want to look into implementing CORBA for Mono. Not
only because it would be useful, but because it sounds like a fun
thing to do, given the fact that the CLI is such a type rich
system.
For more information on extending Mono, see our <a
href="ideas.html">ideas</a> page.
** Mono and portability
Q: Will Mono only work on Linux?
A: Currently, we are doing our work on Linux-based systems and
Windows. We do not expect many Linux-isms in the code, so it
should be easy to port Mono to other UNIX variants.
Q: What about Mono on non X-based systems?
A: Our main intention at Ximian is to be able to develop GNOME
applications with Mono, but if you are interested in providing a
port of the Winform classes to other platforms (frame buffer or
MacOS X for example), we would gladly integrate them, as long
they are under a Free Software License.
** Reusing existing Code
Q: What projects will you reuse or build upon?
A: We want to get Mono in the hands of programmers soon. We are
interested in reusing existing open source software.
Q: What about Intel's research JIT framework, ORP?
A: At this time, we are investigating whether we can use elements of
ORP for Mono. ORP is a research JIT engine that has a clear
defined API that splits the JIT from the GC system and the actual
byte code implementation. It is a research product.
Q: What about using GNU Lightning?
A: We are also researching <a
href="http://www.gnu.org/software/lightning/lightning.html">GNU
Lightning</a>.
** Ximian and Microsoft
Q: Didn't Miguel de Icaza say that `Unix Sucks'?
A: Yes, he did, as a catch phrase in his opening remark on the Ottawa
Linux Symposium. His talk focused on various ways to improve Unix.
There is a paper describing some ways to improve Unix at:
<a href="http://primates.ximian.com/~miguel/bongo-bong.html">
http://primates.ximian.com/~miguel/bongo-bong.html</a>
Q: Didn't Ximian's Miguel work for Microsoft?
A: Actually, Nat Friedman (Ximian's co-founder) did work as an
intern for Microsoft for one summer but Miguel did not.
Q: Did Nat and Miguel meet at Microsoft?
A: They met online on the Linux IRC network; They met in person for
the first time in 1997.
** Mono and Microsoft
Q: How can you expect Mono to compete with Microsoft, wont this
require an effort too large?
A: You are right. Mono will never become a reality without the help
of other contributors. Ximian is a small company that can not
finish Mono alone. We will be working with members of the
community to deliver the product.
Q: Is Microsoft and Corel involved in the Mono implementation?
A: No, they are not.
Q: Are you writing Mono from the ECMA specs?
A: yes, we are writing them from the ECMA specs and the published
materials in print about .NET
** Acronyms
Q: What is the difference between CLR (Common Language Runtime) and
CLI (Common Language Infrastructure)?
A: CLI is the specification of an execution system. The Microsoft
implementation of this specification is named CLR.
Unless we come up with our own acronym, we could just call ours
also CLR, just because it would do exactly the same thing the
Microsoft implementation does.
<a name="gcc">
** Mono and GCC
Q: Should someone work on a GCC front-end to C#?
A: I would love if someone does, and we would love to help anyone that
takes on that task, but we do not have the time or expertise to
build a C# compiler with the GCC engine. I find it a lot more fun
personally to work on C# on a C# compiler, which has an intrinsic
beauty.
Q: Should someone make a GCC backend that will generate CIL images?
A: I would love to see a backend to GCC that generates CIL images. It
would provide a ton of free compilers that would generate CIL
code. This is something that people would want to look into
anyways for Windows interoperation in the future.
Q: What about making a front-end to GCC that takes CIL images and
generates native code?
A: I would love to see this, specially since GCC supports this same
feature for Java Byte Codes. You could use the metadata library
from Mono to read the byte codes (ie, this would be your
"front-end") and generate the trees that get passed to the
optimizer.
Ideally our implementation of the CLI will be available as a shared
library that could be linked with your application as its runtime
support.
Q: But would this work around the GPL in the GCC compiler and allow
people to work on non-free front-ends?
A: People can already do this by targeting the JVM byte codes (there
are about 130 compilers for various languages that target the JVM).
Q: Why are you writing a JIT engine instead of a front-end to GCC?
A: The JIT engine and runtime engine will be able to execute CIL
executables generated on Windows.
** Mono and GNU
Q: Is Mono part of the GNU project?
A: Mono is a Ximian project, that is also part of the GNU project.
** Mono and Portability
Q: Will Mono work on other variants of Unix?
A: Yes. We do not expect to add any gratuitous incompatibilities.
Q: Will Mono run on Windows?
A: Hopefully yes. Currently some parts of Mono only run on Windows
(the C# compiler is a .NET executable) and other parts have only
been compiled on Linux, but work on Windows with Cygwin.
Q: Will Mono depend on GNOME?
A: It will depend only if you are using a particular assembly (for
example, for doing GUI applications). If you are just interested
in Mono for implementing a `Hello World Enterprise P2P Web
Service', you will not need any GNOME component.
** Performance
Q: How fast will be Mono?
A: We can not predict the future, but a conservative estimate is that
it would be at least `as fast as other JIT engines'.
Now, wishfully thinking I hope that we will ship various JITs with
Mono just like Microsoft has done. A fast JITer when maximum
performance is not needed, but fast load times are important; And
an optimizing JITer that would be slower at generating code but
produce more optimal output.
The CIL has some advantages over the Java byte code: it is really
an intermediate representation and there are a number of
restrictions on how you can emit CIL code that simplify creating
better JIT engines.
For example, on the CIL the stack is not really an abstraction
available for the code generator to use at will: it is just a way
of creating a postfix representation of the parsed tree. At any
given call point or return point, the contents of the stack are
expected to contain the same object types independently of how the
instructions was reached.
** Assorted questions
Q: You say that the CLI allows multiple languages to execute on the
same environment. Isn't this the purpose of CORBA?
A: CORBA can be used for this purpose, but think of CORBA mostly as a
inter-process (local machine or remote machine) communication
system.
Think of the CLI to be targeted to interoperation of languages in
the same process, and CORBA as being a nifty addition for
out-of-process.
Sure, we have used CORBA for in-proc components, but the lack of an
ABI for in-proc components does not translate into a good framework
for in-proc systems
+9
View File
@@ -0,0 +1,9 @@
* The GCC front-end
The GCC front-end will accept input in a binary file with
codes in the Common Intermediate Language (CIL), and generate
native code.
This will allow pre-compilation and full optimization to take
place before a program is executed.
+40
View File
@@ -0,0 +1,40 @@
* Ideas
Here are a few ideas of tools, classes and projects that you
could start. More are forthcoming.
<a name="classes">
** Classes
<ul>
* Implement a JXTA protocol implementation:
<a href="http://www.jxta.org">http://www.jxta.org</a>
* Implement a Mail API, similar to Camel or JavaMail (Camel has
significant architecture features that are required on a real
mailer).
You can check the current C
<a href="http://cvs.gnome.org/bonsai/rview.cgi?dir=evolution%2Fcamel">
Camel implementation</a>.
* Interfacing to Multimedia systems. You might want
to look into the Quicktime API. I know <a
href="mailto:[email protected]">Vladimir</a> has
researched the problem before
</ul>
<a name="projects">
** Projects
<ul>
* Implement an xmlStorageSystem for the CLI:
<a href="http://www.soapware.org/xmlStorageSystem">
http://www.soapware.org/xmlStorageSystem</a>
* Build a CORBA interoperability engine for the CLR.
You do not need to do all of the work, just talking
the protocol will get us a long way (<a
href="http://www.omg.org">The OMG site</a> has the CORBA specs).
</ul>
+39
View File
@@ -0,0 +1,39 @@
** Jul 14, 2001
A <a
href="http://mail.ximian.com/archives/public/mono-list/2001-July/000399.html">new
release</a> of the
runtime, compiler and classes has been made. Get it <a href="download.html#july-14">here</a>
** Jul 12, 2001
I keep getting questions about my opinion on Passport, even when
Mono has <b>nothing</b> to do with it. I finally <a
href="passport.html">wrote something.</a>
** Jul 9, 2001
Today <a href="http://www.ximian.com">Ximian</a> announced the
launch of the Mono
project, an effort to create a free software
(sometimes called open source) implementation of the .NET
Development Framework.
If you have questions about the
project, please read our list of <a
href="faq.html">Frequently Asked Questions</a>.
You might also want to <a href="download.html">Download the
source</a> for our work so far.
You might want to <a
href="resources.html#mailing">subscribe</a> to our mono-list
and mono-announce-list
You can contact the team at: <a
href="mailto:[email protected]">[email protected]</a>
** O'Reilly
Brian posted a story on <a
href="http://www.oreillynet.com/dotnet">O'Reilly Network .NET</a>
+231
View File
@@ -0,0 +1,231 @@
* Microsoft Hailstorm and Passport
Microsoft Passport is a centralized database hosted by
Microsoft that enhances the consumer experience with the Web
by providing a single logon system that they can use across a
number of participant web sites.
As you might know by now from our extensive <a
href="faq.html">FAQ</a>, the Mono project has nothing to do
with Microsoft Hailstorm or <a
href="http://www.passport.com">Microsoft Passport.</a>
Still a lot of people have asked us our opinion on them.
** Passport
Passport is important not because of it being breaktrough
technologically speaking, but because the company is in a
position to drive most people toward being suscribers of it.
At the time of this writing passport is required to use the
free mail service <a href="http://www.hotmail.com">Hotmail</a>
to get customized support for the <a
href="http://www.msn.com">MSN portal</a>, <a
href="http://msdn.microsoft.com">Microsoft Developers
Network</a> and according to the original announcement from
Microsoft <a href="http://www.americanexpress.com">American
Express</a> and <a href="http://www.ebay.com">EBay</a> will be
adopting it.
There is already a <a
href="http://www.passport.com/Directory/Default.asp?PPDir=C&lc=1033">Large
list</a> of participating sites.
There are many current users of it and Microsoft will be
driving more users towards Passport as it <a
href="http://news.cnet.com/news/0-1003-200-6343275.html">integrates
it</a> in their upcoming release of Windows.
Microsoft has also <a
href="http://www.passport.com/Business/JoinPassportNetwork.asp?lc=1033">developed
a toolkit</a> to enable current web merchants to integrate
their services with passport.
To the end user, there is a clear benefit: they only have to
log into a single network and not remember multiple passwords
across sites on the internet. Companies that adopt passport
will have a competition advantage over those that dont.
Microsoft lists a list of <a
href="http://www.passport.com/Business/Default.asp?lc=1033">benefits</a>
to companies.
** The problems of Passport
There are a number of concerns that different groups have over
Passport. Sometimes I have some, sometimes I do not. But
overall, consumers and businesses can have better solutions.
<ul>
* <b>Single Point of Failure:</b> As more services and
components depend on remote servers, functionality can
grind to a halt if there is a failure on the
centralized Passport system.
Such a failure was predicted, and we recently <a
href="http://news.cnet.com/news/0-1005-200-6473003.html">witnessed</a>
got a lot of people worried.
The outgage lasted for seven days. Think what this
could do to your business.
* <b>Trust:</b> Not everyone trusts Microsoft to keep
their information confidential. Concerns are not only
at the corporate level policy, but also the fact that
the source code for Microsoft products is not
available, means that trojans or worms could be built
into the products by malicious engineers. This is not
unheard of, as the <a
href="http://slashdot.org/articles/00/04/14/0619206.shtml">Microsoft
Internet Server</a> had a trojan horse built into that
allowed anyone that knew about this to control any
server running IIS.
* <b>Security:</b> With a centralized system like
Passport, imagine the repercussions of a malicious
hacker gaining access to the Passport database.
Personal information and credit card information about
almost everyone using a computer could be stored there.
Hackers have already <a
href="http://slashdot.org/articles/00/10/27/1147248.shtml">broken
into Microsoft</a> in the past. And the company was
unable to figure out for how long their systems had been hacked.
</ul>
Microsoft might or might not realize this. The idea behind
Passport is indeed a good one (I can start to get rid of my
file that keeps track of the 30 logins and passwords or so
that I use across the various services on the net myself).
** Alternatives to Microsoft Passport
An alternative to Microsoft Passport needs to take the above
problems into consideration. Any solution of the form `We
will just have a competing offering' will not work.
The system thus has to be:
<ul>
* <b>Distributed:</b> The entire authentication
system should not create an internet `blackout' in the
case of failure.
* <b>Allow for multiple registrars:</b> Users should
be able to choose a registrar (their banks, local
phone company, service provider, Swiss bank, or any
other entity they trust.
* <b>Mandate good security measures:</b> As a
principle, only Open Source software should be used
for servers in the registrar, and they should conform
to a standard set of tools and software that can be
examined by third parties.
</ul>
An implementation of this protocol could use the DNS or a
DNS-like setup to distribute the information of users with the
possibility of replicating and caching public information
about the user.
For instant messaging (another pieces of the Hailstorm bit),
you want to use a non-centralized system like Sun's <a
href="http://www.jxta.org">JXTA</a>. Some people mailed me to
mention Jabber as a messaging platform.
It could also just use the user e-mail address as the `key' to
choose the registrar (msn.com, hotmail.com -> passport.com;
aol.com -> aol.passport.com; you get the idea).
The <a
href="http://www.soapware.org/xmlStorageSystem">xmlStorage</a>
idea from <a href="http://www.scripting.com">Dave Winer</a>
could be used to store the information.
A toolkit for various popular web servers could be provided,
authenticated and should be open sourced (for those of you who
think that a binary program would give more security and would
prevent people from tampering: you are wrong. You can always
use a proxy system that "behaves" like the binary, and passes
information back and forth from the real program, and snoops
in-transit information).
Good cryptographers need to be involved in this problem to
figure out the details and the possible insecure pieces of a
proposal like this.
** Implementation: In short
To keep it short: <b>DNS, JXTA, xmlStorage.</b>
** Deploying it
The implementation of such a system should be a pretty
straightforward tasks once security cryptographers have
designed such a beast.
The major problems are:
<ul>
* <b>People might just not care:</b> In a poll to US
citizens a couple of decades ago, it was found that
most people did not care about the rights they were
given by the Bill of Rights, which lead to a number of
laws to be passed in the US that eliminated most of
the rights people had.
* <b>The industry will move way too slow:</b>
Microsoft's implementation is out in the open now: it
is being deployed, and soon it will be insinuated to
many, many users. The industry needs to get together
soon if they care about this issue.
By the time the industry reacts, it might be too
late.
</ul>
** Passport and Mono
The .NET class libraries includes a Passport class that
applications might use to authenticate with Passport. Since
we do not have information at this point on the exact protocol
of Passport, it is not even feasible to implement it.
If at some point the information is disclosed, it could be
implemented.
If a competing system to Passport existed, we could probably
hide all the authentication information to use a number of
different passport-like systems.
If a user does not want to use Passport at all, he could
always turn it off (or completely remove the class from the
library). After all, this is free software.
Currently, we are too far from the point where this is a real
issue.
** Disclaimer
This is just a group of personal thoughts of mine that I have
placed here because I get asked this question a lot lately.
The views of this page are not a statement from my employer
(Ximian, Inc).
This is not part of Mono. We are not trying to deal with this
problem.
Nat Friedman (Ximian's co-founder) has his own ideas on how a
competing system to Passport could be designed, but I will let
<a href="http://www.nat.org/gym">him</a> post his own story.
** Other Alternatives
Some people have pointed out <a
href="http://www.xns.org">XNS</a>
Send comments to me: Miguel de Icaza (<a
href="mailto:[email protected]">[email protected]</a>)
+14
View File
@@ -0,0 +1,14 @@
** Microsoft and GNU and Linux.
Q: Does this mean that Microsoft is better than Linux?
A: Many of us are working on <a
href="http://www.gnu.org/philosophy/free-sw.html">free software<a>
and want to have an <a href="http://www.opensource.org">open
source</a> environment that we can change, modify, improve, learn
from, and share with others. Some of us also think that this will
lead on the long run to better software: more efficient, faster,
more robust and more.
We are willing to take good ideas from any source they come from.
+173
View File
@@ -0,0 +1,173 @@
* The Mono Project
** Background.
The GNOME project goal was to bring missing technologies to
Unix and make it competitive in the current market place for
desktop applications. We also realized early on that language
independence was important, and that is why GNOME APIs were
coded using a standard that allowed the APIs to be easily
wrapped for other languages. Our APIs are available to most
programming languages on Unix (Perl, Python, Scheme, C++,
Objective-C, Ada).
Later on we decided to use better methods for encapsulating
our APIs, and we started to use CORBA to define interfaces to
components. We complemented it with policy and a set of
standard GNOME interfaces for easily creating reusable,
language independent components, controls and compound
documents. This technology is known as <a
href="http://www.ximian.com/tech/bonobo.php3">Bonobo</a>.
Interfaces to Bonobo exist for C, Perl, Python, and
Java.
CORBA is good when you define coarse interfaces, and most
Bonobo interfaces are coarse. The only problem is that
Bonobo/CORBA interfaces are not good for small interfaces.
For example, an XML parsing Bonobo/CORBA component would be
inefficient compared to a C API.
** Another explanation
I recently explained our motivations to Dave Winer, and he posted
it <a
href="http://scriptingnews.userland.com/stories/storyReader$1275">here</a>
** Microsoft's .NET
The Microsoft .NET initiative is confusing because it is a
company wide effort that ranges from development tools to end
user applications. .NET is a branding formative that
has been applied to:
<ul>
* The .NET development platform, a new platform for
writing software.
* Web services.
* Microsoft Server Applications.
* New tools that use the new development platform.
* Hailstorm, the Passport centralized single-signon
system that is being integrated into Windows XP.
</ul>
Mono is an implementation of the .NET development platform.
** The Common Language Infrastructure platform.
Microsoft has created a new development platform. The
highlights of this new development platform are:
<ul>
* A runtime environment that provides garbage
collection, threading and a virtual machine
specification (The Virtual Execution System, VES)
* A comprehensive class library.
* A new language, C#. Very similar to Java, C#
allows programmers to use all the features available
on the .NET runtime.
* A language specification that compilers can
follow if they want to generate classes and code
that can interoperate with other programming
languages (The Common Language Specification: CLS)
</ul>
The Common Language Infrastructure platform is similar to the
goals we had in GNOME of giving language independence to
programmers. It is more mature, documented, larger in scope,
and has a consistent design.
Any API that is written using a CLS provider language can be
used by any language that is a CLS consumer. Compilers
generate code in a format called Common Intermediate Language
(CIL) which is an intermediate representation of a compiled
program and is easy to compile to native code or compiled
using Just-in-Time (JIT) engines. The restrictions placed by
the runtime on the CIL byte codes ensures that it is possible
to do a good job at optimizing the code in a JIT compiler.
There is not really a lot of innovation in this platform: we
have seen all of these concepts before, and we are all
familiar with how these things work.
What makes the Common Language Infrastructure development
platform interesting is that it is a good mix of technologies
that have been nicely integrated.
The .NET development platform is essentially a new foundation
for program development that gives Microsoft a room to grow
for the coming years.
** ECMA standards.
Microsoft has submitted the
specifications of C#, the runtime, the metadata and the
other various bits of the .NET development platform to the
<a href="http://www.ecma.ch">ECMA</a> for standarization.
You can get a copy of the specifications submitted to ECMA
from: <a href="http://www.dotnetexperts.com/ecma">http://www.dotnetexperts.com/ecma</a>
** Mono: an Open Source Common Language Infrastructure implementation.
Ximian has begun work on Mono, a project that aims to bring
the Common Language Infrastructure platform to free systems.
When the GNU project was launched, they picked the best
operating system that was available out there, and they
began to clone it: Unix.
The .NET development platform is a very rich, powerful, and
well designed platform that would help improve the free
software development platform. Just like the GNU project
began to clone Unix sixteen years ago, we will be cloning the
.NET development platform because it is a great platform to
build on.
** What makes up Mono?
There are various pieces that will make up Mono:
<ul>
* A C# compiler.
* The Virtual Execution System: that will have the
Just-in-Time compiler, garbage collector, loader,
threading engine.
A byte code interpreter will be provided for quickly
porting Mono to new systems and debugging the JIT
purposes, but it is not intended to be the ideal
execution environment.
* An implemenation of the .NET class library.
* Visual development tools.
* A CIL GCC frontend.
</ul>
** Why use GNOME components?
GNOME is an umbrella project that consists of infrastructural
components (GUI toolkit, XML libraries, CORBA implementation,
printing architecture, imaging system), a desktop environment,
and productivity applications.
The GNOME infrastructural components can be used to quickly
implement various pieces of the class libraries without reinventing
the wheel, and since all those components are licensed under
the terms of the GNU LGPL it is a perfect fit.
Libart will be used to implement the Drawing.2D API; Gtk+ and
the GNOME libraries will be used to implement the WinForms
API and of course Glib and libxml will be used in various
places.
+109
View File
@@ -0,0 +1,109 @@
* Resources
There are a number of resources available for those of you who
want to contribute to the Mono project. Here are a few links.
If you want to send suggestions for links, address them to <a
mailto="[email protected]">[email protected]</a>.
** ECMA Documentation.
You can get the documentation for the ECMA specs from a number of sites:
<ul>
* <a href="http://msdn.microsoft.com/net/ecma">At MSDN</a>
* <a href="http://www.dotnetexperts.com">Dot Net Experts</a>
* <a href="http://developer.intel.com/software/idap/ecma">Intel</a>
* <a href="http://lightning.csse.monash.edu.au/.net/CLI">Monash University</a>
</ul>
These contain specifications for the assembler, the metadata,
byte codes supported by the CLI virtual machine, the C#
language and the core class libraries.
For details on the .NET class libraries, you can
visit the Microsoft's Developer Network:
<ul>
* <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/cpref_start.asp">.NET Framework Class Library</a>
</ul>
You can also get this information if you install the Beta2
release of the .NET Framework.
<a name="mailing">
** Mailing Lists
There are a number of mailing lists for Mono
<ul>
* <b><a
href="http://mail.ximian.com/mailman/listinfo/mono-list">mono-list:</a></b>
The general Mono discussion list.
* <b><a
href="http://mail.ximian.com/mailman/listinfo/mono-announce-list">mono-announce-list:</a></b>
Announcements of Mono developments.
* <b><a
href="http://mail.ximian.com/mailman/listinfo/mono-docs-list">mono-docs-list:</a></b>
Discussion on the documentation of Mono.
* <b><a
href="http://discuss.develop.com/dotnet.html">Dotnet mailing
list at Develop.com:</a></b> The guys at Develop Mentor run
this general purpose mailing list.
</ul>
** Discussion Groups.
<ul>
* <a href="http://www.oreillynet.com">O'Reilly
Network</a> has a <a
href="http://www.oreillynet.com/dotnet">section devoted to
.NET</a>
* <a
href="http://msdn.microsoft.com/newsgroups">MSDN</a> also
lists various newsgroups related to .NET</ul>
</ul>
** Other .NET related projects
There are a number of related projects to Mono:
<ul>
* <a
href="http://www.icsharpcode.net/OpenSource/SD/default.asp">Sharp
Develop:</a> an IDE for the C# language written in C#.
* <a
href="http://www.southern-storm.com.au/portable_net.html">Portable.NET:</a>
* <a href="http://nunit.sourceforge.net">NUnit:</a> A
testing framework for .NET classes.
* <a href="http://www.kaffe.org">Kaffe:</a> A popular
Free Software JIT engine for Java.
* <a href="http://www.intel.com/research/mrl/orp">ORP:</a> A research
JIT/VM/GC system from Intel.
</ul>
** GNOME Documentation
Documnetation on GNOME, and the GNOME APIs is available from
the <a href="http://developer.gnome.org">developer</a> site at
GNOME:
<ul>
* <a href="http://developer.gnome.org/doc/API/">GNOME
API documentation</a>
* <a href="http://developer.gnome.org/doc/books">GNOME
Online books</a>
* <A
href="http://developer.gnome.org/arch/">Architecture Overview</a>
</ul>
+30
View File
@@ -0,0 +1,30 @@
** MacOS Documentation
** Assembly Language Manuals online
Intel
MIPS
SPARC
** Microsoft
msdn.microsoft.com/net
Research.microsoft.com
** Related Technologies
<ul>
* The CLI allows people to create Web Services using the SOAP
protocol. SOAP is based on XML, XML schemas an the HTTP
protocol.
<ul>
* XML specification.
* XML Namespaces.
* XML Schemas.
* SOAP Specification.
</ul>
</ul>
** Compiler Information
GCC
GCC Sample front-end tutorial
+12
View File
@@ -0,0 +1,12 @@
* Roadmap
We are working on the following three projects at Ximian:
The C# Compiler (mcs/mcs)
A .NET compatible Class Library (mcs/class)
The JIT/interpreter (mono)
+133
View File
@@ -0,0 +1,133 @@
The MonoNet runtime
The MonoNet runtime will implement the JIT engine (and a byte
code interpreter for quickly porting to new systems), the
class loader, the garbage collector, threading system and
metadata access libraries.
Currently the runtime contains the beginning of an image
loader and metadata access entry points. Since Beta2 has been
now released, it is possible to resume work using the ECMA
specs and testing with Beta2-generated executables.
The runtime core will be implemented in C, in a library
"libMonoVES.so".
** Executing MSIL/CIL images
The code will load an executable and map the references to
external assemblies to our own version of the assemblies on
GNU/Linux.
Our roadmap looks like this, this has been updated as of
<b>Jul 15, 2001</b>:
<ul>
* Milestone 1: Fully read and parse all CIL byte-codes
and metadata tokens (ie, a disassembler).
* Milestone 2: Complete an interpreter for CIL byte
codes. This interpreter can be used temporarly to
run CIL byte code on a system where no JIT is
available.
* Milestone 3: Define an <i>lburg</i> instruction
selector for the JITer for Intel. Although slower
at JITing than a streaming JITer, it generates
better code. The same grammar can later be used for
the stream jitter.
* Milestone 4: Implement JITer.
* Milestone 5: Port of the JITer to non IA32 systems.
</ul>
A setup similar to the Kaffe JIT engine can be used to
layout the code to support non-IA32 architectures. Our work
will be focused on getting a IA32 version running first.
The JIT engine should work on Linux and Win32, although you
will need to install the CygWin32 development tools to get a
Unix-like compilation environment.
** JIT Engine (<b>updated, Jul 14th, 2001</b>)
We will be using a code-generator generator approach for our
JITer. Given the properties of CIL byte codes, we can take
full advantage of a real instruction selector for our code
generator.
There are a couple of books that deal with this technique: "A
Retargetable C Compiler" and "Advanced Compiler Design and
Implementation" are good references. You can also get a
technical description of <a
href="http://research.microsoft.com/copyright/accept.asp?path=http://www.research.microsoft.com/~drh/pubs/iburg.pdf&pub=ACM">lbrug</a>
Previously we had looked at a number of JIT engines and tools,
but they would not take full advantage of the CIL properties:
<ul>
* <a
href="http://www.intel.com/research/mrl/orp/">ORP</a>
* <a
href="http://www.gnu.org/software/lightning/">GNU
Lightning</a>
* href="http://www.eecs.harvard.edu/~nr/toolkit/">NJ Machine
Toolkit</a>.).
* VCODE.
</ul>
** Garbage Collection
We have decided to implement a generational tracing garbage
collector, which is very similar to the one being used by
.NET. For an introduction to the garbage collection system
used by Microsoft's CLR implementation, you can read this book
on <a
href="http://www.amazon.com/exec/obidos/ASIN/0471941484/o/qid=992556433/sr=2-1/ref=aps_sr_b_1_1/103-5866388-0492603">Garbage
Collection.</a>
Although using a conservative garbage collector like Bohem's
would work, all the type information is available at runtime,
so we can actually implement a better collector than a
conservative collector.
<ul>
* Garbage collection list and FAQ:<br>
<a href="http://www.iecc.com/gclist/">http://www.iecc.com/gclist/</a>
* The Microsoft .NET Garbage Collection Implementation:<br>
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmag00/html/GCI.asp">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmag00/html/GCI.asp</a>
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmag00/html/GCI.asp">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmag00/html/GCI.asp</a>
</ul>
** Useful links
Paolo Molaro found a few interesting links:
<ul>
* On compilation of stack-based languages:<br>
<a href="http://www.complang.tuwien.ac.at/projects/rafts.html">
http://www.complang.tuwien.ac.at/projects/rafts.html</a>
* A paper on fast JIT compilation of a stack-based language:<br>
<a href="http://www.research.microsoft.com/~cwfraser/pldi99codegen.pdf">
http://www.research.microsoft.com/~cwfraser/pldi99codegen.pdf</a>
* Vmgen generates much of the code for efficient virtual machine (VM)
interpreters from simple descriptions of the VM instructions:<br>
<a href="http://www.complang.tuwien.ac.at/anton/vmgen/">
http://www.complang.tuwien.ac.at/anton/vmgen</a>
</ul>
** PInvoke
PInvoke will be supported, and will be used to wrap Unix API
calls, these in turn are required for reusing some of the
GNOME libraries that will reduce the work we have to do to
deliver a complete class library.
+44
View File
@@ -0,0 +1,44 @@
* Project Status
Pieces of Mono that have been implemented:
<ul>
* C# compiler: The C# parser can now generate parse
trees. Next up: semantic analysis, compiler lever optimizations
and code generation.
* Metadata library: Can currently parse and load
information from .NET modules (executables and DLL
files). It has a few bugs outstanding (table
dimension computation is incorrect).
Parsing of Exception tables is missing.
It lacks Token to (Table, Index) mapping, but this
should be trivial to write.
* Disassembler: Can disassemble .NET modules. Still
lacking exception handling as well as useful debugging
tools (hex dumping, token dumping).
* Class Libraries: Only a few classes have been
implemented.
</ul>
Tasks on the critical path:
<ul>
* Method and Field resolution.
* Bytecode interpreter: Not implemented yet.
* Simple JIT: Not implemented yet.
* Garbage collection engine.
</ul>
+2
View File
@@ -0,0 +1,2 @@
* The MonoNet Team
+21
View File
@@ -0,0 +1,21 @@
* Testing
All classes in Mono libraries should have comprehensive unit test
suites to go with them. Unit testing is a software engineering
methodology that makes it easier to build correct code. Every
method in every class should have a set of tests to verify
that they work correctly. Mono also needs a testing framework
to make it easy to write and run lots of tests.
Try <a href="http://nunit.sourceforge.net">NUnit</a>
Why do unit testing? It becomes simple to run automated tests
for the whole library. Unit tests are a safety net - you can
change part of the code and verify that you haven't broken
anything. Ideally, tests are written before the actual library
code itself. And every time a bug is discovered, a test should
be written to demonstrate the bug and its fix. Then, if
you ever reintroduce the bug, you will know immediately. For
more info, read <a
href="http://nunit.sourceforge.net/doc/testinfected/testing.html">
JUnit Test Infected: Programmers Love Writing Tests</a>.
+6
View File
@@ -0,0 +1,6 @@
* Thanks
We would like to thank Tim O'Reilly, Brian Jepson and Nathan
Torkington for their help.
Dave Winer for provided interesting comments and a to read.
+1
View File
@@ -0,0 +1 @@
Discuss with write new JIT
+25
View File
@@ -0,0 +1,25 @@
* Tools
We need a number of tools to make people productive using a
Mono-based solution. Some of these tools can be developed on
Windows before Mono is fully finished.
** Debugger
We will need a debugging API to debug CLI applications and
then a debugger component that can be used in an IDE
environment.
** Integrated Development Environment
There is already a project to create a C# development
environment (SharpDevelop). People could work with the
SharpDevelop hackers to produce a unified development environment.
** Help Browser
We need a good help browser that can be used to browse all the
Mono documentation.
+2
View File
@@ -0,0 +1,2 @@
*.src
*.html
+17
View File
@@ -0,0 +1,17 @@
0,Home,index.html,index.src
1,FAQ,faq.html,faq.src
0,Mono,rationale.html,rationale.src
1,Runtime,runtime.html,runtime.src
1,Classes,class-library.html,class-library.src
2,Class Status,class-status.html,class-status.src
1,C# Compiler,c-sharp.html,c-sharp.src
1,Status,status.html,status.src
0,Contributing,contributing.html,contributing.src
1,Documentation,documentation.html,documentation.src
1,Test Suite,testing.html,testing.src
1,Tools,tools.html,tools.src
0,Download,download.html,download.src
0,Resources,resources.html,resources.src
1,Ideas,ideas.html,ideas.src
1,Passport,passport.html,passport.src
0,Contact,contact.html,contact.src
+24
View File
@@ -0,0 +1,24 @@
#!/usr/bin/perl
$q = 1;
while (<>){
chop;
if (/^\* (.*)$/){
print "<h1>$1</h1>\n";
} elsif (/^\*\* (.*)$/) {
print "<h2>$1</h2>\n";
} elsif (/^\*\*\* (.*)$/) {
print "<h3>$1</h3>\n";
} elsif (/^$/) {
print "<p>\n";
} elsif (/^\t\t\* (.*)$/) {
print "<li>$1\n";
} elsif (/^Q: (.*)$/){
print "<p><a name=\"q$q\"><b>Question $q:</b> $1\n";
$q++;
} elsif (/^A: (.*)$/){
print "$1\n";
} else {
print "$_\n";
}
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

File renamed without changes.
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 49 B

After

Width:  |  Height:  |  Size: 49 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 B

After

Width:  |  Height:  |  Size: 157 B

+39
View File
@@ -0,0 +1,39 @@
SOURCES= \
../contributing \
../class-library \
../class-status \
../contact \
../c-sharp \
../documentation \
../download \
../faq \
../gcc-frontend \
../index \
../ideas \
../passport \
../rationale \
../resources \
../roadmap \
../runtime \
../status \
../testing \
../tools
all:
-mkdir site
for i in $(SOURCES); do \
perl htmlify $$i > `basename $$i`.src; \
done;
perl process.pl commands template.html.in .
clean:
for i in $(SOURCES); do \
rm -f `basename $$i`.src `basename $$i`.html; \
done;
push:
scp *.html [email protected]:/web/cvsmodules/mono
push2:
scp *.html primates:public_html/xxx
+73
View File
@@ -0,0 +1,73 @@
#!/usr/bin/perl
#
# Author:
# Sean MacIsaac
#
use strict;
my $full_expand = 1;
my @template;
my $n;
if ($#ARGV != 2) {
print "process.pl command_file template_file directory_prefix\n";
exit ();
}
my $menu = "";
open COMMANDS, $ARGV[0] || die "Can not open $ARGV[0]";
while (<COMMANDS>) {
chop;
my @command = split /,/;
if ($command[0] != -1) {
$menu .= "\t\t";
if ($command[0] == 0){
$menu .= "<tr><td valign=\"top\" class=\"navi\"><a class=\"navi\"";
} else {
$menu .= "<tr><td valign=\"top\" class=\"subnavi\">&nbsp;&nbsp;&nbsp<a class=\"subnavi\"";
}
$menu .= "HREF=\"$command[2]\">$command[1]</A></td></tr>\n\n";
}
}
close COMMANDS;
open TEMPLATE, $ARGV[1] || die "Can not open $ARGV[1]";
while (<TEMPLATE>) {
push @template, $_;
}
close TEMPLATE;
open COMMANDS, $ARGV[0] || die "Can not open $ARGV[0]";
while (<COMMANDS>) {
chop;
my @command = split /,/;
$n = $ARGV[2] . "/" . $command[2];
open OUTPUT, ">" . $n || die "Can not create $n";
my $content = "";
open INPUT, $command[3] || die "Can not open $command[3]";
while (<INPUT>) {
$content .= $_;
}
close INPUT;
my $line;
my $temp;
my $tit;
my $title;
$tit = $command[1];
foreach $line (@template) {
$temp = $line;
$title = "$tit / Mono";
$temp =~ s/#TITLE#/$title/;
$temp =~ s/#CONTENT#/$content/;
$temp =~ s/#MENU#/$menu/;
print OUTPUT $temp;
}
close OUTPUT;
}
+78
View File
@@ -0,0 +1,78 @@
<html>
<head>
<title>#TITLE#</title>
<style type="text/css">
<!--
body { font-family: "trebuchet ms", lucida, verdana, helvetica;
background-image: url("images/bgsquares.gif");
background-attachment: fixed; }
body, td, table { font-family: "trebuchet ms", lucida, verdana, helvetica;
font-size: 12px; }
.navi { font-size: 14px; background: #444444; }
.subnavi { font-size: 12px; }
.footnote { font-size: 10px; color: #aaaaaa; }
a.navi { color: #ffffff; text-decoration: none; font-weight: bold; }
a.navi:visited { color: #cccccc; }
a.navi:hover { color: #ee9900; text-decoration: underline; }
a.subnavi { color: #ffffff; text-decoration: none; font-weight: bold; }
a.subnavi:visited { color: #cccccc; }
a.subnavi:hover { color: #ee9900; text-decoration: underline; }
// -->
</style>
</head>
<body bgcolor="#555555" text="#000000">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><img src="images/pixel.gif"></td><!-- left border -->
<td colspan="4">
<a href="/"><img src="images/mono.gif" border="0"></a></td>
<td><img src="images/pixel.gif"></td><!-- right border -->
</tr>
<tr>
<td><img src="images/pixel.gif" width="1" height="1"></td>
<td colspan="3" bgcolor="black"><img src="images/pixel.gif" height="2"></td>
<td bgcolor="black"><img src="images/pixel.gif" width="1"></td>
<td><img src="images/pixel.gif"></td>
</tr>
<tr>
<td width="100"><img src="images/pixel.gif"></td>
<td valign="top">
<table cellpadding="2" valign="top" cellspacing="0" border="0">
#MENU#
</table>
</td>
<td bgcolor="black" width="1"><img src="images/pixel.gif" width="1"></td>
<td bgcolor="white">
<table cellpadding="16">
<tr><td>
#CONTENT#
</td></tr>
</table>
</td>
<td bgcolor="black"><img src="images/pixel.gif" width="1"></td>
<td width="100"><img src="images/pixel.gif"></td>
</tr>
<tr>
<td colspan="2">
<img src="images/pixel.gif"></td>
<td colspan="2" bgcolor="black"><img src="images/pixel.gif" height="1"></td>
<td bgcolor="black"><img src="images/pixel.gif" width="1"></td>
<td><img src="images/pixel.gif"></td>
</tr>
<td colspan="2"></td>
<td colspan="2" align="center">
<a class="footnote" href="mailto: [email protected]">[email protected]</a>
</td>
<td colspan="2"></td>
</tr>
</tr>
</table>
</body>
</html>
-15
View File
@@ -1,15 +0,0 @@
EXTRA_DIST = \
aot-compiler.txt \
assembly-bundle \
embedded-api \
exceptions \
gc-issues \
jit-thoughts \
jit-trampolines \
local-regalloc.txt \
mini-doc.txt \
mini-porting.txt \
opcode-decomp.txt \
object-layout \
unmanaged-calls \
stack-alignment
-302
View File
@@ -1,302 +0,0 @@
Here "abc" stays for "array bounds check", or "array bound checks", or
some combination of the two...
------------------------------------------------------------------------------
USAGE
Simply use the "abcrem" optimization invoking mono.
To see if bound checks are actually removed, use "mono -v" and grep for
"ARRAY-ACCESS" in the output, there should be a message for each check
that has been removed.
To trace the algorithm execution, use "-v -v -v", and be prepared to be
totally submersed by debugging messages...
------------------------------------------------------------------------------
EFFECTIVENESS
The abc removal code can now always remove bound checks from "clean"
array scans in loops, and generally anyway there are clear conditions that
already state that the index is "safe".
To be clearer, and give an idea of what the algorithm can and cannot do
without describing it in detail... keep in mind that only "redunant" checks
cannot be removed. By "redundant", I mean "already explicitly checked" in
the method code.
Unfortunately, analyzing complex expressions is not so easy (see below for
details), so the capabilities of this "abc remover" are limited.
These are simple guidelines:
- Only expressions of the following kinds are handled:
- constant
- variable [+/- constant]
- Only comparisons between "handled" expressions are understood.
- "switch" statements are not yet handled.
This means that code like this will be handled well:
for (int i = 0; i < a.Length; i++) {
a [i] = .....
}
The "i" variable could be declared out of the "for", the "for" could be a
"while", and maybe even implemented with "goto", the array could be scanned
in reverse order, and everything would still work.
I could have a temporary variable storing the array length, and check on
it inside the loop, and the abc removal would still occurr, like this:
int i = 0;
int l = a.Length;
while ( i < l ) {
a [i] ......
}
or this:
int l = a.Length;
for (int i = l; i > 0; i--) {
a [i] = .....
}
The following two examples would work:
for (int i = 0; i < (a.Length -1); i++) .....
for (int i = 0; i < a.Length; i += 2) .....
But just something like this
int delta = -1;
for (int i = 0; i < (a.Length + delta); i++) .....
or like this
int delta = +2;
for (int i = 0; i < a.Length; i += delta) .....
would not work, the check would stay there, sorry :-(
(unless a combination of cfold, consprop and copyprop is used, too, which
would make the constant value of "delta" explicit).
Just to make you understand how things are tricky... this would work!
int limit = a.Length - 1;
for (int i = 0; i < limit; i++) {
a [i] = .....
}
A detailed explanation of the reason why things are done like this is given
below...
------------------------------------------------------------------------------
THE ALGORITHM
This array bound check removal (abc removal) algorithm is based on
symbolic execution concepts. I handle the removal like an "unreachable
code elimination" (and in fact the optimization could be extended to remove
also other unreachable sections of code, due to branches that "always go the
same way").
In symbolic execution, variables do not have actual (numeric) values, but
instead symbolic expressions (like "a", or "x+y").
Also, branch conditions are handled like symbolic conditions (like "i<k"),
which state relations between variable values.
The SSA representation inside mini is somewhat close to a symbolic
representation of the execution of the compiled method.
Particularly, the representation of variable values is exactly a symbolic
one. It is enough to find all CEE_STIND_* instructions which store to a
local variable, and their second argument is exactly the variable value.
Actually, "cfg->vars [<variable-index>]->def" should contain exactly
those store instructions, and the "get_variable_value_from_ssa_store"
function extracts the variable value from there.
On the other hand, the conditions under which each basic block is
executed are not made fully explicit.
However, it is not difficult to make them so.
Each BB that has more than one exit BB, in practice must end either with
a conditional branch instruction or with a switch instruction.
In the first case, the BB has exactly two exit BBs, and their execution
conditions are easy to get from the condition of the branch (see the
"get_relation_from_branch_instruction" function, and expecially the end of
"analyze_block" in abcremoval.c.
If there is a switch, the jump condition of every exit BB is the equality
of the switch argument with the particular index associated with its case
(but the current implementation does not handle switch statements yet).
These individual conditions are in practice associated to each arc that
connects BBs in the CFG (with the simple case that unconditional branches
have a "TRUE" condition, because they always happen).
So, for each BB, its *proper* entry condition is the union of all the
conditions associated to arcs that enter the BB. The "union" is like a
logical "or", in the sense that either of the condition could be true,
they are not necessarily all true. This means that if I can enter a BB
in two ways, and in one case I know that "x>0", and in the other that
"x==0", actually in the BB I know that "x>=0", which is a weaker
condition (the union of the two).
Also, the *complete* entry condition for a BB is the "intersection" of all
the entry conditions of its dominators. This is true because each dominator
is the only way to reach the BB, so the entry condition of each dominator
must be true if the control flow reached the BB. This translates to the
logical "and" of all the "proper" conditions of the BBs met walking up in the
dominator tree. So, if one says "x>0", and another "x==1", then I know
that "x==1", which is a stronger condition (the intersection of the two).
Note that, if the two conditions were "x>0" and "x==0", then the block would
be unreachable (the intersection is empty), because some branch is impossible.
Another observation is that, inside each BB, every variable is subject to the
complete entry condition of that very same BB, and not the one in which it is
defined (with the "complete entry condition" being the thing I defined before,
sorry if these terms "proper" and "complete" are strange, I found nothing
better).
This happens because the branch conditions are related to the control flow.
I can define "i=a", and if I am in a BB where "a>0", then "i>0", but not
otherwise.
So, intuitively, if the available conditions say "i>=0", and i is used as an
index in an array access, then the lower bound check can be omitted.
If the condition also says "(i>=0)&&(i<array.length)", the abc removal can
occur.
So, a complete solution to the problem of abc removal would be the following:
for each array access, build a system of equations containing:
[1] all the symbolic variable definitions
[2] the complete entry condition of the BB in which the array access occurs
[3] the two "goal functions" ("index >=0" and "index < array.length")
If the system is valid for *each possible* variable value, then the goal
functions are always true, and the abc can be removed.
All this discussion is useful to give a precise specification to the problem
we are trying to solve.
The trouble is that, in the general case, the resulting system of equations
is like a predicate in first order logic, which is semi-decidable, and its
general solution is anyway too complex to be attempted in a JIT compiler
(which should not contain a full fledged theorem prover).
Therefore, we must cut some corner.
By the way, there is also another big problem, which is caused by "recursive"
symbolic definitions. These definition can (and generally do) happen every
time there is a loop. For instance, in the following piece of code
for ( int i = 0; i < array.length; i++ ) {
Console.WriteLine( "array [i] = " + array [i] );
}
one of the definitions of i is a PHI that can be either 0 or "i + 1".
Now, we know that mathematically "i = i + 1" does not make sense, and in
fact symbolic values are not "equations", they are "symbolic definitions".
The actual symbolic value of i is a generic "n", where "n" is the number of
iterations of the loop, but this is terrible to handle (and in more complex
examples the symbolic value of i simply cannot be written, because i is
calculated in an iterative way).
However, the definition "i = i + 1" tells us something about i: it tells us
that i "grows". So (from the PHI definition) we know that i is either 0, or
"grows". This is enough to tell that "i>=0", which is what we want!
It is important to note that recursive definitions can only occurr inside
PHI definitions, because actually a variable cannot be defined *only* in terms
of itself!
At this point, I can explain which corners I want to cut to make the
problem solvable. It will not remove all the abc that could theoretically
be removed, but at least it will work.
The easiest way to cut corners is to only handle expressions which are
"reasonably simple", and ignore the rest.
Keep in mind that ignoring an expression is not harmful in itself.
The algorithm will be simply "less powerful", because it will ignore
conditions that could have caused to the removal of an abc, but will
not remove checks "by mistake" (so the resulting code will be in any case
correct).
The expressions we handle are the following (all of integer type):
- constant
- variable
- variable + constant
- constant + variable
- variable - constant
And, of course, PHI definitions.
Any other expression causes the introduction of an "any" value in the
evaluation, which makes all values that depend from it unknown as well.
We will call these kind of definitions "summarizable" definitions.
In a first attempt, we can consider only branch conditions that have the
simplest possible form (the comparison of two summarizable expressions).
We can also simplify the effect of variable definitions, keeping only
what is relevant to know: their value range with respect to zero and with
respect to the length of the array we are currently handling.
One particular note on PHI functions: they work (obviously) like the logical
"or" of their definitions, and therefore are equivalent to the "logical or"
of the summarization of their definitions.
About recursive definitions (which, believe me, are the worst thing in all
this mess), we handle only "monotonic" ones. That is, we try to understand
if the recursive definition (which, as we said above, must happen because
of a loop) always "grows" or "gets smaller". In all other cases, we decide
we cannot handle it.
One critical thing, once we have defined all these data structures, is how
the evaluation is actually performed.
In a first attempt I coded a "brute force" approach, which for each BB
tried to examine all possible conditions between all variables, filling
a sort of "evaluation matrix". The problem was that the complexity of this
evaluation was quadratic (or worse) on the number of variables, and that
many wariables were examined even if they were not involved in any array
access.
Following the ABCD paper (http://citeseer.ist.psu.edu/bodik00abcd.html),
I rewrote the algorithm in a more "sparse" way.
Now, the main data structure is a graph of relations between variables, and
each attempt to remove a check performs a traversal of the graph, looking
for a path from the index to the array length that satisfies the properties
"index >= 0" and "index < length". If such a path is found, the check is
removed. It is true that in theory *each* traversal has a complexity which
is exponential on the number of variables, but in practice the graph is not
very connected, so the traversal terminates quickly.
Then, the algorithm to optimize one method looks like this:
[1] Preparation:
[1a] Build the SSA representation.
[1b] Prepare the evaluation graph (empty)
[1b] Summarize each varible definition, and put the resulting relations
in the evaluation graph
[2] Analyze each BB, starting from the entry point and following the
dominator tree:
[2a] Summarize its entry condition, and put the resulting relations
in the evaluation graph (this is the reason why the BBs are examined
following the dominator tree, so that conditions are added to the
graph in a "cumulative" way)
[2b] Scan the BB instructions, and for each array access perform step [3]
[2c] Process children BBs following the dominator tree (step [2])
[2d] Remove from the evaluation area the conditions added at step [2a]
(so that backtracking along the tree the area is properly cleared)
[3] Attempt the removal:
[3a] Summarize the index expression, to see if we can handle it; there
are three cases: the index is either a constant, or a variable (with
an optional delta) or cannot be handled (is a "any")
[3b] If the index can be handled, traverse the evaluation area searching
a path from the index variable to the array length (if the index is
a constant, just examine the array length to see if it has some
relation with this constant)
[3c] Use the results of step [3b] to decide if the check is redundant
-173
View File
@@ -1,173 +0,0 @@
Mono Ahead Of Time Compiler
===========================
The Ahead of Time compilation feature in Mono allows Mono to
precompile assemblies to minimize JIT time, reduce memory
usage at runtime and increase the code sharing across multiple
running Mono application.
To precompile an assembly use the following command:
mono --aot -O=all assembly.exe
The `--aot' flag instructs Mono to ahead-of-time compile your
assembly, while the -O=all flag instructs Mono to use all the
available optimizations.
* Position Independent Code
---------------------------
On x86 and x86-64 the code generated by Ahead-of-Time compiled
images is position-independent code. This allows the same
precompiled image to be reused across multiple applications
without having different copies: this is the same way in which
ELF shared libraries work: the code produced can be relocated
to any address.
The implementation of Position Independent Code had a
performance impact on Ahead-of-Time compiled images but
compiler bootstraps are still faster than JIT-compiled images,
specially with all the new optimizations provided by the Mono
engine.
* How to support Position Independent Code in new Mono Ports
------------------------------------------------------------
Generated native code needs to reference various runtime
structures/functions whose address is only known at run
time. JITted code can simple embed the address into the native
code, but AOT code needs to do an indirection. This
indirection is done through a table called the Global Offset
Table (GOT), which is similar to the GOT table in the Elf
spec. When the runtime saves the AOT image, it saves some
information for each method describing the GOT table entries
used by that method. When loading a method from an AOT image,
the runtime will fill out the GOT entries needed by the
method.
* Computing the address of the GOT
Methods which need to access the GOT first need to compute its
address. On the x86 it is done by code like this:
call <IP + 5>
pop ebx
add <OFFSET TO GOT>, ebx
<save got addr to a register>
The variable representing the got is stored in
cfg->got_var. It is allways allocated to a global register to
prevent some problems with branches + basic blocks.
* Referencing GOT entries
Any time the native code needs to access some other runtime
structure/function (i.e. any time the backend calls
mono_add_patch_info ()), the code pointed by the patch needs
to load the value from the got. For example, instead of:
call <ABSOLUTE ADDR>
it needs to do:
call *<OFFSET>(<GOT REG>)
Here, the <OFFSET> can be 0, it will be fixed up by the AOT compiler.
For more examples on the changes required, see
svn diff -r 37739:38213 mini-x86.c
* The Precompiled File Format
-----------------------------
We use the native object format of the platform. That way it
is possible to reuse existing tools like objdump and the
dynamic loader. All we need is a working assembler, i.e. we
write out a text file which is then passed to gas (the gnu
assembler) to generate the object file.
The precompiled image is stored in a file next to the original
assembly that is precompiled with the native extension for a shared
library (on Linux its ".so" to the generated file).
For example: basic.exe -> basic.exe.so; corlib.dll -> corlib.dll.so
The following things are saved in the object file and can be
looked up using the equivalent to dlsym:
mono_assembly_guid
A copy of the assembly GUID.
mono_aot_version
The format of the AOT file format.
mono_aot_opt_flags
The optimizations flags used to build this
precompiled image.
method_infos
Contains additional information needed by the runtime for using the
precompiled method, like the GOT entries it uses.
method_info_offsets
Maps method indexes to offsets in the method_infos array.
mono_icall_table
A table that lists all the internal calls
references by the precompiled image.
mono_image_table
A list of assemblies referenced by this AOT
module.
method_offsets
The equivalent to a procedure linkage table.
* Performance considerations
----------------------------
Using AOT code is a trade-off which might lead to higher or slower performance,
depending on a lot of circumstances. Some of these are:
- AOT code needs to be loaded from disk before being used, so cold startup of
an application using AOT code MIGHT be slower than using JITed code. Warm
startup (when the code is already in the machines cache) should be faster.
Also, JITing code takes time, and the JIT compiler also need to load
additional metadata for the method from the disk, so startup can be faster
even in the cold startup case.
- AOT code is usually compiled with all optimizations turned on, while JITted
code is usually compiled with default optimizations, so the generated code
in the AOT case should be faster.
- JITted code can directly access runtime data structures and helper functions,
while AOT code needs to go through an indirection (the GOT) to access them,
so it will be slower and somewhat bigger as well.
- When JITting code, the JIT compiler needs to load a lot of metadata about
methods and types into memory.
- JITted code has better locality, meaning that if A method calls B, then
the native code for A and B is usually quite close in memory, leading to
better cache behaviour thus improved performance. In contrast, the native
code of methods inside the AOT file is in a somewhat random order.
* Future Work
-------------
- Currently, the runtime needs to setup some data structures and fill out
GOT entries before a method is first called. This means that even calls to
a method whose code is in the same AOT image need to go through the GOT,
instead of using a direct call.
- On x86, the generated code uses call 0, pop REG, add GOTOFFSET, REG to
materialize the GOT address. Newer versions of gcc use a separate function
to do this, maybe we need to do the same.
- Currently, we get vtable addresses from the GOT. Another solution would be
to store the data from the vtables in the .bss section, so accessing them
would involve less indirection.
-57
View File
@@ -1,57 +0,0 @@
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.
-293
View File
@@ -1,293 +0,0 @@
Embedding the Mono runtime, preliminary version
Miguel de Icaza ([email protected]),
Paolo Molaro ([email protected])
This document describes how to embed the Mono runtime in your
application, and how to invoke CIL methods from C, and how to
invoke C code from CIL. Both the JIT and interpreter can be
embedded in very similar ways so most of what is described
here can be used in either case.
* IMPORTANT
This document is now outdated, see:
http://www.mono-project.com/Embedding_Mono
For an up-to-date version of this document
* Embedding the runtime.
Embedding the runtime consists of various steps:
* Compiling and linking the Mono runtime
* Initializing the Mono runtime
* Optionally expose C code to the C#/CIL universe.
These are discussed in detail next.
** Compiling and Linking
To embed the runtime, you have to link your code against the
Mono runtime libraries. To do this, you want to pass the
flags returned by pkg-config to your compiler:
pkg-config --cflags --libs mono
is used to get the flags for the JIT runtime and
pkg-config --cflags --libs mint
for the interpreted runtime.
Like this:
gcc sample.c `pkg-config --cflags --libs mono`
You can separate the compilation flags from the linking flags, for
instance, you can use the following macros in your makefile:
CFLAGS=`pkg-config --cflags mono`
LDFLAGS=`pkg-config --libs mono`
** Initializing the Mono runtime
To initialize the JIT runtime, call mono_jit_init, like this:
#include <mono/mini/jit.h>
MonoDomain *domain;
domain = mono_jit_init ("domain-name");
For the interpreted runtime use mono_interp_init instead:
#include <mono/interpreter/embed.h>
MonoDomain *domain;
domain = mono_interp_init ("domain-name");
That will return a MonoDomain where your code will be
executed. You can create multiple domains. Each domain is
isolated from the other domains and code in one domain will
not interfere with code in other domains. This is useful if
you want to host different applications in your program.
Now, it is necessary to transfer control to Mono, and setup
the threading infrastructure, you do this like this:
void *user_data = NULL;
mono_runtime_exec_managed_code (domain, main_thread_handler, user_data);
Where your main_thread_handler can load your assembly and execute it:
static void main_thread_handler (gpointer user_data)
MonoAssembly *assembly;
assembly = mono_domain_assembly_open (domain, "file.dll");
if (!assembly)
error ();
In the above example, the contents of `file.dll' will be
loaded into the domain. This only loads the code, but it will
not execute anything yet. You can replace `file.dll' with
another transport file, like `file.exe'
To start executing code, you must invoke a method in the
assembly, or if you have provided a static Main method (an
entry point), you can use the convenience function:
retval = mono_jit_exec (domain, assembly, argc - 1, argv + 1);
or when using the interpreter use:
retval = mono_interp_exec (domain, assembly, argc - 1, argv + 1);
If you want to invoke a different method, look at the
`Invoking Methods in the CIL universe' section later on.
** Shutting down the runtime
To shutdown the Mono runtime, you have to clean up all the
domains that were created, use this function:
mono_jit_cleanup (domain);
Or in the case of the interpreted runtime use:
mono_interp_cleanup (domain);
** Applications that use threads.
The Boehm GC system needs to catch your calls to the pthreads
layer, so in each file where you use pthread.h you should
include the <gc/gc.h> file.
If you can not do this for any reasons, just remember that you
can not store pointers to Mono Objects on the stack, you can
store them safely in the heap, or in global variables though
* Exposing C code to the CIL universe
The Mono runtime provides two mechanisms to expose C code to
the CIL universe: internal calls and native C code. Internal
calls are tightly integrated with the runtime, and have the
least overhead, as they use the same data types that the
runtime uses.
The other option is to use the Platform Invoke (P/Invoke) to
call C code from the CIL universe, using the standard P/Invoke
mechanisms.
To register an internal call, use this call in the C code:
mono_add_internal_call ("Hello::Sample", sample);
Now, you need to declare this on the C# side:
using System;
using System.Runtime.CompilerServices;
class Hello {
[MethodImplAttribute(MethodImplOptions.InternalCall)]
extern static string Sample ();
}
Since this routine returns a string, here is the C definition:
static MonoString*
Sample ()
{
return mono_string_new (mono_domain_get (), "Hello!");
}
Notice that we have to return a `MonoString', and we use the
`mono_string_new' API call to obtain this from a string.
* Invoking Methods in the CIL universe
Calling a method in the CIL universe from C requires a number of steps:
* Obtaining the MonoMethod handle to the method.
* The method invocation.
** Obtaining a MonoMethod
To get a MonoMethod there are several ways.
You can get a MonoClass (the structure representing a type)
using:
MonoClass *
mono_class_from_name (MonoImage *image, const char* name_space, const char *name);
and then loop in the returned class method array until you get
the one you're looking for. There are examples of such
searches as static functions in several C files in
metadata/*.c: we need to expose one through the API and remove
the duplicates.
The other, simpler, way is to use the functions in
debug-helpers.h: there are examples of their use in monograph,
mint and the jit as well. You basically use a string
description of the method, like:
"System.Object:GetHashCode()"
and create a MonoMethodDesc out of it with:
MonoMethodDesc* mono_method_desc_new (const char *name, gboolean include_namespace);
You can then use:
MonoMethod* mono_method_desc_search_in_class (MonoMethodDesc *desc, MonoClass *klass);
MonoMethod* mono_method_desc_search_in_image (MonoMethodDesc *desc, MonoImage *image);
to search for the method in a class or in an image. You would
tipically do this just once at the start of the program and
store the result for reuse somewhere.
** Invoking a Method
There are two functions to call a managed method:
MonoObject*
mono_runtime_invoke (MonoMethod *method, void *obj, void **params,
MonoObject **exc);
and
MonoObject*
mono_runtime_invoke_array (MonoMethod *method, void *obj, MonoArray *params,
MonoObject **exc);
obj is the 'this' pointer, it should be NULL for static
methods, a MonoObject* for object instances and a pointer to
the value type for value types.
These functions can be used in both the JIT and the interpreted
environments.
The params array contains the arguments to the method with the
same convention: MonoObject* pointers for object instances and
pointers to the value type otherwise. The _invoke_array
variant takes a C# object[] as the params argument (MonoArray
*params): in this case the value types are boxed inside the
respective reference representation.
From unmanaged code you'll usually use the
mono_runtime_invoke() variant.
Note that this function doesn't handle virtual methods for
you, it will exec the exact method you pass: we still need to
expose a function to lookup the derived class implementation
of a virtual method (there are examples of this in the code,
though).
You can pass NULL as the exc argument if you don't want to
catch exceptions, otherwise, *exc will be set to the exception
thrown, if any. if an exception is thrown, you can't use the
MonoObject* result from the function.
If the method returns a value type, it is boxed in an object
reference.
We have plans for providing an additional method that returns
an unmanaged->managed thunk like this:
void* mono_method_get_unmanaged_thunk (MonoMethod *method);
You'll be able to store the returned pointer in a function
pointer with the proper signature and call that directly from
C:
typedef gint32 (*GetHashCode) (MonoObject *obj);
GetHashCode func = mono_method_get_unmanaged_thunk (System_Object_GetHashCode_method);
gint32 hashvalue = func (myobject);
It may not be possible to manage exceptions in that case,
though. I need to think more about it.
** Threading issues
If your application creates threads on its own, and you want them to
be able to call code into the CIL universe with Mono, you have to
register the thread with Mono before issuing the call.
To do so, call the mono_thread_attach() function before you execute
any managed code from the thread
* Samples
See the sample programs in mono/sample/embed for examples of
embedding the Mono runtime in your application.
-253
View File
@@ -1,253 +0,0 @@
Exception Handling In the Mono Runtime
--------------------------------------
Introduction
------------
There are many types of exceptions which the runtime needs to handle. These
are:
- exceptions thrown from managed code using the 'throw' or 'rethrow' CIL
instructions.
- exceptions thrown by some IL instructions like InvalidCastException thrown
by the 'castclass' CIL instruction.
- exceptions thrown by runtime code
- synchronous signals received while in managed code
- synchronous signals received while in native code
- asynchronous signals
Since exception handling is very arch dependent, parts of the exception
handling code reside in the arch specific exceptions-<ARCH>.c files. The
architecture independent parts are in mini-exceptions.c. The different
exception types listed above are generated in different parts of the runtime,
but ultimately, they all end up in the mono_handle_exception () function in
mini-exceptions.c.
Exceptions throw programmatically from managed code
---------------------------------------------------
These exceptions are thrown from managed code using 'throw' or 'rethrow' CIL
instructions. The JIT compiler will translate them to a call to a helper
function called 'mono_arch_throw/rethrow_exception'. These helper functions do
not exist at compile time, they are created dynamically at run time by the
code in the exceptions-<ARCH>.c files. They perform various stack
manipulation magic, then call a helper function usually named throw_exception (), which
does further processing in C code, then calls mono_handle_exception () to do the rest.
Exceptions thrown implicitly from managed code
----------------------------------------------
These exceptions are thrown by some IL instructions when something goes wrong.
When the JIT needs to throw such an exception, it emits a forward conditional
branch and remembers its position, along with the exception which needs to
be emitted. This is usually done in macros named EMIT_COND_SYSTEM_EXCEPTION in
the mini-<ARCH>.c files. After the machine code for the method is emitted, the
JIT calls the arch dependent mono_arch_emit_exceptions () function which will
add the exception throwing code to the end of the method, and patches up the
previous forward branches so they will point to this code. This has the
advantage that the rarely-executed exception throwing code is kept separate
from the method body, leading to better icache performance.
The exception throwing code braches to the dynamically generated
mono_arch_throw_corlib_exception helper function, which will create the
proper exception object, does some stack manipulation, then calls
throw_exception ().
Exceptions thrown by runtime code
---------------------------------
These exceptions are usually thrown by the implementations of InternalCalls
(icalls). First an appropriate exception object is created with the help of
various helper functions in metadata/exception.c, which has a separate helper
function for allocating each kind of exception object used by the runtime code.
Then the mono_raise_exception () function is called to actually throw the
exception. That function never returns.
An example:
if (something_is_wrong)
mono_raise_exception (mono_get_exception_index_out_of_range ());
mono_raise_exception () simply passes the exception to the JIT side through
an API, where it will be received by helper created by mono_arch_throw_exception (). From now on, it is treated as an exception thrown from managed code.
Synchronous signals
-------------------
For performance reasons, the runtime does not do same checks required by the
CLI spec. Instead, it relies on the CPU to do them. The two main checks which
are omitted are null-pointer checks, and arithmetic checks. When a null
pointer is dereferenced by JITted code, the CPU will notify the kernel through
an interrupt, and the kernel will send a SIGSEGV signal to the process. The
runtime installs a signal handler for SIGSEGV, which is
sigsegv_signal_handler () in mini.c. The signal handler creates the appropriate
exception object and calls mono_handle_exception () with it. Arithmetic
exceptions like division by zero are handled similarly.
Synchronous signals in native code
----------------------------------
Receiving a signal such as SIGSEGV while in native code means something very
bad has happened. Because of this, the runtime will abort after trying to print a
managed plus a native stack trace. The logic is in the mono_handle_native_sigsegv ()
function.
Note that there are two kinds of native code which can be the source of the signal:
- code inside the runtime
- code inside a native library loaded by an application, ie. libgtk+
Stack overflow checking
-----------------------
Stack overflow exceptions need special handling. When a thread overflows its
stack, the kernel sends it a normal SIGSEGV signal, but the signal handler
tries to execute on the same as the thread leading to a further SIGSEGV which
will terminate the thread. A solution is to use an alternative signal stack
supported by UNIX operating systems through the sigaltstack (2) system call.
When a thread starts up, the runtime will install an altstack using the
mono_setup_altstack () function in mini-exceptions.c. When a SIGSEGV is
received, the signal handler checks whenever the fault address is near the
bottom of the threads normal stack. If it is, a StackOverflowException is
created instead of a NullPointerException. This exception is handled like
any other exception, with some minor differences.
Working sigaltstack support is very much os/kernel/libc dependent, so it is
disabled by default.
Asynchronous signals
--------------------
Async signals are used by the runtime to notify a thread that it needs to
change its state somehow. Currently, it is used for implementing
thread abort/suspend/resume.
Handling async signals correctly is a very hard problem, since the receiving
thread can be in basically any state upon receipt of the signal. It can
execute managed code, native code, it can hold various managed/native locks, or
it can be in a process of acquiring them, it can be starting up, shutting down
etc. Most of the C APIs used by the runtime are not asynch-signal safe,
meaning it is not safe to call them from an async signal handler. In
particular, the pthread locking functions are not async-safe, so if a
signal handler interrupted code which was in the process of acquiring a lock,
and the signal handler tries to acquire a lock, the thread will deadlock.
Unfortunately, the current signal handling code does acquire locks, so
sometimes it does deadlock.
When receiving an async signal, the signal handler first tries to determine
whenever the thread was executing managed code when it was interrupted. If
it did, then it is safe to interrupt it, so a ThreadAbortException is
constructed and thrown. If the thread was executing native code, then it is
generally not safe to interrupt it. In this case, the runtime sets a flag
then returns from the signal handler. That flag is checked every time the
runtime returns from native code to managed code, and the exception is thrown
then. Also, a platform specific mechanism is used to cause the thread to
interrupt any blocking operation it might be doing.
The async signal handler is in sigusr1_signal_handler () in mini.c, while
the logic which determines whenever an exception is safe to be thrown is in
mono_thread_request_interruption ().
Stack unwinding during exception handling
-----------------------------------------
The execution state of a thread during exception handling is stored in an
arch-specific structure called MonoContext. This structure contains the values
of all the CPU registers relevant during exception handling, which
usually means:
- IP (instruction pointer)
- SP (stack pointer)
- FP (frame pointer)
- callee saved registers
Callee saved registers are the registers which are required by any procedure
to be saved/restored before/after using them. They are usually defined by
each platforms ABI (Application Binary Interface). For example, on x86, they
are EBX, ESI and EDI.
The code which calls mono_handle_exception () is required to construct the
initial MonoContext. How this is done depends on the caller. For exceptions
thrown from managed code, the mono_arch_throw_exception helper function
saves the values of the required registers and passes them to throw_exception (), which will save them in the MonoContext structure. For exceptions thrown from
signal handlers, the MonoContext stucture is initialized from the signal info
received from the kernel.
During exception handling, the runtime needs to 'unwind' the stack, i.e.
given the state of the thread at a stack frame, construct the state at its
callers. Since this is platform specific, it is done by a platform specific
function called mono_arch_find_jit_info ().
Two kinds of stack frames need handling:
- Managed frames are easier. The JIT will store some information about each
managed method, like which callee-saved registers it uses. Based on this
information, mono_arch_find_jit_info () can find the values of the registers
on the thread stack, and restore them.
- Native frames are problematic, since we have no information about how to
unwind through them. Some compilers generate unwind information for code,
some don't. Also, there is no general purpose library to obtain and decode
this unwind information. So the runtime uses a different solution. When
managed code needs to call into native code, it does through a
managed->native wrapper function, which is generated by the JIT. This
function is responsible for saving the machine state into a per-thread
structure called MonoLMF (Last Managed Frame). These LMF structures are
stored on the threads stack, and are linked together using one of their
fields. When the unwinder encounters a native frame, it simply pops
one entry of the LMF 'stack', and uses it to restore the frame state to the
moment before control passed to native code. In effect, all successive native
frames are skipped together.
Problems/future work
--------------------
1. Async signal safety
----------------------
The current async signal handling code is not async safe, so it can and does
deadlock in practice. It needs to be rewritten to avoid taking locks at least
until it can determine that it was interrupting managed code.
Another problem is the managed stack frame unwinding code. It blindly assumes
that if the IP points into a managed frame, then all the callee saved
registers + the stack pointer are saved on the stack. This is not true if
the thread was interrupted while executing the method prolog/epilog.
2. Raising exceptions from native code
--------------------------------------
Currently, exceptions are raised by calling mono_raise_exception () in
the middle of runtime code. This has two problems:
- No cleanup is done, ie. if the caller of the function which throws an
exception has taken locks, or allocated memory, that is not cleaned up. For
this reason, it is only safe to call mono_raise_exception () 'very close' to
managed code, ie. in the icall functions themselves.
- To allow mono_raise_exception () to unwind through native code, we need to
save the LMF structures which can add a lot of overhead even in the common
case when no exception is thrown. So this is not zero-cost exception handling.
An alternative might be to use a JNI style set-pending-exception API.
Runtime code could call mono_set_pending_exception (), then return to its
caller with an error indication allowing the caller to clean up. When execution
returns to managed code, then managed->native wrapper could check whenever
there is a pending exception and throw it if neccesary. Since we already check
for pending thread interruption, this would have no overhead, allowing us
to drop the LMF saving/restoring code, or significant parts of it.
4. libunwind
------------
There is an OSS project called libunwind which is a standalone stack unwinding
library. It is currently in development, but it is used by default by gcc on
ia64 for its stack unwinding. The mono runtime also uses it on ia64. It has
several advantages in relation to our current unwinding code:
- it has a platform independent API, i.e. the same unwinding code can be used
on multiple platforms.
- it can generate unwind tables which are correct at every instruction, i.e.
can be used for unwinding from async signals.
- given sufficient unwind info generated by a C compiler, it can unwind through
C code.
- most of its API is async-safe
- it implements the gcc C++ exception handling API, so in theory it can
be used to implement mixed-language exception handling (i.e. C++ exception
caught in mono, mono exception caught in C++).
- it is MIT licensed
The biggest problem with libuwind is its platform support. ia64 support is
complete/well tested, while support for other platforms is missing/incomplete.
http://www.hpl.hp.com/research/linux/libunwind/
-110
View File
@@ -1,110 +0,0 @@
Exception Implementation in the Mono Runtime
Dietmar Maurer ([email protected])
(C) 2001 Ximian, Inc.
Exception implementation (jit):
===============================
Stack unwinding:
================
We record the code address (start_address, size) of all methods. That way it is
possible to map an instruction pointer (IP) to the method information needed
for unwinding the stack:
We also save a Last Managed Frame (LMF) structure at each call from managed to
unmanaged code. That way we can recover from exceptions inside unmanaged code.
void handle_exception ((struct sigcontext *ctx, gpointer obj)
{
if (ctx->bp < mono_end_of_stack) {
/* unhandled exception */
abort ();
}
info = mono_jit_info_table_find (mono_jit_info_table, ctx->ip);
if (info) { // we are inside managed code
if (ch = find_catch_handler ())
execute_catch_handler (ch, ctx, obj);
execute_all_finally_handler ();
// restore register, including IP and Frame pointer
ctx = restore_caller_saved_registers_from_ctx (ji, ctx);
// continue unwinding
handle_exception (ctx, obj);
} else {
lmf = get_last_managed_frame ();
// restore register, including IP and Frame pointer
ctx = restore_caller_saved_registers_from_lmf (ji, lmf);
// continue unwinding
handle_exception (ctx, obj);
}
}
Code generation:
================
leave: is simply translated into a branch to the target. If the leave
instruction is inside a finally block (but not inside another handler)
we call the finally handler before we branch to the target.
finally/endfinally, filter/endfilter: is translated into subroutine ending with
a "return" statement. The subroutine does not save EBP, because we need access
to the local variables of the enclosing method. Its is possible that
instructions inside those handlers modify the stack pointer, thus we save the
stack pointer at the start of the handler, and restore it at the end. We have
to use a "call" instruction to execute such finally handlers. This makes it
also possible to execute them inside the stack unwinding code. The exception
object for filters is passed in a local variable (cfg->exvar).
throw: we first save all regs into a sigcontext struct and then call the stack
unwinding code.
catch handler: catch 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.
-173
View File
@@ -1,173 +0,0 @@
Rules for opening shared files
==============================
File is already open, with share set to none:
Can not open again
File is already open for reading, with read share:
Can open for reading only, share must include read (can have write too)
File is already open for reading, with write share:
Can open for writing only, share must include read (can have write too)
File is already open for reading, with read + write share:
Can open for read, writing or both, share must include read (can have write too)
File is already open for writing, with read share:
Can open for reading only, share must include write (can have read too)
File is already open for writing, with write share:
Can open for writing only, share must include write (can have read too)
File is already open for writing, with read + write share:
Can open for reading, writing or both, share must include write (can have read too)
File is already open for reading + writing, with read share:
Can open for reading only, share must be read + write
File is already open for reading + writing, with write share:
Can open for for writing only, share must be read + write
File is already open for reading + writing, with read + write share:
Can open for read, writing or both, share must be read + write
Executive Summary
-----------------
Second open must have access within first share, must set second share to at least first access
Documenting code
----------------
#include <stdio.h>
#include <windows.h>
int access[] = {
GENERIC_READ,
GENERIC_WRITE,
GENERIC_READ | GENERIC_WRITE
};
char *access_names[] = {
"G_READ",
"G_WRITE",
"G_READ|G_WRITE"
};
int share[] = {
FILE_SHARE_READ,
FILE_SHARE_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE
};
char *share_names[] = {
"SHARE_READ",
"SHARE_WRITE",
"SHARE_READ|SHARE_WRITE"
};
void lockfiles(int access1, int share1, int access2, int share2)
{
HANDLE h1, h2;
BOOL ret;
if (access2 == 0 && share2 == 0) {
printf("\n");
printf("%22.22s\n%22.22s", access_names[access1], share_names[share1]);
}
h1 = CreateFile("lockedfile",
access[access1],
share[share1],
NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (h1 == INVALID_HANDLE_VALUE) {
printf("Open1 failed: %d\n", GetLastError());
return;
}
h2 = CreateFile("lockedfile",
access[access2],
share[share2],
NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (h2 == INVALID_HANDLE_VALUE) {
printf(" %4.4s", "");
} else {
printf(" %4.4s", "OK");
CloseHandle(h2);
}
CloseHandle(h1);
}
int main(int argc, char **argv)
{
int i, j, k, l;
printf("\t\t\t\t\t\t\tSecond Open\n");
printf("%22.22s G_RE G_RE G_RE G_WR G_WR G_WR G_RW G_RW G_RW\n", "");
printf("%22.22s S_RE S_WR S_RW S_RE S_WR S_RW S_RE S_WR S_RW", "First open --v ");
for (i = 0; i < 3; i++) {
for (j = 0; j < 3; j++) {
for (k = 0; k < 3; k++) {
for (l = 0; l < 3; l++) {
lockfiles(i, j, k, l);
}
}
}
}
return(0);
}
Code output
-----------
Second Open
G_RE G_RE G_RE G_WR G_WR G_WR G_RW G_RW G_RW
First open --v S_RE S_WR S_RW S_RE S_WR S_RW S_RE S_WR S_RW
G_READ
SHARE_READ OK OK
G_READ
SHARE_WRITE OK OK
G_READ
SHARE_READ|SHARE_WRITE OK OK OK OK OK OK
G_WRITE
SHARE_READ OK OK
G_WRITE
SHARE_WRITE OK OK
G_WRITE
SHARE_READ|SHARE_WRITE OK OK OK OK OK OK
G_READ|G_WRITE
SHARE_READ OK
G_READ|G_WRITE
SHARE_WRITE OK
G_READ|G_WRITE
SHARE_READ|SHARE_WRITE OK OK OK
-31
View File
@@ -1,31 +0,0 @@
* GC issues you need to be careful about when hacking on the mono runtime.
mono currently uses the Boehm garbage collection library. This is a conservative
GC package: this means that the memory is searched for possible memory references
to chunks allocated with the GC. Not all the memory is searched, but only the memory
allocated with the GC itself (unless you use the 'atomic' variant of the allocation
routines), the stack and global variables. Also, if the last reference to an object
is stored in an area of themory that is not searched, the object may be freed resulting
in memory corruption ind segfaults.
In particular, memory allocated with system's malloc() is not searched, so you need to be
careful NOT to store object references in memory allocated with malloc() (unless you are sure
that the object reference will be live at the same time in some other area under the control
of the GC (on the stack or in a global variable, for example). Since g_malloc()
ultimately calls system malloc() the data structures in GLib are not safe to
use to store object references.
Occasionally, you'll need to store some object reference from C code: in this case,
you must make sure that the store location is searched by the GC. You can safely
use thread local storage areas, global variables, stack variables. If you need a more
complicated data structure, you can use a hash table: MonoGHashTable.
This hash table has the same interface as GHashTable from GLib, just stick the "mono_"
prefix in function calls and the "Mono" prefix in the hash table type name.
This hash table ensures that object references stored in it are tracked by the GC, as long
as the pointer to the hash is tracked itself.
Other data structures that are allocated with the GC and are safe to use to store pointers
to GC-allocated memory, are MonoDomain (keeps track of many domain specfic objects)
and MonoVTable (referenced by MonoDomain: keeps track of the static data of a type
since that can hold references to objects).
-100
View File
@@ -1,100 +0,0 @@
Handling GC allocated objects in C
As part of an effort to improve our GC, we need to keep track
precisely of where objects are stored, so we can incrementally move
from the current conservative GC to a more advanced precise and moving GC.
Previously, all global C variables were considered GC roots, but this makes
the GC less efficient and increases the chances false references are found
to GC memory, hence retaining more memory than needed.
We need to tell the GC that some object is supposed to be kept alive
as if it was referenced in a global variable.
For Mono embedders
------------------
In C#, if you say:
class T {
static object o;
}
Any object which is stored in `o' is considered to be alive -- it will
not be collected. `o' is a member of the root set for the GC.
However, in C code, this is not the case. If you have:
static MonoObject* o = NULL;
The object in `o' will *NOT* be scanned.
If you need to store an object in a C variable and prevent it from being
collected, you need to acquire a GC handle for it.
guint32 handle = mono_gchandle_new (my_object, TRUE);
TRUE means the object will be pinned, so it won't move in memory
when we'll use a moving GC. You can access the MonoObject* referenced by
a handle with:
MonoObject* obj = mono_gchandle_get_target (handle);
When you don't need the handle anymore you need to call:
mono_gchandle_free (handle);
Note that if you assign a new object to the C var, you need to get a new
handle, it's not enough to store a new object in the C var.
So code that looked like this:
static MonoObject* o = NULL;
...
o = mono_object_new (...);
/* use o */
...
/* when done to allow the GC to collect o */
o = NULL;
should now be changed to:
static guint32 o_handle;
...
MonoObject *o = mono_object_new (...);
o_handle = mono_gchandle_new (o, TRUE);
/* use o or mono_gchandle_get_target (o_handle) */
...
/* when done to allow the GC to collect o */
mono_gchandle_free (o_handle);
For Mono runtime developers
---------------------------
There are two kinds of static vars used to store pointers to GC memory
that we need to consider:
*) objects
*) other memory chunks allocated with GC_MALLOC().
Objects should be dealt with the GC handle support as detailed above.
Other items should register the static pointer as an area to be considered
part of the root set with the following:
static gpointer my_gc_data = NULL;
...
MONO_GC_REGISTER_ROOT (my_gc_data);
my_gc_data = GC_MALLOC (...);
Note that this registration is not necessary for *LOCAL* variables,
as they are stored on the stack. It is only necessary for global variables,
as they are not a part of the GC's root set.
Once you have done the MONO_GC_REGISTER_ROOT, the variable is just like
a static variable in C#. To keep an object alive, you have the variable reference
the GC memory, to remove the reference, set the variable to NULL.
As we prepare the code for a precise GC, GC_MALLOC () will not be used anymore
in this way in most cases: we'll have a mechanism to specify exactly where
references to GC memory is stored. This mechanism is now available with the new GC,
see usages of mono_gc_alloc_fixed (), mono_gc_register_root () and
mono_gc_make_descr_from_bitmap().
See also docs/precise-gc for additional info.
-82
View File
@@ -1,82 +0,0 @@
Internal Call Topics
* Introduction
The Common Language Infrastructure allows for methods to be
implemented in unmanaged code. Unlike the Platform Invocation
services which provide marshalling and unmarshalling of data
from managed to unmanaged and viceversa the Internal calls do
not perform any kind of marshalling.
* Basic Type mapping
The following lists how the C# types are exposed to the C API.
C# type C type
-----------------------------
char gunichar2
bool MonoBoolean
sbyte signed char
byte guchar
short gint16
ushort guint16
int gint32
uint guint32
long gint64
ulong guint64
IntPtr/UIntPtr gpointer
object MonoObject*
string MonoString*
* Pointers
For ref and out paramaters you'll use the corresponding
pointer type.
So if you have a C# type listed as "ref int", you should use
"int *" in your implementation.
* Arrays
Arrays of any type must be described with a MonoArray* and the
elements must be accessed with the mono_array_* macros.
* Other Structures
Any other type that has a matching C structure representation,
should use a pointer to the struct instead of a generic
MonoObject pointer.
* Instance Methods.
Instance methods that are internal calls will receive as first argument
the instance object, so you must account for it in the C method signature:
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern override int GetHashCode ();
becomes:
gint32 ves_icall_System_String_GetHashCode (MonoString *this);
* How to hook internal calls with the runtime
Once you require an internal call in corlib, you need to
create a C implementation for it and register it in a
table in metadata/icall-def.h. See the top of that file
for more information.
If there are overloaded methods, you need also to
specify the signature of _all_ of them:
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern override void DoSomething ();
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern override void DoSomething (bool useful);
should be mapped with the following method names:
"DoSomething()", ves_icall_Namespace_ClassName_DoSomething,
"DoSomething(bool)", ves_icall_Namespace_ClassName_DoSomething_bool,
-75
View File
@@ -1,75 +0,0 @@
Mono Intermediate Representation Documentation
Operation: OP_ADDCC_IMM
Add immediate that will set the carry flag.
dreg:
Destination register
inst_imm
Immediate value to add.
sreg1:
Source register to add.
Operation: OP_CALL_HANDLER.
cil_code:
Points to the CIL where the LEAVE or LEAVE_S
instruction was found.
inst_target_bb:
The target basic block for this invocation.
This instruction must call the target basic block.
Operation: OP_CISINST
Implements the CEE_MONO_CISINST opcode that is decoded from
the CIL stream.
This opcode takes as input an object reference and a class,
and leaves on the assigned register:
0. if the object is an instance of the class,
1. if the object is not instance of the class,
2. if the object is a proxy whose type cannot be determined.
Operation: OP_CCASTCLASS
Implements the CEE_MONO_CCASTCLASS opcode that is decoded from
the CIL stream.
This opcode takes as input an object reference and a class,
and leaves on the assigned register:
0. if the object is an instance of the class,
1. if the object is a proxy whose type cannot be determined
throws an InvalidCastException exception otherwise.
Operation: OP_LOCALLOC
inst_left:
The value
ins->inst_left = *sp;
ins->cil_code = ip;
This is the equivalent of alloca() in a C implementation: it
allocates a bunch of bytes on the stack dynamically. Local
variables are allocated statically in the stack instead.
It is implemented by moving the stack pointer according to the
platform ABI: you may need to keep a specific frame register
to address local variables when LOCALLOC is used (the PPC code
does this, for example: ifyou're doing the s390 port I suggest
starting from that)
Operation: OP_SUBCC_IMM
Substract immediate that will set the borrow flag.
dreg:
Destination register
inst_imm
Immediate value to add.
sreg1:
Source register to add.
-283
View File
@@ -1,283 +0,0 @@
Register Allocation
===================
The current JIT implementation uses a tree matcher to generate code. We use a
simple algorithm to allocate registers in trees, and limit the number of used
temporary register to 4 when evaluating trees. So we can use 2 registers for
global register allocation.
Register Allocation for Trees
=============================
We always evaluate trees from left to right. When there are no more registers
available we need to spill values to memory. Here is the simplified algorithm.
gboolean
tree_allocate_regs (tree, exclude_reg)
{
if (!tree_allocate_regs (tree->left, -1))
return FALSE;
if (!tree_allocate_regs (tree->right, -1)) {
tree->left->spilled == TRUE;
free_used_regs (tree->left);
if (!tree_allocate_regs (tree->right, tree->left->reg))
return FALSE;
}
free_used_regs (tree->left);
free_used_regs (tree->right);
/* try to allocate a register (reg != exclude_reg) */
if ((tree->reg = next_free_reg (exclude_reg)) != -1)
return TRUE;
return FALSE;
}
The emit routing actually spills the registers:
tree_emit (tree)
{
tree_emit (tree->left);
if (tree->left->spilled)
save_reg (tree->left->reg);
tree_emit (tree->right);
if (tree->left->spilled)
restore_reg (tree->left->reg);
emit_code (tree);
}
Global Register Allocation
==========================
TODO.
Local Register Allocation
=========================
This section describes the cross-platform local register allocator which is
in the file mini-codegen.c.
The input to the allocator is a basic block which contains linear IL, ie.
instructions of the form:
DEST <- SRC1 OP SRC2
where DEST, SRC1, and SRC2 are virtual registers (vregs). The job of the
allocator is to assign hard or physical registers (hregs) to each virtual
registers so the vreg references in the instructions can be replaced with their
assigned hreg, allowing machine code to be generated later.
The allocator needs information about the number and types of arguments of
instructions. It takes this information from the machine description files. It
also needs arch specific information, like the number and type of the hard
registers. It gets this information from arch-specific macros.
Currently, the vregs and hregs are partitioned into two classes: integer and
floating point.
The allocator consists of two phases: In the first phase, a forward pass is
made over the instructions, collecting liveness information for vregs. In the
second phase, a backward pass is made over the instructions, assigning
registers. This backward mode of operation makes understanding the allocator
somewhat difficult to understand, but leads to better code in most cases.
Allocator state
===============
The state of the allocator is stored in two arrays: iassign and isymbolic.
iassign maps vregs to hregs, while isymbolic is the opposite.
For a vreg, iassign [vreg] can contain the following values:
* -1 vreg has no assigned hreg
* hreg index (>= 0) vreg is assigned to the given hreg. This means
later instructions (which we have already
processed due to the backward direction) expect
the value of vreg to be found in hreg.
* spill slot index (< -1) vreg is spilled to the given spill slot. This
means later instructions expect the value of
vreg to be found on the stack in the given
spill slot.
Also, the allocator keeps track of which hregs are free and which are used.
This information is stored in a bitmask called ifree_mask.
There is a similar set of data structures for floating point registers.
Spilling
========
When an allocator needs a free hreg, but all of them are assigned, it needs to
free up one of them. It does this by spilling the contents of the vreg which
is currently assigned to the selected hreg. Since later instructions expect
the vreg to be found in the selected hreg, the allocator emits a spill-load
instruction to load the value from the spill slot into the hreg after the
currently processed instruction. When the vreg which is spilled is a
destination in an instruction, the allocator will emit a spill-store to store
the value into the spill slot.
Fixed registers
===============
Some architectures, notably x86/amd64 require that the arguments/results of
some instructions be assigned to specific hregs. An example is the shift
opcodes on x86, where the second argument must be in ECX. The allocator
has support for this. It tries to allocate the vreg to the required hreg. If
thats not possible, then it will emit compensation code which moves values to
the correct registers before/after the instruction.
Fixed registers are mainly used on x86, but they are useful on more regular
architectures on well, for example to model that after a call instruction, the
return of the call is in a specific register.
A special case of fixed registers is two address architectures, like the x86,
where the instructions place their results into their first argument. This is
modelled in the allocator by allocating SRC1 and DEST to the same hreg.
Global registers
================
Some variables might already be allocated to hardware registers during the
global allocation phase. In this case, SRC1, SRC2 and DEST might already be
a hardware register. The allocator needs to do nothing in this case, except
when the architecture uses fixed registers, in which case it needs to emit
compensation code.
Register pairs
==============
64 bit arithmetic on 32 bit machines requires instructions whose arguments are
not registers, but register pairs. The allocator has support for this, both
for freely allocatable register pairs, and for register pairs which are
constrained to specific hregs (EDX:EAX on x86).
Floating point stack
====================
The x86 architecture uses a floating point register stack instead of a set of
fp registers. The allocator supports this by keeping track of the height of the
fp stack, and spilling/loading values from the stack as neccesary.
Calls
=====
Calls need special handling for two reasons: first, they will clobber all
caller-save registers, meaning their contents will need to be spilled. Also,
some architectures pass arguments in registers. The registers used for
passing arguments are usually the same as the ones used for local allocation,
so the allocator needs to handle them specially. This is done as follows:
the MonoInst for the call instruction contains a map mapping vregs which
contain the argument values to hregs where the argument needs to be placed,
like this (on amd64):
R33 -> RDI
R34 -> RSI
...
When the allocator processes the call instruction, it allocates the vregs
in the map to their associated hregs. So the call instruction is processed as
if having a variable number of arguments which fixed register assignments.
An example:
R33 <- 1
R34 <- 2
call
When the call instruction is processed, R33 is assigned to RDI, and R34 is
assigned to RSI. Later, when the two assignment instructions are processed,
R33 and R34 are already assigned to a hreg, so they are replaced with the
associated hreg leading to the following final code:
RDI <- 1
RSI <- 1
call
Machine description files
=========================
A typical entry in the machine description files looks like this:
shl: dest:i src1:i src2:s clob:1 len:2
The allocator is only interested in the dest,src1,src2 and clob fields.
It understands the following values for the dest, src1, src2 fields:
i - integer register
f - fp register
b - base register (same as i, but the instruction does not modify the reg)
m - fp register, even if an fp stack is used (no fp stack tracking)
It understands the following values for the clob field:
1 - sreg1 needs to be the same as dreg
c - instruction clobbers the caller-save registers
Beside these values, an architecture can define additional values (like the 's'
in the example). The allocator depends on a set of arch-specific macros to
convert these values to information it needs during allocation.
Arch specific macros
====================
These macros usually receive a value from the machine description file (like
the 's' in the example). The examples below are for x86.
/*
* A bitmask selecting the caller-save registers (these are used for local
* allocation).
*/
#define MONO_ARCH_CALLEE_REGS X86_CALLEE_REGS
/*
* A bitmask selecting the callee-saved registers (these are usually used for
* global allocation).
*/
#define MONO_ARCH_CALLEE_SAVED_REGS X86_CALLER_REGS
/* Same for the floating point registers */
#define MONO_ARCH_CALLEE_FREGS 0
#define MONO_ARCH_CALLEE_SAVED_FREGS 0
/* Whenever the target uses a floating point stack */
#define MONO_ARCH_USE_FPSTACK TRUE
/* The size of the floating point stack */
#define MONO_ARCH_FPSTACK_SIZE 6
/*
* Given a descriptor value from the machine description file, return the fixed
* hard reg corresponding to that value.
*/
#define MONO_ARCH_INST_FIXED_REG(desc) ((desc == 's') ? X86_ECX : ((desc == 'a') ? X86_EAX : ((desc == 'd') ? X86_EDX : ((desc == 'y') ? X86_EAX : ((desc == 'l') ? X86_EAX : -1)))))
/*
* A bitmask selecting the hregs which can be used for allocating sreg2 for
* a given instruction.
*/
#define MONO_ARCH_INST_SREG2_MASK(ins) (((ins [MONO_INST_CLOB] == 'a') || (ins [MONO_INST_CLOB] == 'd')) ? (1 << X86_EDX) : 0)
/*
* Given a descriptor value, return whenever it denotes a register pair.
*/
#define MONO_ARCH_INST_IS_REGPAIR(desc) (desc == 'l' || desc == 'L')
/*
* Given a descriptor value, and the first register of a regpair, return a
* bitmask selecting the hregs which can be used for allocating the second
* register of the regpair.
*/
#define MONO_ARCH_INST_REGPAIR_REG2(desc,hreg1) (desc == 'l' ? X86_EDX : -1)
-125
View File
@@ -1,125 +0,0 @@
Just some thoughts for the JITer:
General issues:
===============
We are designing a JIT compiler, so we have to consider two things:
- the quality of the generated code
- the time needed to generate that code
The current approach is to keep the JITer as simple as possible, and thus as
fast as possible. The generated code quality will suffer from that.
Register Allocation:
====================
With lcc you can assign a fixed register to a tree before register
allocation. For example this is needed by call, which return the value always
in EAX on x86. The current implementation works without such system, due to
special forest generation.
Different Register Sets:
========================
Most processors have more that one register set, at least one for floating
point values, and one for integers. Should we support architectures with more
that two sets? Does someone knows such an architecture?
64bit Integer Values:
=====================
I can imagine two different implementation. On possibility would be to treat
long (64bit) values simply like any other value type. This implies that we
call class methods for ALU operations like add or sub. Sure, this method will
be be a bit inefficient.
The more performant solution is to allocate two 32bit registers for each 64bit
value. We add a new non terminal to the monoburg grammar called "lreg". The
register allocation routines takes care of this non terminal and allocates two
32 bit registers for them.
Forest generation:
==================
Consider the following code:
OPCODE: STACK LOCALS
LDLOC.0 (5) [5,0]
LDC.1 (5,1) [5,0]
STLOC.0 (5) [1,0]
STLOC.1 () [1,5]
A simple forest generation generates:
STLOC.0(LDC.1)
STLOC.1(LDLOC.0)
Which is wrong, since it stores the wrong value (1 instead of 5). Instead we
must generate something like:
STLOC.TMP(LDLOC.0)
STLOC.0(LDC.1)
STLOC.1(LDLOC.TMP)
Where STLOC.TMP saves the value into a new temporary variable.
We also need a similar solution for basic block boundaries when the stack depth
is not zero. We can simply save those values to new temporary values. Consider
the following basic block with one instruction:
LDLOC.1
This should generate a tree like:
STLOC.TMP(LDLOC.1) Please notice that an intelligent register allocator can
still allocate registers for those new variables.
DAG handling:
=============
Monoburg can't handle DAGs, instead we need real trees as input for
the code generator. So we have two problems:
1.) DUP instruction: This one is obvious - we need to store the value
into a temporary variable to solve the problem.
2.) function calls: Chapter 12.8, page 343 of "A retargetable C compiler"
explains that: "because listing a call node will give it a hidden reference
from the code list". I don't understand that (can someone explain that?), but
there is another reason to save return values to temporaries: Consider the
following code:
x = f(y) + g(z); // all functions return integers
We could generate such a tree for this expression: STLOC(ADD(CALL,CALL))
The problem is that both calls returns the value in the same register,
so it is non trivial to generate code for that tree. We must copy one
register into another one, which make register allocation more complex.
The easier solution is store the result of function calls to
temporaries. This leads to the following forest:
STLOC(CALL)
STLOC(CALL)
STLOC(ADD (LDLOC, LDLOC))
This is what lcc is doing, if I understood 12.8, page 342, 343?
Possible Optimisations:
=======================
Miguel said ORP does some optimisation on IL level, for example moving array
bounds checking out of loops:
for (i = 0; i < N; i++) { check_range (a, i); a [i] = X; }
id transformed to:
if (in_range (a, 0, N)) { for (i = 0; i < N; i++) a[i] = X; }
else for (i = 0; i < N; i++) { check_range (a, i); a [i] = X; }
The "else" is only to keep original semantics (exception handling).
We need loop detection logic in order to implement this (dominator tree).
AFAIK CACAO also implements this.
-52
View File
@@ -1,52 +0,0 @@
Author: Dietmar Maurer ([email protected])
(C) 2001 Ximian, Inc.
Howto trigger JIT compilation
=============================
The JIT translates CIL code to native code on a per method basis. For example
if you have this simple program:
public class Test {
public static void Main () {
System.Console.WriteLine ("Hello");
}
}
the JIT first compiles the Main function. Unfortunately Main() contains another
reference to System.Console.WriteLine(), so the JIT also needs the address for
WriteLine() to generate a call instruction.
The simplest solution would be to JIT compile System.Console.WriteLine()
to generate that address. But that would mean that we JIT compile half of our
class library at once, since WriteLine() uses many other classes and function,
and we have to call the JIT for each of them. Even worse there is the
possibility of cyclic references, and we would end up in an endless loop.
Thus we need some kind of trampoline function for JIT compilation. Such a
trampoline first calls the JIT compiler to create native code, and then jumps
directly into that code. Whenever the JIT needs the address of a function (to
emit a call instruction) it uses the address of those trampoline functions.
One drawback of this approach is that it requires an additional indirection. We
always call the trampoline. Inside the trampoline we need to check if the
method is already compiled or not, and when not compiled we start JIT
compilation. After that we call the code. This process is quite time consuming
and shows very bad performance.
The solution is to add some logic to the trampoline function to detect from
where it is called. It is then possible for the JIT to patch the call
instruction in the caller, so that it directly calls the JIT compiled code
next time.
Implementation for x86
======================
emit-x86.c (arch_create_jit_trampoline): return the JIT trampoline function
emit-x86.c (x86_magic_trampoline): contains the code to detect the caller and
patch the call instruction.
emit-x86.c (arch_compile_method): JIT compile a method
-208
View File
@@ -1,208 +0,0 @@
* 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
-15
View File
@@ -1,15 +0,0 @@
This is a patch that can be applied to the magic file used by file(1) to
recognize mono assemblies.
Apply it to the magic file (usually in /usr/share/file/magic or
/usr/share/misc/magic) and recompile it with file -C.
--- magic.old 2006-03-24 21:12:25.000000000 +0100
+++ magic 2006-03-24 21:12:17.000000000 +0100
@@ -7205,6 +7205,7 @@
>>>>(0x3c.l+4) leshort 0x290 PA-RISC
>>>>(0x3c.l+22) leshort&0x0100 >0 32-bit
>>>>(0x3c.l+22) leshort&0x1000 >0 system file
+>>>>(0x3c.l+232) lelong >0 Mono/.Net assembly
>>>>(0x3c.l+0xf8) string UPX0 \b, UPX compressed
>>>>(0x3c.l+0xf8) search/0x140 PEC2 \b, PECompact2 compressed
-771
View File
@@ -1,771 +0,0 @@
A new JIT compiler for the Mono Project
Miguel de Icaza (miguel@{ximian.com,gnome.org}),
Paolo Molaro (lupus@{ximian.com,debian.org})
* Abstract
Mini is a new compilation engine for the Mono runtime. The
new engine is designed to bring new code generation
optimizations, portability and pre-compilation.
In this document we describe the design decisions and the
architecture of the new compilation engine.
* Introduction
Mono is a Open Source implementation of the .NET Framework: it
is made up of a runtime engine that implements the ECMA Common
Language Infrastructure (CLI), a set of compilers that target
the CLI and a large collection of class libraries.
This article discusses the new code generation facilities that
have been added to the Mono runtime.
First we discuss the overall architecture of the Mono runtime,
and how code generation fits into it; Then we discuss the
development and basic architecture of our first JIT compiler
for the ECMA CIL framework. The next section covers the
objectives for the work on the new JIT compiler, then we
discuss the new features available in the new JIT compiler,
and finally a technical description of the new code generation
engine.
* Architecture of the Mono Runtime
The Mono runtime is an implementation of the ECMA Common
Language Infrastructure (CLI), whose aim is to be a common
platform for executing code in multiple languages.
Languages that target the CLI generate images that contain
code in high-level intermediate representation called the
"Common Intermediate Language". This intermediate language is
rich enough to allow for programs and pre-compiled libraries
to be reflected. The execution environment allows for an
object oriented execution environment with single inheritance
and multiple interface implementations.
This runtime provides a number of services for programs that
are targeted to it: Just-in-Time compilation of CIL code into
native code, garbage collection, thread management, I/O
routines, single, double and decimal floating point,
asynchronous method invocation, application domains, and a
framework for building arbitrary RPC systems (remoting) and
integration with system libraries through the Platform Invoke
functionality.
The focus of this document is on the services provided by the
Mono runtime to transform CIL bytecodes into code that is
native to the underlying architecture.
The code generation interface is a set of macros that allow a
C programmer to generate code on the fly, this is done
through a set of macros found in the mono/jit/arch/ directory.
These macros are used by the JIT compiler to generate native
code.
The platform invocation code is interesting, as it generates
CIL code on the fly to marshal parameters, and then this
code is in turned processed by the JIT engine.
* Previous Experiences
Mono has built a JIT engine, which has been used to bootstrap
Mono since January, 2002. This JIT engine has reasonable
performance, and uses an tree pattern matching instruction
selector based on the BURS technology. This JIT compiler was
designed by Dietmar Maurer, Paolo Molaro and Miguel de Icaza.
The existing JIT compiler has three phases:
* Re-creation of the semantic tree from CIL
byte-codes.
* Instruction selection, with a cost-driven
engine.
* Code generation and register allocation.
It is also hooked into the rest of the runtime to provide
services like marshaling, just-in-time compilation and
invocation of "internal calls".
This engine constructed a collection of trees, which we
referred to as the "forest of trees", this forest is created by
"hydrating" the CIL instruction stream.
The first step was to identify the basic blocks on the method,
and computing the control flow graph (cfg) for it. Once this
information was computed, a stack analysis on each basic block
was performed to create a forest of trees for each one of
them.
So for example, the following statement:
int a, b;
...
b = a + 1;
Which would be represented in CIL as:
ldloc.0
ldc.i4.1
add
stloc.1
After the stack analysis would create the following tree:
(STIND_I4 ADDR_L[EBX|2] (
ADD (LDIND_I4 ADDR_L[ESI|1])
CONST_I4[1]))
This tree contains information from the stack analysis: for
instance, notice that the operations explicitly encode the
data types they are operating on, there is no longer an
ambiguity on the types, because this information has been
inferred.
At this point the JIT would pass the constructed forest of
trees to the architecture-dependent JIT compiler.
The architecture dependent code then performed register
allocation (optionally using linear scan allocation for
variables, based on life analysis).
Once variables had been assigned, a tree pattern matching with
dynamic programming is used (the tree pattern matcher is
custom build for each architecture, using a code
generator: monoburg). The instruction selector used cost
functions to select the best instruction patterns.
The instruction selector is able to produce instructions that
take advantage of the x86 instruction indexing instructions
for example.
One problem though is that the code emitter and the register
allocator did not have any visibility outside the current
tree, which meant that some redundant instructions were
generated. A peephole optimizer with this architecture was
hard to write, given the tree-based representation that is
used.
This JIT was functional, but it did not provide a good
architecture to base future optimizations on. Also the
line between architecture neutral and architecture
specific code and optimizations was hard to draw.
The JIT engine supported two code generation modes to support
the two optimization modes for applications that host multiple
application domains: generate code that will be shared across
application domains, or generate code that will not be shared
across application domains.
* Objectives of the new JIT engine.
We wanted to support a number of features that were missing:
* Ahead-of-time compilation.
The idea is to allow developers to pre-compile their code
to native code to reduce startup time, and the working
set that is used at runtime in the just-in-time compiler.
Although in Mono this has not been a visible problem, we
wanted to pro-actively address this problem.
When an assembly (a Mono/.NET executable) is installed in
the system, it would then be possible to pre-compile the
code, and have the JIT compiler tune the generated code
to the particular CPU on which the software is
installed.
This is done in the Microsoft.NET world with a tool
called ngen.exe
* Have a good platform for doing code optimizations.
The design called for a good architecture that would
enable various levels of optimizations: some
optimizations are better performed on high-level
intermediate representations, some on medium-level and
some at low-level representations.
Also it should be possible to conditionally turn these on
or off. Some optimizations are too expensive to be used
in just-in-time compilation scenarios, but these
expensive optimizations can be turned on for
ahead-of-time compilations or when using profile-guided
optimizations on a subset of the executed methods.
* Reduce the effort required to port the Mono code
generator to new architectures.
For Mono to gain wide adoption in the Unix world, it is
necessary that the JIT engine works in most of today's
commercial hardware platforms.
* Features of the new JIT engine.
The new JIT engine was architected by Dietmar Maurer and Paolo
Molaro, based on the new objectives.
Mono provides a number of services to applications running
with the new JIT compiler:
* Just-in-Time compilation of CLI code into native code.
* Ahead-of-Time compilation of CLI code, to reduce
startup time of applications.
A number of software development features are also available:
* Execution time profiling (--profile)
Generates a report of the times consumed by routines,
as well as the invocation times, as well as the
callers.
* Memory usage profiling (--profile)
Generates a report of the memory usage by a program
that is ran under the Mono JIT.
* Code coverage (--coverage)
* Execution tracing.
People who are interested in developing and improving the Mini
JIT compiler will also find a few useful routines:
* Compilation times
This is used to time the execution time for the JIT
when compiling a routine.
* Control Flow Graph and Dominator Tree drawing.
These are visual aids for the JIT developer: they
render representations of the Control Flow graph, and
for the more advanced optimizations, they draw the
dominator tree graph.
This requires Dot (from the graphwiz package) and Ghostview.
* Code generator regression tests.
The engine contains support for running regression
tests on the virtual machine, which is very helpful to
developers interested in improving the engine.
* Optimization benchmark framework.
The JIT engine will generate graphs that compare
various benchmarks embedded in an assembly, and run the
various tests with different optimization flags.
This requires Perl, GD::Graph.
* Flexibility
This is probably the most important component of the new code
generation engine. The internals are relatively easy to
replace and update, even large passes can be replaced and
implemented differently.
* New code generator
Compiling a method begins with the `mini_method_to_ir' routine
that converts the CIL representation into a medium
intermediate representation.
The mini_method_to_ir routine performs a number of operations:
* Flow analysis and control flow graph computation.
Unlike the previous version, stack analysis and control
flow graphs are computed in a single pass in the
mini_method_to_ir function, this is done for performance
reasons: although the complexity increases, the benefit
for a JIT compiler is that there is more time available
for performing other optimizations.
* Basic block computation.
mini_method_to_ir populates the MonoCompile structure
with an array of basic blocks each of which contains
forest of trees made up of MonoInst structures.
* Inlining
Inlining is no longer restricted to methods containing
one single basic block, instead it is possible to inline
arbitrary complex methods.
The heuristics to choose what to inline are likely going
to be tuned in the future.
* Method to opcode conversion.
Some method call invocations like `call Math.Sin' are
transformed into an opcode: this transforms the call
into a semantically rich node, which is later inline
into an FPU instruction.
Various Array methods invocations are turned into
opcodes as well (The Get, Set and Address methods)
* Tail recursion elimination
Basic blocks ****
The MonoInst structure holds the actual decoded instruction,
with the semantic information from the stack analysis.
MonoInst is interesting because initially it is part of a tree
structure, here is a sample of the same tree with the new JIT
engine:
(stind.i4 regoffset[0xffffffd4(%ebp)]
(add (ldind.i4 regoffset[0xffffffd8(%ebp)])
iconst[1]))
This is a medium-level intermediate representation (MIR).
Some complex opcodes are decomposed at this stage into a
collection of simpler opcodes. Not every complex opcode is
decomposed at this stage, as we need to preserve the semantic
information during various optimization phases.
For example a NEWARR opcode carries the length and the type of
the array that could be used later to avoid type checking or
array bounds check.
There are a number of operations supported on this
representation:
* Branch optimizations.
* Variable liveness.
* Loop optimizations: the dominator trees are
computed, loops are detected, and their nesting
level computed.
* Conversion of the method into static single assignment
form (SSA form).
* Dead code elimination.
* Constant propagation.
* Copy propagation.
* Constant folding.
Once the above optimizations are optionally performed, a
decomposition phase is used to turn some complex opcodes into
internal method calls. In the initial version of the JIT
engine, various operations on longs are emulated instead of
being inlined. Also the newarr invocation is turned into a
call to the runtime.
At this point, after computing variable liveness, it is
possible to use the linear scan algorithm for allocating
variables to registers. The linear scan pass uses the
information that was previously gathered by the loop nesting
and loop structure computation to favor variables in inner
loops. This process updates the basic block `nesting' field
which is later used during liveness analysis.
Stack space is then reserved for the local variables and any
temporary variables generated during the various
optimizations.
** Instruction selection
At this point, the BURS instruction selector is invoked to
transform the tree-based representation into a list of
instructions. This is done using a tree pattern matcher that
is generated for the architecture using the `monoburg' tool.
Monoburg takes as input a file that describes tree patterns,
which are matched against the trees that were produced by the
engine in the previous stages.
The pattern matching might have more than one match for a
particular tree. In this case, the match selected is the one
whose cost is the smallest. A cost can be attached to each
rule, and if no cost is provided, the implicit cost is one.
Smaller costs are selected over higher costs.
The cost function can be used to select particular blocks of
code for a given architecture, or by using a prohibitive high
number to avoid having the rule match.
The various rules that our JIT engine uses transform a tree of
MonoInsts into a list of monoinsts:
+-----------------------------------------------------------+
| Tree List |
| of ===> Instruction selection ===> of |
| MonoInst MonoInst. |
+-----------------------------------------------------------+
During this process various "types" of MonoInst kinds
disappear and turned into lower-level representations. The
JIT compiler just happens to reuse the same structure (this is
done to reduce memory usage and improve memory locality).
The instruction selection rules are split in a number of
files, each one with a particular purpose:
inssel.brg
Contains the generic instruction selection
patterns.
inssel-x86.brg
Contains x86 specific rules.
inssel-ppc.brg
Contains PowerPC specific rules.
inssel-long32.brg
burg file for 64bit instructions on 32bit architectures.
inssel-long.brg
burg file for 64bit architectures.
inssel-float.brg
burg file for floating point instructions
For a given build, a set of those files would be included.
For example, for the build of Mono on the x86, the following
set is used:
inssel.brg inssel-x86.brg inssel-long32.brg inssel-float.brg
** Native method generation
The native method generation has a number of steps:
* Architecture specific register allocation.
The information about loop nesting that was
previously gathered is used here to hint the
register allocator.
* Generating the method prolog/epilog.
* Optionally generate code to introduce tracing facilities.
* Hooking into the debugger.
* Performing any pending fixups.
* Code generation.
*** Code Generation
The actual code generation is contained in the architecture
specific portion of the compiler. The input to the code
generator is each one of the basic blocks with its list of
instructions that were produced in the instruction selection
phase.
During the instruction selection phase, virtual registers are
assigned. Just before the peephole optimization is performed,
physical registers are assigned.
A simple peephole and algebraic optimizer is ran at this
stage.
The peephole optimizer removes some redundant operations at
this point. This is possible because the code generation at
this point has visibility into the basic block that spans the
original trees.
The algebraic optimizer performs some simple algebraic
optimizations that replace expensive operations with cheaper
operations if possible.
The rest of the code generation is fairly simple: a switch
statement is used to generate code for each of the MonoInsts,
in the mono/mini/mini-ARCH.c files, the method is called
"mono_arch_output_basic_block".
We always try to allocate code in sequence, instead of just using
malloc. This way we increase spatial locality which gives a massive
speedup on most architectures.
*** Ahead of Time compilation
Ahead-of-Time compilation is a new feature of our new
compilation engine. The compilation engine is shared by the
Just-in-Time (JIT) compiler and the Ahead-of-Time compiler
(AOT).
The difference is on the set of optimizations that are turned
on for each mode: Just-in-Time compilation should be as fast
as possible, while Ahead-of-Time compilation can take as long
as required, because this is not done at a time critical
time.
With AOT compilation, we can afford to turn all of the
computationally expensive optimizations on.
After the code generation phase is done, the code and any
required fixup information is saved into a file that is
readable by "as" (the native assembler available on all
systems). This assembly file is then passed to the native
assembler, which generates a loadable module.
At execution time, when an assembly is loaded from the disk,
the runtime engine will probe for the existence of a
pre-compiled image. If the pre-compiled image exists, then it
is loaded, and the method invocations are resolved to the code
contained in the loaded module.
The code generated under the AOT scenario is slightly
different than the JIT scenario. It generates code that is
application-domain relative and that can be shared among
multiple thread.
This is the same code generation that is used when the runtime
is instructed to maximize code sharing on a multi-application
domain scenario.
* SSA-based optimizations
SSA form simplifies many optimization because each variable
has exactly one definition site. This means that each
variable is only initialized once.
For example, code like this:
a = 1
..
a = 2
call (a)
Is internally turned into:
a1 = 1
..
a2 = 2
call (a2)
In the presence of branches, like:
if (x)
a = 1
else
a = 2
call (a)
The code is turned into:
if (x)
a1 = 1;
else
a2 = 2;
a3 = phi (a1, a2)
call (a3)
All uses of a variable are "dominated" by its definition
This representation is useful as it simplifies the
implementation of a number of optimizations like conditional
constant propagation, array bounds check removal and dead code
elimination.
* Register allocation.
Global register allocation is performed on the medium
intermediate representation just before instruction selection
is performed on the method. Local register allocation is
later performed at the basic-block level on the
Global register allocation uses the following input:
1) set of register-sized variables that can be allocated to a
register (this is an architecture specific setting, for x86
these registers are the callee saved register ESI, EDI and
EBX).
2) liveness information for the variables
3) (optionally) loop info to favor variables that are used in
inner loops.
During instruction selection phase, symbolic registers are
assigned to temporary values in expressions.
Local register allocation assigns hard registers to the
symbolic registers, and it is performed just before the code
is actually emitted and is performed at the basic block level.
A CPU description file describes the input registers, output
registers, fixed registers and clobbered registers by each
operation.
* BURG Code Generator Generator
monoburg was written by Dietmar Maurer. It is based on the
papers from Christopher W. Fraser, Robert R. Henry and Todd
A. Proebsting: "BURG - Fast Optimal Instruction Selection and
Tree Parsing" and "Engineering a Simple, Efficient Code
Generator Generator".
The original BURG implementation is unable to work on DAGs, instead only
trees are allowed. Our monoburg implementations is able to generate tree
matcher which works on DAGs, and we use this feature in the new
JIT. This simplifies the code because we can directly pass DAGs and
don't need to convert them to trees.
* Adding IL opcodes: an excercise (from a post by Paolo Molaro)
mini.c is the file that read the IL code stream and decides
how any single IL instruction is implemented
(mono_method_to_ir () func), so you always have to add an
entry to the big switch inside the function: there are plenty
of examples in that file.
An IL opcode can be implemented in a number of ways, depending
on what it does and how it needs to do it.
Some opcodes are implemented using a helper function: one of
the simpler examples is the CEE_STELEM_REF implementation.
In this case the opcode implementation is written in a C
function. You will need to register the function with the jit
before you can use it (mono_register_jit_call) and you need to
emit the call to the helper using the mono_emit_jit_icall()
function.
This is the simpler way to add a new opcode and it doesn't
require any arch-specific change (though it's limited to what
you can do in C code and the performance may be limited by the
function call).
Other opcodes can be implemented with one or more of the already
implemented low-level instructions.
An example is the OP_STRLEN opcode which implements
String.Length using a simple load from memory. In this case
you need to add a rule to the appropriate burg file,
describing what are the arguments of the opcode and what is,
if any, it's 'return' value.
The OP_STRLEN case is:
reg: OP_STRLEN (reg) {
MONO_EMIT_LOAD_MEMBASE_OP (s, tree, OP_LOADI4_MEMBASE, state->reg1,
state->left->reg1, G_STRUCT_OFFSET (MonoString, length));
}
The above means: the OP_STRLEN takes a register as an argument
and returns its value in a register. And the implementation
of this is included in the braces.
The opcode returns a value in an integer register
(state->reg1) by performing a int32 load of the length field
of the MonoString represented by the input register
(state->left->reg1): before the burg rules are applied, the
internal representation is based on trees, so you get the
left/right pointers (state->left and state->right
respectively, the result is stored in state->reg1).
This instruction implementation doesn't require arch-specific
changes (it is using the MONO_EMIT_LOAD_MEMBASE_OP which is
available on all platforms), and usually the produced code is
fast.
Next we have opcodes that must be implemented with new low-level
architecture specific instructions (either because of performance
considerations or because the functionality can't get implemented in
other ways).
You also need a burg rule in this case, too. For example,
consider the OP_CHECK_THIS opcode (used to raise an exception
if the this pointer is null). The burg rule simply reads:
stmt: OP_CHECK_THIS (reg) {
mono_bblock_add_inst (s->cbb, tree);
}
Note that this opcode does not return a value (hence the
"stmt") and it takes a register as input.
mono_bblock_add_inst (s->cbb, tree) just adds the instruction
(the tree variable) to the current basic block (s->cbb). In
mini this is the place where the internal representation
switches from the tree format to the low-level format (the
list of simple instructions).
In this case the actual opcode implementation is delegated to
the arch-specific code. A low-level opcode needs an entry in
the machine description (the *.md files in mini/). This entry
describes what kind of registers are used if any by the
instruction, as well as other details such as constraints or
other hints to the low-level engine which are architecture
specific.
cpu-pentium.md, for example has the following entry:
checkthis: src1:b len:3
This means the instruction uses an integer register as a base
pointer (basically a load or store is done on it) and it takes
3 bytes of native code to implement it.
Now you just need to provide the low-level implementation for
the opcode in one of the mini-$arch.c files, in the
mono_arch_output_basic_block() function. There is a big switch
here too. The x86 implementation is:
case OP_CHECK_THIS:
/* ensure ins->sreg1 is not NULL */
x86_alu_membase_imm (code, X86_CMP, ins->sreg1, 0, 0);
break;
If the $arch-codegen.h header file doesn't have the code to
emit the low-level native code, you'll need to write that as
well.
Complex opcodes with register constraints may require other
changes to the local register allocator, but usually they are
not needed.
* Future
Profile-based optimization is something that we are very
interested in supporting. There are two possible usage
scenarios:
* Based on the profile information gathered during
the execution of a program, hot methods can be compiled
with the highest level of optimizations, while bootstrap
code and cold methods can be compiled with the least set
of optimizations and placed in a discardable list.
* Code reordering: this profile-based optimization would
only make sense for pre-compiled code. The profile
information is used to re-order the assembly code on disk
so that the code is placed on the disk in a way that
increments locality.
This is the same principle under which SGI's cord program
works.
The nature of the CIL allows the above optimizations to be
easy to implement and deploy. Since we live and define our
universe for these things, there are no interactions with
system tools required, nor upgrades on the underlying
infrastructure required.
Instruction scheduling is important for certain kinds of
processors, and some of the framework exists today in our
register allocator and the instruction selector to cope with
this, but has not been finished. The instruction selection
would happen at the same time as local register allocation. <
-461
View File
@@ -1,461 +0,0 @@
Mono JIT porting guide.
Paolo Molaro ([email protected])
* Introduction
This documents describes the process of porting the mono JIT
to a new CPU architecture. The new mono JIT has been designed
to make porting easier though at the same time enable the port
to take full advantage from the new architecture features and
instructions. Knowledge of the mini architecture (described in
the mini-doc.txt file) is a requirement for understanding this
guide, as well as an earlier document about porting the mono
interpreter (available on the web site).
There are six main areas that a port needs to implement to
have a fully-functional JIT for a given architecture:
1) instruction selection
2) native code emission
3) call conventions and register allocation
4) method trampolines
5) exception handling
6) minor helper methods
To take advantage of some not-so-common processor features
(for example conditional execution of instructions as may be
found on ARM or ia64), it may be needed to develop an
high-level optimization, but doing so is not a requirement for
getting the JIT to work.
We'll see in more details each of the steps required, note,
though, that a new port may just as well start from a
cut&paste of an existing port to a similar architecture (for
example from x86 to amd64, or from powerpc to sparc).
The architecture specific code is split from the rest of the
JIT, for example the x86 specific code and data is all
included in the following files in the distribution:
mini-x86.h mini-x86.c
inssel-x86.brg
cpu-pentium.md
tramp-x86.c
exceptions-x86.c
I suggest a similar split for other architectures as well.
Note that this document is still incomplete: some sections are
only sketched and some are missing, but the important info to
get a port going is already described.
* Architecture-specific instructions and instruction selection.
The JIT already provides a set of instructions that can be
easily mapped to a great variety of different processor
instructions. Sometimes it may be necessary or advisable to
add a new instruction that represent more closely an
instruction in the architecture. Note that a mini instruction
can be used to represent also a short sequence of CPU
low-level instructions, but note that each instruction
represents the minimum amount of code the instruction
scheduler will handle (i.e., the scheduler won't schedule the
instructions that compose the low-level sequence as individual
instructions, but just the whole sequence, as an indivisible
block).
New instructions are created by adding a line in the
mini-ops.h file, assigning an opcode and a name. To specify
the input and output for the instruction, there are two
different places, depending on the context in which the
instruction gets used.
If the instruction is used in the tree representation, the
input and output types are defined by the BURG rules in the
*.brg files (the usual non-terminals are 'reg' to represent a
normal register, 'lreg' to represent a register or two that
hold a 64 bit value, freg for a floating point register).
If an instruction is used as a low-level CPU instruction, the
info is specified in a machine description file. The
description file is processed by the genmdesc program to
provide a data structure that can be easily used from C code
to query the needed info about the instruction.
As an example, let's consider the add instruction for both x86
and ppc:
x86 version:
add: dest:i src1:i src2:i len:2 clob:1
ppc version:
add: dest:i src1:i src2:i len:4
Note that the instruction takes two input integer registers on
both CPU, but on x86 the first source register is clobbered
(clob:1) and the length in bytes of the instruction differs.
Note that integer adds and floating point adds use different
opcodes, unlike the IL language (64 bit add is done with two
instructions on 32 bit architectures, using a add that sets
the carry and an add with carry).
A specific CPU port may assign any meaning to the clob field
for an instruction since the value will be processed in an
arch-specific file anyway.
See the top of the existing cpu-pentium.md file for more info
on other fields: the info may or may not be applicable to a
different CPU, in this latter case the info can be ignored.
The code in mini.c together with the BURG rules in inssel.brg,
inssel-float.brg and inssel-long32.brg provides general
purpose mappings from the tree representation to a set of
instructions that should be easily implemented in any
architecture. To allow for additional arch-specific
functionality, an arch-specific BURG file can be used: in this
file arch-specific instructions can be selected that provide
better performance than the general instructions or that
provide functionality that is needed by the JIT but that
cannot be expressed in a general enough way.
As an example, x86 has the special instruction "push" to make
it easier to implement the default call convention (passing
arguments on the stack): almost all the other architectures
don't have such an instruction (and don't need it anyway), so
we added a special rule in the inssel-x86.brg file for it.
So, one of the first things needed in a port is to write a
cpu-$(arch).md machine description file and fill it with the
needed info. As a start, only a few instructions can be
specified, like the ones required to do simple integer
operations. The default rules of the instruction selector will
emit the common instructions and so we're ready to go for the
next step in porting the JIT.
*) Native code emission
Since the first step in porting mono to a new CPU is to port
the interpreter, there should be already a file that allows
the emission of binary native code in a buffer for the
architecture. This file should be placed in the
mono/arch/$(arch)/
directory.
The bulk of the code emission happens in the mini-$(arch).c
file, in a function called mono_arch_output_basic_block
(). This function takes a basic block, walks the list of
instructions in the block and emits the binary code for each.
Optionally a peephole optimization pass is done on the basic
block, but this can be left for later, when the port actually
works.
This function is very simple, there is just a big switch on
the instruction opcode and in the corresponding case the
functions or macros to emit the binary native code are
used. Note that in this function the lengths of the
instructions are used to determine if the buffer for the code
needs enlarging.
To complete the code emission for a method, a few other
functions need implementing as well:
mono_arch_emit_prolog ()
mono_arch_emit_epilog ()
mono_arch_patch_code ()
mono_arch_emit_prolog () will emit the code to setup the stack
frame for a method, optionally call the callbacks used in
profiling and tracing, and move the arguments to their home
location (in a caller-save register if the variable was
allocated to one, or in a stack location if the argument was
passed in a volatile register and wasn't allocated a
non-volatile one). caller-save registers used by the function
are saved in the prolog as well.
mono_arch_emit_epilog () will emit the code needed to return
from the function, optionally calling the profiling or tracing
callbacks. At this point the basic blocks or the code that was
moved out of the normal flow for the function can be emitted
as well (this is usually done to provide better info for the
static branch predictor). In the epilog, caller-save
registers are restored if they were used.
Note that, to help exception handling and stack unwinding,
when there is a transition from managed to unmanaged code,
some special processing needs to be done (basically, saving
all the registers and setting up the links in the Last Managed
Frame structure).
When the epilog has been emitted, the upper level code
arranges for the buffer of memory that contains the native
code to be copied in an area of executable memory and at this
point, instructions that use relative addressing need to be
patched to have the right offsets: this work is done by
mono_arch_patch_code ().
* Call conventions and register allocation
To account for the differences in the call conventions, a few functions need to
be implemented.
mono_arch_allocate_vars () assigns to both arguments and local
variables the offset relative to the frame register where they
are stored, dead variables are simply discarded. The total
amount of stack needed is calculated.
mono_arch_call_opcode () is the function that more closely
deals with the call convention on a given system. For each
argument to a function call, an instruction is created that
actually puts the argument where needed, be it the stack or a
specific register. This function can also re-arrange th order
of evaluation when multiple arguments are involved if needed
(like, on x86 arguments are pushed on the stack in reverse
order). The function needs to carefully take into accounts
platform specific issues, like how structures are returned as
well as the differences in size and/or alignment of managed
and corresponding unmanaged structures.
The other chunk of code that needs to deal with the call
convention and other specifics of a CPU, is the local register
allocator, implemented in a function named
mono_arch_local_regalloc (). The local allocator deals with a
basic block at a time and basically just allocates registers
for temporary values during expression evaluation, spilling
and unspilling as necessary.
The local allocator needs to take into account clobbering
information, both during simple instructions and during
function calls and it needs to deal with other
architecture-specific weirdnesses, like instructions that take
inputs only in specific registers or output only is some.
Some effort will be put later in moving most of the local
register allocator to a common file so that the code can be
shared more for similar, risc-like CPUs. The register
allocator does a first pass on the instructions in a block,
collecting liveness information and in a backward pass on the
same list performs the actual register allocation, inserting
the instructions needed to spill values, if necessary.
The cross-platform local register allocator is now implemented
and it is documented in the jit-regalloc file.
When this part of code is implemented, some testing can be
done with the generated code for the new architecture. Most
helpful is the use of the --regression command line switch to
run the regression tests (basic.cs, for example).
Note that the JIT will try to initialize the runtime, but it
may not be able yet to compile and execute complex code:
commenting most of the code in the mini_init() function in
mini.c is needed to let the JIT just compile the regression
tests. Also, using multiple -v switches on the command line
makes the JIT dump an increasing amount of information during
compilation.
Values loaded into registers need to be extened as needed by
the ECMA specs:
*) integers smaller than 4 bytes are extended to int32 values
*) 32 bit floats are extended to double precision (in particular
this means that currently all the floating point operations operate
on doubles)
* Method trampolines
To get better startup performance, the JIT actually compiles a
method only when needed. To achieve this, when a call to a
method is compiled, we actually emit a call to a magic
trampoline. The magic trampoline is a function written in
assembly that invokes the compiler to compile the given method
and jumps to the newly compiled code, ensuring the arguments
it received are passed correctly to the actual method.
Before jumping to the new code, though, the magic trampoline
takes care of patching the call site so that next time the
call will go directly to the method instead of the
trampoline. How does this all work?
mono_arch_create_jit_trampoline () creates a small function
that just preserves the arguments passed to it and adds an
additional argument (the method to compile) before calling the
generic trampoline. This small function is called the specific
trampoline, because it is method-specific (the method to
compile is hard-code in the instruction stream).
The generic trampoline saves all the arguments that could get
clobbered and calls a C function that will do two things:
*) actually call the JIT to compile the method
*) identify the calling code so that it can be patched to call directly
the actual method
If the 'this' argument to a method is a boxed valuetype that
is passed to a method that expects just a pointer to the data,
an additional unboxing trampoline will need to be inserted as
well.
* Exception handling
Exception handling is likely the most difficult part of the
port, as it needs to deal with unwinding (both managed and
unmanaged code) and calling catch and filter blocks. It also
needs to deal with signals, because mono takes advantage of
the MMU in the CPU and of the operation system to handle
dereferences of the NULL pointer. Some of the function needed
to implement the mechanisms are:
mono_arch_get_throw_exception () returns a function that takes
an exception object and invokes an arch-specific function that
will enter the exception processing. To do so, all the
relevant registers need to be saved and passed on.
mono_arch_handle_exception () this function takes the
exception thrown and a context that describes the state of the
CPU at the time the exception was thrown. The function needs
to implement the exception handling mechanism, so it makes a
search for an handler for the exception and if none is found,
it follows the unhandled exception path (that can print a
trace and exit or just abort the current thread). The
difficulty here is to unwind the stack correctly, by restoring
the register state at each call site in the call chain,
calling finally, filters and handler blocks while doing so.
As part of exception handling a couple of internal calls need
to be implemented as well.
ves_icall_get_frame_info () returns info about a specific
frame.
mono_jit_walk_stack () walks the stack and calls a callback with info for
each frame found.
ves_icall_get_trace () return an array of StackFrame objects.
** Code generation for filter/finally handlers
Filter and finally handlers are called from 2 different locations:
1.) from within the method containing the exception clauses
2.) from the stack unwinding code
To make this possible we implement them like subroutines,
ending with a "return" statement. The subroutine does not save
the base pointer, because we need access to the local
variables of the enclosing method. Its is possible that
instructions inside those handlers modify the stack pointer,
thus we save the stack pointer at the start of the handler,
and restore it at the end. We have to use a "call" instruction
to execute such finally handlers.
The MIR code for filter and finally handlers looks like:
OP_START_HANDLER
...
OP_END_FINALLY | OP_ENDFILTER(reg)
OP_START_HANDLER: should save the stack pointer somewhere
OP_END_FINALLY: restores the stack pointers and returns.
OP_ENDFILTER (reg): restores the stack pointers and returns the value in "reg".
** Calling finally/filter handlers
There is a special opcode to call those handler, its called
OP_CALL_HANDLER. It simple emits a call instruction.
Its a bit more complex to call handler from outside (in the
stack unwinding code), because we have to restore the whole
context of the method first. After that we simply emit a call
instruction to invoke the handler. Its usually possible to use
the same code to call filter and finally handlers (see
arch_get_call_filter).
** Calling catch handlers
Catch handlers are always called from the stack unwinding
code. Unlike finally clauses or filters, catch handler never
return. Instead we simply restore the whole context, and
restart execution at the catch handler.
** Passing Exception objects to catch handlers and filters.
We use a local variable to store exception objects. The stack
unwinding code must store the exception object into this
variable before calling catch handler or filter.
* Minor helper methods
A few minor helper methods are referenced from the arch-independent code.
Some of them are:
*) mono_arch_cpu_optimizations ()
This function returns a mask of optimizations that
should be enabled for the current CPU and a mask of
optimizations that should be excluded, instead.
*) mono_arch_regname ()
Returns the name for a numeric register.
*) mono_arch_get_allocatable_int_vars ()
Returns a list of variables that can be allocated to
the integer registers in the current architecture.
*) mono_arch_get_global_int_regs ()
Returns a list of caller-save registers that can be
used to allocate variables in the current method.
*) mono_arch_instrument_mem_needs ()
*) mono_arch_instrument_prolog ()
*) mono_arch_instrument_epilog ()
Functions needed to implement the profiling interface.
* Writing regression tests
Regression tests for the JIT should be written for any bug
found in the JIT in one of the *.cs files in the mini
directory. Eventually all the operations of the JIT should be
tested (including the ones that get selected only when some
specific optimization is enabled).
* Platform specific optimizations
An example of a platform-specific optimization is the peephole
optimization: we look at a small window of code at a time and
we replace one or more instructions with others that perform
better for the given architecture or CPU.
* 64 bit support tips, by Zoltan Varga ([email protected])
For a 64-bit port of the Mono runtime, you will typically do
the following:
* need to use inssel-long.brg instead of
inssel-long32.brg.
* need to implement lots of new opcodes:
OP_I<OP> is 32 bit op
OP_L<OP> and CEE_<OP> are 64 bit ops
The 64 bit version of an existing port might share the code
with the 32 bit port (for example SPARC/SPARV9), or it might
be separate (x86/AMD64).
That will depend on the similarities of the two instructions
sets/ABIs etc.
The runtime and most parts of the JIT are 64 bit clean
at this point, so the only parts which require changing are
the arch dependent files.
-98
View File
@@ -1,98 +0,0 @@
=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
-68
View File
@@ -1,68 +0,0 @@
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.
-63
View File
@@ -1,63 +0,0 @@
Author: Dietmar Maurer ([email protected])
(C) 2001 Ximian, Inc.
Object and VTable layout
========================
The first pointer inside an Object points to a MonoVtable structure. Objects
also contains a MonoThreadsSync structure which is used by the mono Thread
implementation.
typedef struct {
MonoVTable *vtable;
MonoThreadsSync synchronisation;
/* object specific data goes here */
} MonoObject;
The MonoVtable contains the vtable, interface offsets and a pointer to static
class data. Each object/vtable belongs to exactly one AppDomain.
typedef struct {
MonoClass *klass;
MonoDomain *domain;
gpointer *interface_offsets;
/* a pointer to static data */
gpointer data;
/* the variable sized vtable is included at the end */
gpointer vtable [0];
} MonoVTable;
The MonoClass contains domain independent Class infos.
typedef struct {
/* various class infos */
MonoClass *parent;
const char *name;
const char *name_space;
...
} MonoClass;
Calling virtual functions:
==========================
Each MonoMethod (if virtual) has an associated slot, which is an index into the
VTable. So we can use the following code to compute the address of a virtual
function:
method_addr = object->vtable->vtable [method->slot];
Calling interface methods:
==========================
Each interface class is associated with an unique ID. The following code
computes the address of an interface function:
method_addr = *(object->vtable->interface_offsets [interface_id] + method->slot*4);
-113
View File
@@ -1,113 +0,0 @@
* 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...)
-97
View File
@@ -1,97 +0,0 @@
While the Boehm GC is quite good, we need to move to a
precise, generational GC for better performance and smaller
memory usage (no false-positives memory retentions with big
allocations).
The first working implementation is committed in metadata/sgen-gc.c
as of May, 2006. This is a two-generations moving collector and it is
currently used to shake out all the issues in the runtime that need to
be fixed in order to support precise generational and moving collectors.
The two main issues are:
1) identify as precisely as possible all the pointers to managed objects
2) insert write barriers to be able to account for pointers in the old
generation pointing to objects in the newer generations
Point 1 is mostly complete. The runtime can register additional roots
with the GC as needed and it provides to the GC precise info on the
objects layout. In particular with the new precise GC it is not possible to
store GC-allocated memory in IntPtr or UIntPtr fields (in fact, the new GC
can allocate only objects and not GC-tracked untyped blobs of memory
as the Boehm GC can do). Precise info is tracked also for static fields.
What is currently missing here is:
*) precise info for ThreadStatic and ContextStatic storage (this also requires
better memory management for these sub-heaps)
*) precise info for HANDLE_NORMAL gc handles
*) precise info for thread stacks (this requires storing the info about
managed stack frames along with the jitted code for a method and doing the
stack walk for the active threads, considering conservatively the unmanaged
stack frames and precisely the managed ones. mono_jit_info_table_find () must
be made lock-free for this to work). Precise type info must be maintained
for all the local variables. Precise type info should be maintained also
for registers.
Note that this is not a correctness issue, but a performance one. The more
pointers to objects we can deal with precisely, the more effective the GC
will be, since it will be able to move the objects. The first two todo items
are mostly trivial, while handling precisely the thread stacks is complex to
implement and to test and it has a cpu and memory use runtime penalty.
In practice we need to be able to describe to the GC _all_ the memory
locations that can hold a pointer to a managed object and we must tell it also
if that location can contain:
*) a pointer to the start of an object or NULL (typically a field of an object)
*) a pinning pointer to an object (typically the result of the fixed statment in C#)
*) a pointer to the managed heap or to other locations (a typical stack location)
Since we need to provide to the GC all the locations it's not possible anymore to
store any object in unmanaged memory if it is not explicitly pinned for the entire
time the object is stored there. With the Boehm GC this was possible if the object
was kept alive in some way, but with the new GC it is not valid anymore, because
objects can move: the object will be kept alive because of the other reference, but the
pointer in unmanaged memory won't be updated to the new location where the object
has been moved.
Most of the work for inserting write barrier calls is already done as well,
but there may be still bugs in this area. In particular for it to work,
the correct IL opcodes must be used when storing an object in a field or
array element (most of the marshal.c code needs to be reviewed to use
stind.ref instead of stind.i/stind.u when needed). When this is done, the
JIT will take care of automatically inserting the write barriers.
What the JIT does automatically for managed code, must be done manually
in the runtime C code that deals with storing fields in objects and arrays
or otherwise any operation that could change a pointer in the old generation
to point to an object in the new generation. Sample cases are as follows:
*) when using C structs that map to managed objects the following macro
must be used to store an object in a field (the macro must not be used
when storing non-objects and it should not be used when storing NULL values):
MONO_OBJECT_SETREF(obj,fieldname,value)
where obj is the pointer to the object, fieldname is the name of the field in
the C struct and value is a MonoObject*. Note that obj must be a correctly
typed pointer to a struct that embeds MonoObject as the first field and
have fieldname as a field.
*) when setting the element of an array of references to an object, use the
following macro:
mono_array_setref (array,index,value)
*) when copying a number of references from an array to another:
mono_array_memcpy_refs (dest,destidx,src,srcidx,count)
*) when copying a struct that may containe reference fields, use:
void mono_value_copy (gpointer dest, gpointer src, MonoClass *klass)
*) when it is unknown if a pointer points to the stack or to the heap and an
object needs to be stored through it, use:
void mono_gc_wbarrier_generic_store (gpointer ptr, MonoObject* value)
Note that the support for write barriers in the runtime could be
used to enable also the generational features of the Boehm GC.
Some more documentation on the new GC is available at:
http://www.mono-project.com/Compacting_GC
-16
View File
@@ -1,16 +0,0 @@
<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.
-253
View File
@@ -1,253 +0,0 @@
Runtime support for Remoting
============================
The runtime supports a special objects called "TransparentProxy". You can
create objects of this type by calling GetTransparentProxy() on a "RealProxy"
object.
LDFLD/STFLD for transparent proxies
===================================
Access to fields must be redirected to the remote object. System.Object has
some special methods for that:
void FieldGetter (string typeName, string fieldName, ref object val);
void FieldSetter (string typeName, string fieldName, object val);
This methods are never called on actual object. The are only used to pack
LDFLD/STFLD operations into method call messages, which are then passed to the
RealProxy::Invoke() method.
There are two helper methods which can be used by the JIT and the interpreter
to convert LDFLD/STFLD operations into messages and then call
RealProxy::Invoke(): mono_store_remote_field() and mono_load_remote_field().
Cross app domain optimizations
==============================
The new implementation of the cross app domain channel makes a minimal use of
the remoting infrastructure. The idea is to create remoting wrappers specific
for cross app domain calls, which take the input paramers, switch the domain
and dispatch the call in the new domain.
When an vtable for a proxy needs to be created, the runtime checks if the proxy
is referencing an object that belongs to another domain in the same process.
In such case, the fast xdomain wrapper is returned instead of the regular one.
The xdomain wrapper will have a different structure depending on the signature
of the method it wraps, since different types have different marshalling needs.
There are four types of marshalling, the first one is the fastest, the last one
is the slowest:
1) No marshalling at all: this is for primitive types.
2) Internal copy of the object in the new domain: some system types can
be copied from one domain to the other by the runtime. This currently
applies to arrays of primitive types (or arrays of values that can be
internally copied), String and StringBuilder. We can add more types in
the future.
3) Internal copy for Out parameters. It is a specific case of the previous
type, when an input parameter has the [Out] attribute, which means that the
content of the object that is marshalled into the new domain, needs to be
copied over the instance of the original object. This applies to arrays
of primitive types and StringBuilder. This is used, for example, to be able
to call methods such as Stream.Read ([Out]buffer, pos, lengh) across domains.
4) Serialization. The value is serialized in one domain and deserialized in the
other one.
The xdomain wrapper will be generated according to the marshalling needs of
each parameter.
The cross domain wrapper is divided in two methods. The first method (the
wrapper itself) takes the input parameters and serializes those that need to
be serialized. After that, sets the new domain and calls to a second method
in the new domain, which deserializes the parameters, makes a local copy of
those that don't need serialization, and dispatches the call to the real
object. Then, the inverse sequence is followed: return values are serialized,
flow returns to the first method, which changes the domain again and
deserializes the values.
Sample wrapper
--------------
This are examples of cross domain wrappers in pseudo-C# code.
The first example is for a method with the following signature:
ArrayList Test (int a, string b, ArrayList c, ref ArrayList d, ref string e, ref int f)
Of course, the wrapper has the same signature:
ArrayList Test_xdomain_invoke (int a, string b, ArrayList c, ref ArrayList d, ref string e, ref int f)
{
int loc_new_domainid, loc_old_domainid;
ArrayList loc_return;
byte[] loc_serialized_array;
// Save thread domain data
Context loc_context = Thread.CurrentContext;
if (loc_context.IsDefaultContext) {
return Test_remoting_invoke (a, b, c, ref d, ref e, ref f);
}
object loc_datastore = Thread.ResetDataStoreStatus ();
// Create the array that will hold the parameters to be serialized
object[] loc_array = new object [3]; // +1 to store the return value
loc_array [0] = c;
loc_array [1] = d;
// Serialize parameters
loc_serialized_array = RemotingServices.SerializeCallData (loc_Array);
// Get the target domain id and change the domain
RealProxy loc_real_proxy = ((TransparentProxy)this).rp;
loc_new_domainid = loc_real_proxy->target_domain_id;
loc_old_domainid = mono_remoting_set_domain_by_id (loc_new_domainid);
string e_copy = e;
/* The following is an indirect call made into the target domain */
Test_xdomain_dispatch (rp, ref loc_serialized_array, out loc_serialized_exc, a, b, ref e_copy, ref f);
// Switch context
mono_remoting_set_domain_by_id (loc_old_domainid);
// Restore thread domain data
mono_context_set (loc_context);
Thread.RestoreDataStoreStatus (loc_datastore);
if (loc_serialized_exc != null) {
Exception ex = (Exception) RemotingServices.DeserializeCallData (loc_serialized_exc);
ex.FixRemotingException ();
throw ex;
}
// copy back non-serialized output parametars
e = mono_marshal_xdomain_copy_value (e_copy);
// Deserialize out parameters
loc_serialized_array = mono_marshal_xdomain_copy_value (loc_serialized_array);
loc_array = RemotingServices.DeserializeObject (loc_serialized_array);
d = loc_array [1];
mono_thread_force_interruption_checkpoint ();
return loc_array [2];
}
void Test_xdomain_dispatch (RealProxy rp, ref byte[] loc_call_data, out byte[] loc_exc_data, int a, string b, ref string e, ref int f)
{
// Deserialize parameters
try {
// Clean the call context
CallContext.SetCurrentCallContext (null);
// Deserialize call data
if (loc_call_data != null) {
loc_call_data = mono_marshal_xdomain_copy_value (loc_call_data);
loc_array = RemotingServices.DeserializeCallData (loc_call_data);
}
// Get the target object
object target = rp.GetAppDomainTarget ();
// Load the arguments
b = mono_marshal_xdomain_copy_value (b);
// Make the call to the real object
mono_thread_force_interruption_checkpoint ();
loc_return = target.Test (a, b, loc_array[0], ref loc_array[1], ref e, ref f);
// Serialize the return values
// Reset parameters in the array that don't need to be serialized back
loc_array [0] = null;
// Add the return value to the array
loc_array [2] = loc_return;
// Serialize
loc_call_data = RemotingServices.SerializeCallData (loc_array);
loc_exc_data = null;
}
catch (Exception ex) {
loc_exc_data = RemotingServices.SerializeExceptionData (ex);
}
}
Another example
---------------
This is another example of a method with more simple parameters:
int SimpleTest_xdomain_invoke (int a)
{
int loc_new_domainid, loc_old_domainid;
int loc_return;
byte[] loc_serialized_array;
// Save thread domain data
Context loc_context = Thread.CurrentContext;
if (loc_context.IsDefaultContext) {
return SimpleTest_remoting_invoke (a, b, c, ref d, ref e, ref f);
}
object loc_datastore = Thread.ResetDataStoreStatus ();
// Serialize parameters. This will only serialize LogicalContext data if needed.
loc_serialized_array = RemotingServices.SerializeCallData (null);
// Get the target domain id and change the domain
RealProxy loc_real_proxy = ((TransparentProxy)this).rp;
loc_new_domainid = loc_real_proxy->target_domain_id;
loc_old_domainid = mono_remoting_set_domain_by_id (loc_new_domainid);
/* The following is an indirect call made into the target domain */
loc_return = SimpleTest_xdomain_dispatch (rp, ref loc_serialized_array, out loc_serialized_exc, a);
// Switch domain
mono_remoting_set_domain_by_id (loc_old_domainid);
// Restore thread domain data
mono_context_set (loc_context);
Thread.RestoreDataStoreStatus (loc_datastore);
if (loc_serialized_exc != null) {
Exception ex = (Exception) RemotingServices.DeserializeCallData (loc_serialized_exc);
ex.FixRemotingException ();
throw ex;
}
RemotingServices.DeserializeCallData (loc_serialized_array);
return loc_return [2];
}
int SimpleTest_xdomain_dispatch (RealProxy rp, ref byte[] loc_call_data, out byte[] loc_exc_data, int a)
{
int loc_return;
// Deserialize parameters
try {
// Clean the call context
CallContext.SetCurrentCallContext (null);
// Deserialize call data
if (loc_call_data != null) {
loc_call_data = mono_marshal_xdomain_copy_value (loc_call_data);
RemotingServices.DeserializeCallData (loc_call_data);
}
// Get the target object
object target = rp.GetAppDomainTarget ();
// Make the call to the real object
loc_return = target.Test (a);
loc_call_data = RemotingServices.SerializeCallData (loc_Array);
loc_exc_data = null;
}
catch (Exception ex) {
loc_exc_data = RemotingServices.SerializeExceptionData (ex);
}
return loc_return;
}
-250
View File
@@ -1,250 +0,0 @@
SSAPRE stands for "SSA based Partial Redundancy Elimination".
The algorithm is explained in this paper:
Partial Redundancy Elimination in SSA Form (1999)
Robert Kennedy, Sun Chan, SHIN-MING LIU, RAYMOND LO, PENG TU, FRED CHOW
ACM Transactions on Programming Languages and Systems
http://citeseer.ist.psu.edu/kennedy99partial.html
In this document I give a gentle introduction to the concept of "partial"
redundancies, and I explain the basic design decisions I took in implementing
SSAPRE, but the paper is essential to understand the code.
Partial Redundancy Elimination (or PRE) is an optimization that (guess what?)
tries to remove redundant computations.
It achieves this by saving the result of "not redundant" evaluations of
expressions into appositely created temporary variables, so that "redundant"
evaluations can be replaced by a load from the appropriate variable.
Of course, on register starved architectures (x86) a temporary could cost more
than the evaluation itself... PRE guarantees that the live range of the
introduced variables is the minimal possible, but the added pressure on the
register allocator can be an issue.
The nice thing about PRE is that it not only removes "full" redundancies, but
also "partial" ones.
A full redundancy is easy to spot, and straightforward to handle, like in the
following example (in every example here, the "expression" is "a + b"):
int FullRedundancy1 (int a, int b) {
int v1 = a + b;
int v2 = a + b;
return v1 + v2;
}
PRE would transform it like this:
int FullRedundancy1 (int a, int b) {
int t = a + b;
int v1 = t;
int v2 = t;
return v1 + v2;
}
Of course, either a copy propagation pass or a register allocator smart enough
to remove unneeded variables would be necessary afterwords.
Another example of full redundancy is the following:
int FullRedundancy2 (int a, int b) {
int v1;
if (a >= 0) {
v1 = a + b; // BB1
} else {
a = -a; // BB2
v1 = a + b;
}
int v2 = a + b; // BB3
return v1 + v2;
}
Here the two expressions in BB1 and BB2 are *not* the same thing (a is
modified in BB2), but both are redundant with the expression in BB3, so the
code can be transformed like this:
int FullRedundancy2 (int a, int b) {
int v1;
int t;
if (a >= 0) {
t = a + b; // BB1
v1 = t;
} else {
a = -a; // BB2
t = a + b;
v1 = t;
}
int v2 = t; // BB3
return v1 + v2;
}
Note that there are still two occurrences of the expression, while it can be
easily seen that one (at the beginning of BB3) would suffice.
This, however, is not a redundancy for PRE, because there is no path in the
CFG where the expression is evaluated twice.
Maybe this other kind of redundancy (which affects code size, and not the
computations that are actually performed) would be eliminated by code hoisting,
but I should check it; anyway, it is not a PRE related thing.
An example of partial redundancy, on the other hand, is the following:
int PartialRedundancy (int a, int b) {
int v1;
if (a >= 0) {
v1 = a + b; // BB1
} else {
v1 = 0; // BB2
}
int v2 = a + b; // BB3
return v1 + v2;
}
The redundancy is partial because the expression is computed more than once
along some path in the CFG, not all paths.
In fact, on the path BB1 - BB3 the expression is computed twice, but on the
path BB2 - BB3 it is computed only once.
In this case, PRE must insert new occurrences of the expression in order to
obtain a full redundancy, and then use temporary variables as before.
Adding a computation in BB2 would do the job.
One nice thing about PRE is that loop invariants can be seen as partial
redundancies.
The idea is that you can get into the loop from two locations: from before the
loop (at the 1st iteration), and from inside the loop itself (at any other
iteration). If there is a computation inside the loop that is in fact a loop
invariant, PRE will spot this, and will handle the BB before the loop as a
place where to insert a new computation to get a full redundancy.
At this point, the computation inside the loop would be replaced by an use of
the temporary stored before the loop, effectively performing "loop invariant
code motion".
Now, this is what PRE does to the code.
But how does it work?
In "classic" solutions, PRE is formulated as a data flow analysis problem.
The Muchnick provides a detailed description of the algorithm in this way (it
is by far the most complex problem of this kind in the whole book).
The point is that this algorithm does not exploit the SSA form.
In fact, it has to perform all that amount of data flow analysis exactly
because it does not take advantage of the work already done if you have put
the program into SSA form.
The SSAPRE algorithm, on the other hand, is designed with SSA in mind.
It fully exploits the properties of SSA variables, it also explicitly reuses
some data structures that must have been computed when building the SSA form,
and takes great care to output its code in that form already (which means that
the temporaries it introduces are already "versioned", with all the phi
variables correctly placed).
The main concept used in this algorithm is the "Factored Redundancy Graph" (or
FRG in short). Basically, for each given expression, this graph shows all its
occurrences in the program, and redundant ones are linked to their
"representative occurrence" (the 1st occurrence met in a CFG traversal).
The central observation is that the FRG is "factored" because each expression
occurrence has exactly one representative occurrence, in the same way as the
SSA form is a "factored" use-definition graph (each use is related to exactly
one definition).
And in fact building the FRG is much like building an SSA representation, with
PHI nodes and all.
By the way, I use "PHI" for "PHI expression occurrences", and "phi" for the
usual phi definitions in SSA, because the paper uses an uppercase phi greek
letter for PHI occurrences (while the lowercase one is standard in SSA).
The really interesting point is that the FRG for a given expression has exactly
the same "shape" of the use-definition graph for the temporary var that must
be introduced to remove the redundancy, and this is why SSAPRE can easily emit
its output code in correct SSA form.
One particular characteristic of the SSAPRE algorithm is that it is "sparse",
in the sense that it operates on expressions individually, looking only at the
specific nodes it needs. This is in contrast to the classical way of solving
data flow analysis problems, which is to operate globally, using data
structures that work "in parallel" on all the entities they operate on (in
practice bit sets, with for instance one bit per variable, or one bit per
expression occurrence, you get the idea). This is handy (it exploits the
parallelism of bit operations), but in general setting up those data
structures is time consuming, and if the number of the things represented by
the bits is not fixed in advance the code can get quite messy (bit sets must
become growable).
Moreover, applying special handling to individual expressions becomes a very
tricky thing.
SSAPRE, on the other hand, looks at the whole program (method in our case) only
once, when it scans the code to collect (and classify) all expression
occurrences.
From here on, it operates on one expression at a time, looking only at its
specific data structures (which, for each expression, are much smaller than
the whole program, so the operations are fast).
This approach has another advantage: the data structures used to operate on
one expressions can be recycled when operating on other expressions, making
the memory usage of the compiler lower, and (also important) avoiding losing
time with memory allocations at all.
This reflects directly on the design of those data structures.
We can better see these advantages following which data structures are used
during the application of SSAPRE to a method.
The steps that are performed are the following:
* Initialization: scan the whole program, collect all the occurrences, and
build a worklist of expressions to be processed (each worklist entry
describes all the occurrences of the given expression).
Here the data structures are the following:
- One struct (the working area), containing the worklist and other
"global" data. The worklist itself contains an entry for each expression
which in turn has an entry for each occurrence.
- One "info" struct for each BB, containing interesting dominance and CFG
related properties of the BB.
Then, for each entry in the worklist, these operations are performed:
* PHI placement: find where the PHI nodes of the FRG must be placed.
* Renaming: assign appropriate "redundancy classes" to all occurrences (it
is like assigning variable versions when building an SSA form).
* Analyze: compute various flags in PHI nodes (which are the only places
that define where additional computations may be added).
This conceptually is composed of two data flow analysis passes, which in
practice only scan the PHI nodes in the FRG, not the whole code, so they
are not that heavy.
* Finalize: make so that the FRG is exactly like the use-def graph for the
temporary that will be introduced (it generally must be reshaped a bit
according to the flags computed in the previous step).
This is also made of two steps, but more for implementation reasons than
for conceptual ones.
* Code motion: actually update the code using the FRG.
Here, what's needed is the following:
- PHI occurrences (and some flags sbout them)
- PHI argument occurrences (and some flags sbout them)
- The renaming stack
In practice, one can observe that each BB can have at most one PHI (we work
on one expression at a time), and also one PHI argument (which we consider
occurring at the end of the BB). Therefore, we do not have separate structures
for these, but store them directly in the BB infos (which are kept for the
whole SSAPRE invocation).
The renaming stack is managed directly as a list of occurrences, with
special handling for PHI nodes (which, being represented directly by their
BB, are not "occurrences").
So far, the only two missing things (with respect to SSAPRE in the paper) are
unneeded PHIs eliminantion and the handling of "composite" expressions.
Otherwise, the implementation is complete.
Other interesting issues are:
- SSAPRE has the assumption that:
- each SSA variable is related to one "original" (not SSA) variable, and
- no more than one version of each originsl variable is live at the same time
in the CFG.
It would be better to relax these assumptions.
- SSAPRE operates on "syntactic" redundancies, not on "values".
GVNPRE (or other means of merging GVN) would be a nice alternative, see
"http://www.cs.purdue.edu/homes/vandrutj/papers/thesis.pdf".
-33
View File
@@ -1,33 +0,0 @@
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 |
-----------------------------------------------------------
| | | | | | | | |
-----------------------------------------------------------
-425
View File
@@ -1,425 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="744.09448819"
height="1052.3622047"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.42.2"
sodipodi:docbase="/home/miguel/mono/gc"
sodipodi:docname="fragmentation.svg"
inkscape:export-filename="/tmp/fragmentation.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.6081777"
inkscape:cx="225.44672"
inkscape:cy="575.14344"
inkscape:document-units="px"
inkscape:current-layer="layer1"
inkscape:window-width="1388"
inkscape:window-height="998"
inkscape:window-x="0"
inkscape:window-y="27" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g2181"
transform="translate(0.000000,5.340576e-5)"
inkscape:export-filename="/tmp/compacting.png"
inkscape:export-xdpi="124.46000"
inkscape:export-ydpi="124.46000">
<rect
y="336.88107"
x="40.380459"
height="33.335033"
width="150.56403"
id="rect1306"
style="opacity:1.0000000;fill:#bf0000;fill-opacity:0.28961745;fill-rule:evenodd;stroke:#e97500;stroke-width:0.96217525;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text1308"
y="356.82397"
x="112.17029"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="356.82397"
x="112.17029"
id="tspan1310"
sodipodi:role="line">a</tspan></text>
<text
id="text1312"
y="357.98737"
x="210.86664"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="357.98737"
x="210.86664"
id="tspan1314"
sodipodi:role="line">b</tspan></text>
<rect
y="336.67050"
x="191.33643"
height="33.686447"
width="47.111221"
id="rect1320"
style="opacity:1.0000000;fill:#009f9d;fill-opacity:0.28961745;fill-rule:evenodd;stroke:#3a57e9;stroke-width:0.54104435;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2066"
y="356.79828"
x="258.88504"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="356.79828"
x="258.88504"
id="tspan2068"
sodipodi:role="line">c</tspan></text>
<rect
y="332.71930"
x="36.785717"
height="42.142857"
width="252.85715"
id="rect2087"
style="opacity:1.0000000;fill:#97ff9f;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#e93a3a;stroke-width:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<rect
y="336.67966"
x="238.58723"
height="33.686447"
width="47.111221"
id="rect2070"
style="opacity:1.0000000;fill:#009f9d;fill-opacity:0.28961745;fill-rule:evenodd;stroke:#3a57e9;stroke-width:0.54104435;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
</g>
<g
id="g2193"
transform="translate(0.000000,-1.451759)"
inkscape:export-filename="/tmp/compacting.png"
inkscape:export-xdpi="124.46000"
inkscape:export-ydpi="124.46000">
<text
id="text2095"
y="407.98737"
x="210.86664"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="407.98737"
x="210.86664"
id="tspan2097"
sodipodi:role="line">b</tspan></text>
<rect
y="386.67050"
x="191.33643"
height="33.686447"
width="47.111221"
id="rect2099"
style="opacity:1.0000000;fill:#009f9d;fill-opacity:0.28961745;fill-rule:evenodd;stroke:#3a57e9;stroke-width:0.54104435;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2101"
y="406.79828"
x="258.88504"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="406.79828"
x="258.88504"
id="tspan2103"
sodipodi:role="line">c</tspan></text>
<rect
y="386.67966"
x="238.58722"
height="33.686447"
width="47.111221"
id="rect2107"
style="opacity:1.0000000;fill:#009f9d;fill-opacity:0.28961745;fill-rule:evenodd;stroke:#3a57e9;stroke-width:0.54104435;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<rect
y="382.36215"
x="37.142860"
height="42.142857"
width="252.85715"
id="rect2105"
style="opacity:1.0000000;fill:#97ff9f;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#e93a3a;stroke-width:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
</g>
<g
id="g2202"
transform="translate(0.000000,-1.117897)"
inkscape:export-filename="/tmp/compacting.png"
inkscape:export-xdpi="124.46000"
inkscape:export-ydpi="124.46000">
<text
id="text2109"
y="455.84454"
x="210.86664"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="455.84454"
x="210.86664"
id="tspan2111"
sodipodi:role="line">b</tspan></text>
<rect
y="434.52768"
x="191.33643"
height="33.686447"
width="47.111221"
id="rect2113"
style="opacity:1.0000000;fill:#009f9d;fill-opacity:0.28961745;fill-rule:evenodd;stroke:#3a57e9;stroke-width:0.54104435;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2115"
y="454.65546"
x="258.88504"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="454.65546"
x="258.88504"
id="tspan2117"
sodipodi:role="line">c</tspan></text>
<rect
y="434.53683"
x="238.58722"
height="33.686447"
width="47.111221"
id="rect2119"
style="opacity:1.0000000;fill:#009f9d;fill-opacity:0.28961745;fill-rule:evenodd;stroke:#3a57e9;stroke-width:0.54104435;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<rect
y="434.44754"
x="41.444386"
height="33.686447"
width="47.111221"
id="rect2127"
style="opacity:1.0000000;fill:#009f9d;fill-opacity:0.28961745;fill-rule:evenodd;stroke:#3a57e9;stroke-width:0.54104435;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<rect
y="430.21933"
x="37.142857"
height="42.142857"
width="252.85715"
id="rect2121"
style="opacity:1.0000000;fill:#97ff9f;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#e93a3a;stroke-width:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2123"
y="455.7644"
x="60.974598"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="455.76440"
x="60.974598"
id="tspan2125"
sodipodi:role="line">d</tspan></text>
</g>
<g
id="g2214"
transform="translate(0.000000,0.287437)"
inkscape:export-filename="/tmp/compacting.png"
inkscape:export-xdpi="124.46000"
inkscape:export-ydpi="124.46000">
<text
id="text2133"
y="502.63025"
x="211.58092"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="502.63025"
x="211.58092"
id="tspan2135"
sodipodi:role="line">b</tspan></text>
<rect
y="481.31339"
x="192.05070"
height="33.686447"
width="47.111221"
id="rect2137"
style="opacity:1.0000000;fill:#009f9d;fill-opacity:0.28961745;fill-rule:evenodd;stroke:#3a57e9;stroke-width:0.54104435;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<rect
y="477.00504"
x="37.857136"
height="42.142857"
width="252.85715"
id="rect2147"
style="opacity:1.0000000;fill:#97ff9f;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#e93a3a;stroke-width:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<rect
y="481.23325"
x="42.158665"
height="33.686447"
width="47.111221"
id="rect2145"
style="opacity:1.0000000;fill:#009f9d;fill-opacity:0.28961745;fill-rule:evenodd;stroke:#3a57e9;stroke-width:0.54104435;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2149"
y="502.55011"
x="61.688877"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="502.55011"
x="61.688877"
id="tspan2151"
sodipodi:role="line">d</tspan></text>
</g>
<rect
style="opacity:1.0000000;fill:#97ff9f;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#e93a3a;stroke-width:0.99986458;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2163"
width="252.78864"
height="42.142857"
x="38.244465"
y="525.57648"
inkscape:export-filename="/tmp/compacting.png"
inkscape:export-xdpi="124.46000"
inkscape:export-ydpi="124.46000" />
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="109.33745"
y="551.20172"
id="text2153"
inkscape:export-filename="/tmp/compacting.png"
inkscape:export-xdpi="124.46000"
inkscape:export-ydpi="124.46000"><tspan
sodipodi:role="line"
id="tspan2155"
x="109.33745"
y="551.20172">b</tspan></text>
<rect
style="opacity:1.0000000;fill:#009f9d;fill-opacity:0.28961745;fill-rule:evenodd;stroke:#3a57e9;stroke-width:0.54104435;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2157"
width="47.111221"
height="33.686447"
x="89.807236"
y="529.88483"
inkscape:export-filename="/tmp/compacting.png"
inkscape:export-xdpi="124.46000"
inkscape:export-ydpi="124.46000" />
<rect
style="opacity:1.0000000;fill:#009f9d;fill-opacity:0.28961745;fill-rule:evenodd;stroke:#3a57e9;stroke-width:0.54104435;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2165"
width="47.111221"
height="33.686447"
x="42.515812"
y="529.80469"
inkscape:export-filename="/tmp/compacting.png"
inkscape:export-xdpi="124.46000"
inkscape:export-ydpi="124.46000" />
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="62.046024"
y="551.12158"
id="text2167"
inkscape:export-filename="/tmp/compacting.png"
inkscape:export-xdpi="124.46000"
inkscape:export-ydpi="124.46000"><tspan
sodipodi:role="line"
id="tspan2169"
x="62.046024"
y="551.12158">d</tspan></text>
<rect
style="opacity:1.0000000;fill:#bf0000;fill-opacity:0.28961745;fill-rule:evenodd;stroke:#e97500;stroke-width:0.96217525;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2171"
width="150.56403"
height="33.335033"
x="137.73921"
y="529.98041"
inkscape:export-filename="/tmp/compacting.png"
inkscape:export-xdpi="124.46000"
inkscape:export-ydpi="124.46000" />
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="209.3181"
y="549.92334"
id="text2177"
inkscape:export-filename="/tmp/compacting.png"
inkscape:export-xdpi="124.46000"
inkscape:export-ydpi="124.46000"><tspan
sodipodi:role="line"
id="tspan2179"
x="209.31810"
y="549.92334">e</tspan></text>
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="18.364119"
y="358.15894"
id="text2235"
inkscape:export-filename="/tmp/compacting.png"
inkscape:export-xdpi="124.46000"
inkscape:export-ydpi="124.46000"><tspan
sodipodi:role="line"
id="tspan2237"
x="18.364119"
y="358.15894">3</tspan></text>
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="18.077009"
y="406.35583"
id="text2239"
inkscape:export-filename="/tmp/compacting.png"
inkscape:export-xdpi="124.46000"
inkscape:export-ydpi="124.46000"><tspan
sodipodi:role="line"
id="tspan2241"
x="18.077009"
y="406.35583">4</tspan></text>
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="18.452009"
y="454.46191"
id="text2243"
inkscape:export-filename="/tmp/compacting.png"
inkscape:export-xdpi="124.46000"
inkscape:export-ydpi="124.46000"><tspan
sodipodi:role="line"
id="tspan2245"
x="18.452009"
y="454.46191">5</tspan></text>
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="18.15904"
y="502.73206"
id="text2247"
inkscape:export-filename="/tmp/compacting.png"
inkscape:export-xdpi="124.46000"
inkscape:export-ydpi="124.46000"><tspan
sodipodi:role="line"
id="tspan2249"
x="18.159040"
y="502.73206">6</tspan></text>
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="18.428572"
y="551.02197"
id="text2251"
inkscape:export-xdpi="124.46000"
inkscape:export-ydpi="124.46000"
inkscape:export-filename="/tmp/compacting.png"><tspan
sodipodi:role="line"
id="tspan2253"
x="18.428572"
y="551.02197">7</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 18 KiB

-857
View File
@@ -1,857 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="744.09448819"
height="1052.3622047"
id="svg2324"
sodipodi:version="0.32"
inkscape:version="0.42.2"
sodipodi:docbase="/home/miguel/mono/gc"
sodipodi:docname="gcmem.svg">
<defs
id="defs2326">
<marker
inkscape:stockid="DistanceIn"
orient="auto"
refY="0.0"
refX="0.0"
id="DistanceIn"
style="overflow:visible">
<g
transform="scale(0.6,0.6) translate(8,0)"
id="g987">
<path
sodipodi:nodetypes="ccccc"
id="path974"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none" />
<path
id="path976"
d="M -14.759949,-7 L -14.759949,65"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2pt;marker-start:none" />
</g>
</marker>
<marker
inkscape:stockid="Arrow1Mstart"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow1Mstart"
style="overflow:visible">
<path
sodipodi:nodetypes="ccccc"
id="path2397"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
transform="scale(0.4)" />
</marker>
<marker
inkscape:stockid="Dot_m"
orient="auto"
refY="0.0"
refX="0.0"
id="Dot_m"
style="overflow:visible">
<path
id="path39"
d="M -2.5,-1.0 C -2.5,1.7600000 -4.7400000,4.0 -7.5,4.0 C -10.260000,4.0 -12.5,1.7600000 -12.5,-1.0 C -12.5,-3.7600000 -10.260000,-6.0 -7.5,-6.0 C -4.7400000,-6.0 -2.5,-3.7600000 -2.5,-1.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;marker-end:none"
transform="scale(0.4) translate(7.125493, 1)" />
</marker>
<marker
inkscape:stockid="Arrow2Mend"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow2Mend"
style="overflow:visible;">
<path
sodipodi:nodetypes="cccc"
id="path2389"
style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="scale(0.6) rotate(180) translate(-5,0)" />
</marker>
<marker
inkscape:stockid="Arrow2Lend"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow2Lend"
style="overflow:visible;">
<path
sodipodi:nodetypes="cccc"
id="path2392"
style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="scale(1.1) rotate(180) translate(-5,0)" />
</marker>
<marker
inkscape:stockid="TriangleOutL"
orient="auto"
refY="0.0"
refX="0.0"
id="TriangleOutL"
style="overflow:visible">
<path
sodipodi:nodetypes="cccc"
id="path2462"
d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
transform="scale(0.8)" />
</marker>
<marker
inkscape:stockid="Arrow1Lstart"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow1Lstart"
style="overflow:visible">
<path
sodipodi:nodetypes="ccccc"
id="path2535"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
transform="scale(0.8)" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.3000000"
inkscape:cx="345.54184"
inkscape:cy="316.03559"
inkscape:document-units="px"
inkscape:current-layer="layer1"
inkscape:window-width="1388"
inkscape:window-height="998"
inkscape:window-x="0"
inkscape:window-y="27" />
<metadata
id="metadata2329">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g2356"
transform="translate(-637.4063,306.0762)">
<rect
y="582.59204"
x="312.92154"
height="119.77635"
width="198.44141"
id="rect2342"
style="opacity:1.0000000;fill:#3a3a3a;fill-opacity:0.20765026;fill-rule:evenodd;stroke:#000000;stroke-width:0.56134999;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2344"
y="699.81897"
x="523.83838"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="699.81897"
x="523.83838"
id="tspan2346"
sodipodi:role="line">stack_start</tspan></text>
<text
id="text2348"
y="593.75293"
x="523.83838"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="593.75293"
x="523.83838"
id="tspan2350"
sodipodi:role="line">stack_end</tspan></text>
<text
id="text2352"
y="646.71393"
x="366.79654"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="646.71393"
x="366.79654"
id="tspan2354"
sodipodi:role="line">Thread N stack</tspan></text>
</g>
<rect
style="opacity:1.0000000;fill:#3a3a3a;fill-opacity:0.20765026;fill-rule:evenodd;stroke:#000000;stroke-width:0.54655713;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2392"
width="198.44141"
height="113.54674"
x="-348.07538"
y="167.00903" />
<rect
style="opacity:1.0000000;fill:#3a3a3a;fill-opacity:0.20765026;fill-rule:evenodd;stroke:#000000;stroke-width:0.39553967;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2367"
width="198.44141"
height="59.468048"
x="-348.22467"
y="166.96149" />
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="-142.24655"
y="223.79724"
id="text2369"><tspan
sodipodi:role="line"
id="tspan2371"
x="-142.24655"
y="223.79724">info-&gt;stack_start</tspan></text>
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="-142.24655"
y="179.88089"
id="text2373"><tspan
sodipodi:role="line"
id="tspan2375"
x="-142.24655"
y="179.88089">info-&gt;stack_end</tspan></text>
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="-294.34967"
y="201.16916"
id="text2388"><tspan
sodipodi:role="line"
id="tspan2390"
x="-294.34967"
y="201.16916">Thread 1 stack</tspan></text>
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.86822808;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:url(#TriangleOutL);stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
d="M -249.00397,238.28619 C -249.00397,269.24665 -249.00397,269.24665 -249.00397,269.24665"
id="path2405" />
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="-142.24655"
y="276.65912"
id="text2553"><tspan
sodipodi:role="line"
id="tspan2555"
x="-142.24655"
y="276.65912">limit: stack bottom</tspan></text>
<g
id="g2664"
transform="translate(-393.8247,105.6316)">
<rect
y="175.09026"
x="45.884109"
height="113.54674"
width="198.44141"
id="rect2666"
style="opacity:1.0000000;fill:#3a3a3a;fill-opacity:0.20765026;fill-rule:evenodd;stroke:#000000;stroke-width:0.54655713;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<rect
y="175.04271"
x="45.734818"
height="59.468048"
width="198.44141"
id="rect2668"
style="opacity:1.0000000;fill:#3a3a3a;fill-opacity:0.20765026;fill-rule:evenodd;stroke:#000000;stroke-width:0.39553967;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2670"
y="231.87846"
x="251.71294"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="231.87846"
x="251.71294"
id="tspan2672"
sodipodi:role="line">info-&gt;stack_start</tspan></text>
<text
id="text2674"
y="187.96211"
x="251.71294"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="187.96211"
x="251.71294"
id="tspan2676"
sodipodi:role="line">info-&gt;stack_end</tspan></text>
<text
id="text2678"
y="209.25038"
x="99.609818"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="209.25038"
x="99.609818"
id="tspan2680"
sodipodi:role="line">Thread 2 stack</tspan></text>
<path
id="path2682"
d="M 144.95552,246.36741 C 144.95552,277.32787 144.95552,277.32787 144.95552,277.32787"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.86822808;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:url(#TriangleOutL);stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2684"
y="284.74033"
x="251.71294"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="284.74033"
x="251.71294"
id="tspan2686"
sodipodi:role="line">limit: stack bottom</tspan></text>
</g>
<rect
style="opacity:1.0000000;fill:#000000;fill-opacity:0.098360606;fill-rule:evenodd;stroke:#000000;stroke-width:0.57452667;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2699"
width="198.44141"
height="125.46541"
x="-347.82306"
y="449.85883" />
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="-312.09747"
y="515.71747"
id="text2701"><tspan
sodipodi:role="line"
id="tspan2703"
x="-312.09747"
y="515.71747">Program, Data, Heap</tspan></text>
<rect
style="opacity:1.0000000;fill:#97ff9f;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect1477"
width="496.99463"
height="95.744583"
x="24.575632"
y="255.69751"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<rect
style="fill:#000000;fill-opacity:0.21311475;fill-rule:evenodd;stroke:none;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2462"
width="369.79077"
height="95.629486"
x="24.974619"
y="255.80048"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<g
id="g2549"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000">
<rect
y="435.98193"
x="27.815228"
height="104.85226"
width="188.03888"
id="rect2332"
style="opacity:1.0000000;fill:#97ff9f;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2234"
y="457.2435"
x="78.252907"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="457.24350"
x="78.252907"
id="tspan2236"
sodipodi:role="line">next_data</tspan></text>
<path
id="path2223"
d="M 27.563951,470.57645 L 215.86873,470.57645 L 215.25735,470.57645"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<path
id="path2228"
d="M 71.898961,435.92093 L 71.891321,470.94626 L 71.891321,470.94626"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2230"
y="457.2435"
x="37.966347"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="457.24350"
x="37.966347"
id="tspan2232"
sodipodi:role="line">data</tspan></text>
<text
id="text2238"
y="457.2435"
x="151.77969"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="457.24350"
x="151.77969"
id="tspan2240"
sodipodi:role="line">end_data</tspan></text>
<path
id="path2244"
d="M 146.54159,435.92094 L 146.53395,470.94627 L 146.53395,470.94627"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2246"
y="530.07721"
x="180.5428"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="530.07721"
x="180.54280"
id="tspan2248"
sodipodi:role="line">next</tspan></text>
<text
id="text2250"
y="492.30292"
x="140.99677"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="492.30292"
x="140.99677"
id="tspan2252"
sodipodi:role="line">scan_starts</tspan></text>
<path
id="path2254"
d="M 27.385382,505.50503 L 215.69016,505.50503 L 215.07878,505.50503"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
</g>
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.3321546px;stroke-linecap:butt;stroke-linejoin:miter;marker-mid:none;marker-end:url(#Arrow2Mend);stroke-opacity:1.0000000"
d="M 49.940663,435.64439 C 39.609840,395.19706 25.024252,408.49467 24.510938,358.73205"
id="path2420"
sodipodi:nodetypes="cs"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2130281px;stroke-linecap:butt;stroke-linejoin:miter;marker-mid:none;marker-end:url(#Arrow2Mend);stroke-opacity:1.0000000"
d="M 110.07637,435.66483 C 100.30146,356.87037 395.42132,407.99704 394.99782,357.98613"
id="path2424"
sodipodi:nodetypes="cs"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2048768px;stroke-linecap:butt;stroke-linejoin:miter;marker-mid:none;marker-end:url(#Arrow2Mend);stroke-opacity:1.0000000"
d="M 178.51727,436.05781 C 177.24799,362.68132 519.42718,442.70358 521.51612,359.00377"
id="path2426"
sodipodi:nodetypes="cs"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2617185;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
d="M 395.11375,255.80101 L 395.10611,351.10915 L 395.10611,351.10915"
id="path2443"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<rect
style="fill:#000000;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2466"
width="22.752682"
height="24.214773"
x="305.75558"
y="473.20383"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<rect
style="fill:#000000;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2468"
width="22.752682"
height="24.214773"
x="331.87048"
y="473.20383"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<rect
style="fill:#000000;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2472"
width="22.752682"
height="24.214773"
x="357.98535"
y="473.20383"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<rect
style="fill:#000000;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2474"
width="22.752682"
height="24.214773"
x="416.10025"
y="473.20383"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow2Mend);stroke-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none"
d="M 215.70091,485.66660 C 295.43628,485.16153 295.43628,485.16153 295.43628,485.16153"
id="path2478"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="392.02042"
y="492.73767"
id="text2484"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000"><tspan
sodipodi:role="line"
id="tspan2486"
x="392.02042"
y="492.73767">...</tspan></text>
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="384.86813"
y="529.10315"
id="text2488"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000"><tspan
sodipodi:role="line"
id="tspan2490"
x="384.86813"
y="529.10315">num_scan_starts</tspan></text>
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;marker-mid:none;marker-end:url(#Arrow2Mend);stroke-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none"
d="M 215.38958,526.54626 C 280.82585,525.11455 240.57890,595.19583 307.86943,597.31997"
id="path2492"
sodipodi:nodetypes="cs"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<g
id="g2494"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000"
transform="matrix(0.495700,0.000000,0.000000,0.495700,304.0104,357.2198)">
<rect
y="435.98193"
x="27.815228"
height="104.85226"
width="188.03888"
id="rect2496"
style="opacity:1.0000000;fill:#97ff9f;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2498"
y="457.2435"
x="78.252907"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="457.24350"
x="78.252907"
id="tspan2500"
sodipodi:role="line">next_data</tspan></text>
<path
id="path2502"
d="M 27.563951,470.57645 L 215.86873,470.57645 L 215.25735,470.57645"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<path
id="path2504"
d="M 71.898961,435.92093 L 71.891321,470.94626 L 71.891321,470.94626"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2506"
y="457.2435"
x="37.966347"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="457.24350"
x="37.966347"
id="tspan2508"
sodipodi:role="line">data</tspan></text>
<text
id="text2510"
y="457.2435"
x="151.77969"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="457.24350"
x="151.77969"
id="tspan2512"
sodipodi:role="line">end_data</tspan></text>
<path
id="path2514"
d="M 146.54159,435.92094 L 146.53395,470.94627 L 146.53395,470.94627"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2516"
y="530.07721"
x="180.5428"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="530.07721"
x="180.54280"
id="tspan2518"
sodipodi:role="line">next</tspan></text>
<text
id="text2520"
y="492.30292"
x="140.99677"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="492.30292"
x="140.99677"
id="tspan2522"
sodipodi:role="line">scan_starts</tspan></text>
<path
id="path2524"
d="M 27.385382,505.50503 L 215.69016,505.50503 L 215.07878,505.50503"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
</g>
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="261.43036"
y="234.91617"
id="text2528"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000"><tspan
sodipodi:role="line"
id="tspan2530"
x="261.43036"
y="234.91617">size</tspan></text>
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.3180897;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Mstart);stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
d="M 32.740631,230.44254 L 242.11872,230.44254 L 241.43892,230.44254"
id="path2547"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.3275317;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Mstart);stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
d="M 515.53150,230.44254 L 303.14294,230.44254 L 303.83251,230.44254"
id="path2570"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<rect
style="opacity:1.0000000;fill:#97ff9f;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2582"
width="496.99463"
height="95.744583"
x="96.555573"
y="672.34967"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<rect
style="fill:#000000;fill-opacity:0.21311475;fill-rule:evenodd;stroke:none;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2584"
width="369.79077"
height="95.629486"
x="96.954559"
y="672.45264"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<g
id="g2586"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000"
transform="translate(77.11341,416.8409)">
<rect
y="435.98193"
x="27.815228"
height="104.85226"
width="188.03888"
id="rect2588"
style="opacity:1.0000000;fill:#97ff9f;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2590"
y="457.2435"
x="78.252907"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="457.24350"
x="78.252907"
id="tspan2592"
sodipodi:role="line">next_data</tspan></text>
<path
id="path2594"
d="M 27.563951,470.57645 L 215.86873,470.57645 L 215.25735,470.57645"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<path
id="path2596"
d="M 71.898961,435.92093 L 71.891321,470.94626 L 71.891321,470.94626"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2598"
y="457.2435"
x="37.966347"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="457.24350"
x="37.966347"
id="tspan2600"
sodipodi:role="line">data</tspan></text>
<text
id="text2602"
y="457.2435"
x="151.77969"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="457.24350"
x="151.77969"
id="tspan2604"
sodipodi:role="line">end_data</tspan></text>
<path
id="path2606"
d="M 146.54159,435.92094 L 146.53395,470.94627 L 146.53395,470.94627"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2608"
y="530.07721"
x="180.5428"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="530.07721"
x="180.54280"
id="tspan2610"
sodipodi:role="line">next</tspan></text>
<text
id="text2612"
y="492.30292"
x="140.99677"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="492.30292"
x="140.99677"
id="tspan2614"
sodipodi:role="line">scan_starts</tspan></text>
<path
id="path2616"
d="M 27.385382,505.50503 L 215.69016,505.50503 L 215.07878,505.50503"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
</g>
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:round;stroke-linejoin:miter;marker-mid:none;marker-end:url(#Arrow2Mend);stroke-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none"
d="M 390.69768,889.68866 C 331.80602,804.65889 96.803459,874.95173 98.410499,775.69915"
id="path2618"
sodipodi:nodetypes="cs"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:round;stroke-linejoin:round;marker-mid:none;marker-end:url(#Arrow2Mend);stroke-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none"
d="M 415.68564,889.74159 C 415.11366,821.91550 190.04004,833.26343 189.29125,775.92074"
id="path2620"
sodipodi:nodetypes="cs"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;marker-mid:none;marker-end:url(#Arrow2Mend);stroke-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none"
d="M 441.13138,889.63261 C 442.23723,818.56405 333.26911,828.85620 330.24174,775.49808"
id="path2622"
sodipodi:nodetypes="cs"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2617185;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
d="M 467.09369,672.45314 L 467.08605,767.76128 L 467.08605,767.76128"
id="path2624"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<rect
style="fill:#000000;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2626"
width="22.752682"
height="24.214773"
x="377.73553"
y="889.85596"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<rect
style="fill:#000000;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2628"
width="22.752682"
height="24.214773"
x="403.85040"
y="889.85596"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<rect
style="fill:#000000;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2630"
width="22.752682"
height="24.214773"
x="429.96527"
y="889.85596"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<rect
style="fill:#000000;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2632"
width="22.752682"
height="24.214773"
x="488.08020"
y="889.85596"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow2Mend);stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
d="M 292.81436,902.50755 C 372.54973,902.00248 372.54973,902.00248 372.54973,902.00248"
id="path2634"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="464.00037"
y="903.38983"
id="text2636"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000"><tspan
sodipodi:role="line"
id="tspan2638"
x="464.00037"
y="903.38983">...</tspan></text>
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="456.84808"
y="945.75531"
id="text2640"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000"><tspan
sodipodi:role="line"
id="tspan2642"
x="456.84808"
y="945.75531">num_scan_starts</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 42 KiB

-282
View File
@@ -1,282 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="800px"
height="600px"
id="svg2772"
sodipodi:version="0.32"
inkscape:version="0.42.2"
sodipodi:docbase="/home/miguel/mono/gc"
sodipodi:docname="overview.svg">
<defs
id="defs2774">
<marker
inkscape:stockid="Arrow2Lend"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow2Lend"
style="overflow:visible;">
<path
sodipodi:nodetypes="cccc"
id="path2392"
style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="scale(1.1) rotate(180) translate(-5,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lstart"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow1Lstart"
style="overflow:visible">
<path
sodipodi:nodetypes="ccccc"
id="path2400"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
transform="scale(0.8)" />
</marker>
<marker
inkscape:stockid="Arrow1Mstart"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow1Mstart"
style="overflow:visible">
<path
sodipodi:nodetypes="ccccc"
id="path2397"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
transform="scale(0.4)" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.0000000"
inkscape:cx="408.00000"
inkscape:cy="412.00000"
inkscape:current-layer="layer1"
inkscape:document-units="px"
inkscape:window-width="1388"
inkscape:window-height="998"
inkscape:window-x="0"
inkscape:window-y="27" />
<metadata
id="metadata2777">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<rect
style="fill:#000000;fill-opacity:0.21311475;fill-rule:evenodd;stroke:none;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2584"
width="369.79077"
height="95.629486"
x="-604.89539"
y="132.18524"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<text
xml:space="preserve"
style="font-size:15.094481px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="10.832281"
y="76.351082"
id="text2798"><tspan
sodipodi:role="line"
id="tspan2800"
x="10.832281"
y="76.351082">section_list</tspan></text>
<text
xml:space="preserve"
style="font-size:20.107187px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="98.57534"
y="38.764957"
id="text2804"><tspan
sodipodi:role="line"
id="tspan2806"
x="98.575340"
y="38.764957">Old Generations:</tspan></text>
<g
id="g2814"
transform="translate(2.000008,9.000000)">
<rect
inkscape:export-ydpi="90.000000"
inkscape:export-xdpi="90.000000"
inkscape:export-filename="/tmp/gcmemsection.png"
y="205.35193"
x="85.104614"
height="85.296158"
width="191.79076"
id="rect2808"
style="fill:#000000;fill-opacity:0.21311475;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2810"
y="255.49602"
x="134.04068"
style="font-size:20.107187px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="255.49602"
x="134.04068"
id="tspan2812"
sodipodi:role="line">Section 0</tspan></text>
</g>
<g
id="g2830"
transform="translate(-11.00000,-92.00000)">
<rect
inkscape:export-ydpi="90.000000"
inkscape:export-xdpi="90.000000"
inkscape:export-filename="/tmp/gcmemsection.png"
y="211.35191"
x="98.104622"
height="85.296158"
width="191.79076"
id="rect2821"
style="fill:#000000;fill-opacity:0.21311475;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2823"
y="261.496"
x="147.30086"
style="font-size:20.107187px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="261.49600"
x="147.30086"
id="tspan2825"
sodipodi:role="line">Section 1</tspan></text>
</g>
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;marker-start:none;marker-end:url(#Arrow2Lend);stroke-miterlimit:4.0000000;stroke-dasharray:none"
d="M 48.000000,83.000000 C 43.000000,149.50000 75.000000,149.00000 75.000000,149.00000"
id="path2835"
sodipodi:nodetypes="cc" />
<text
xml:space="preserve"
style="font-size:20.107187px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="340.95966"
y="38.764957"
id="text2843"><tspan
sodipodi:role="line"
id="tspan2845"
x="340.95966"
y="38.764957">New generation:</tspan></text>
<g
id="g2858"
transform="translate(-9.000000,-111.0000)">
<rect
inkscape:export-ydpi="90.000000"
inkscape:export-xdpi="90.000000"
inkscape:export-filename="/tmp/gcmemsection.png"
y="230.35193"
x="337.10461"
height="85.296158"
width="191.79076"
id="rect2849"
style="fill:#000000;fill-opacity:0.21311475;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2851"
y="278.23788"
x="392.74634"
style="font-size:20.107187px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="278.23788"
x="392.74634"
id="tspan2853"
sodipodi:role="line">Nursery</tspan></text>
</g>
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:url(#Arrow2Lend);stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
d="M 83.203163,178.60032 C 23.635378,197.57995 77.069200,218.39965 77.069200,218.39965"
id="path2863"
sodipodi:nodetypes="cc" />
<text
xml:space="preserve"
style="font-size:20.107187px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="567.95966"
y="38.54715"
id="text2865"><tspan
sodipodi:role="line"
id="tspan2867"
x="567.95966"
y="38.547150">Large Objects</tspan></text>
<rect
style="fill:#000000;fill-opacity:0.21311475;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2871"
width="32.620670"
height="29.945086"
x="606.68964"
y="122.02747"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<text
xml:space="preserve"
style="font-size:15.094481px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="555.71997"
y="76.351082"
id="text2881"><tspan
sodipodi:role="line"
id="tspan2883"
x="555.71997"
y="76.351082">los_object_list</tspan></text>
<rect
style="fill:#000000;fill-opacity:0.21311475;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2885"
width="32.620670"
height="29.945086"
x="663.68964"
y="122.02747"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<rect
style="fill:#000000;fill-opacity:0.21311475;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2887"
width="32.620670"
height="29.945086"
x="721.68964"
y="122.02747"
inkscape:export-filename="/tmp/gcmemsection.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.1409233;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:url(#Arrow2Lend);stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
d="M 568.83205,82.879132 C 563.66843,136.52413 596.71567,136.12079 596.71567,136.12079"
id="path2889"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.95145077;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:url(#Arrow2Lend);stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
d="M 697.37385,136.93683 C 695.78127,137.13796 713.17398,137.03871 713.17398,137.03871"
id="path2891"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.95145077;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:url(#Arrow2Lend);stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
d="M 640.15146,136.93683 C 638.55888,137.13796 655.95159,137.03871 655.95159,137.03871"
id="path2893"
sodipodi:nodetypes="cc" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 12 KiB

-761
View File
@@ -1,761 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="744.09448819"
height="1052.3622047"
id="svg2895"
sodipodi:version="0.32"
inkscape:version="0.42.2"
sodipodi:docbase="/home/miguel/mono/gc"
sodipodi:docname="roots.svg">
<defs
id="defs2897">
<marker
inkscape:stockid="Arrow2Mend"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow2Mend"
style="overflow:visible;">
<path
sodipodi:nodetypes="cccc"
id="path2389"
style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="scale(0.6) rotate(180) translate(-5,0)" />
</marker>
<marker
inkscape:stockid="Arrow2Lend"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow2Lend"
style="overflow:visible;">
<path
sodipodi:nodetypes="cccc"
id="path2392"
style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="scale(1.1) rotate(180) translate(-5,0)" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.35000000"
inkscape:cx="795.16964"
inkscape:cy="595.84469"
inkscape:document-units="px"
inkscape:current-layer="layer1"
inkscape:window-width="1388"
inkscape:window-height="998"
inkscape:window-x="0"
inkscape:window-y="27" />
<metadata
id="metadata2900">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="opacity:1.0000000;fill:#97ff9f;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.4505868;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2582"
width="669.29736"
height="95.744583"
x="46.683918"
y="777.24200"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2584"
width="27.900555"
height="95.629486"
x="46.834984"
y="777.29956"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000"
id="rect2908"
width="192.52747"
height="115.43071"
x="56.774403"
y="580.48413"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<g
id="g2963"
transform="translate(0.678249,-1.235298)"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998">
<text
id="text2910"
y="604.86456"
x="72.848167"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="604.86456"
x="72.848167"
id="tspan2912"
sodipodi:role="line">CPU Register References</tspan></text>
<text
id="text2914"
y="631.28149"
x="73.557152"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
id="tspan2918"
y="631.28149"
x="73.557152"
sodipodi:role="line">Thread Local Variables</tspan></text>
<text
id="text2920"
y="656.53534"
x="72.73098"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
id="tspan2924"
y="656.53534"
x="72.730980"
sodipodi:role="line">Static fields</tspan></text>
<text
id="text2926"
y="680.6261"
x="72.344261"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="680.62610"
x="72.344261"
id="tspan2928"
sodipodi:role="line">Runtime object references</tspan></text>
</g>
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0148686px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
d="M 141.15688,696.28653 L 99.281852,736.43697 L 57.406801,776.58742"
id="path2939"
sodipodi:nodetypes="ccc"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0046772px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
d="M 141.42136,696.03556 L 140.41120,776.58585 L 141.42136,696.03556 z "
id="path2943"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0069753px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
d="M 141.67310,696.54376 L 297.99580,777.59288 L 141.67310,696.54376 z "
id="path2945"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
d="M 141.42136,695.77833 L 577.80726,776.59054"
id="path2947"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2957"
width="18.257698"
height="95.629486"
x="130.87115"
y="777.29956"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2959"
width="50.757698"
height="95.629486"
x="274.94327"
y="777.29956"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2961"
width="29.686272"
height="95.629486"
x="563.54974"
y="777.29956"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:0.21311475;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2991"
width="27.900555"
height="95.629486"
x="182.01932"
y="777.29956"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:0.21311475;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3004"
width="27.900555"
height="95.629486"
x="378.19257"
y="777.29956"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:0.21311475;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3006"
width="27.900555"
height="95.629486"
x="482.47830"
y="777.29956"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:0.21311475;fill-rule:evenodd;stroke:#000000;stroke-width:0.97463667;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3008"
width="16.962049"
height="95.629486"
x="638.66180"
y="777.29956"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<g
id="g3115"
transform="translate(202.3879,-322.8571)"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998">
<g
transform="translate(-428.5714,398.5714)"
id="g3100">
<rect
style="fill:#000000;fill-opacity:0.21176471;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2985"
width="15.082790"
height="13.979280"
x="510.61618"
y="99.134712"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<text
xml:space="preserve"
style="font-size:15.756983px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="534.28992"
y="110.82124"
id="text2987"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998"><tspan
sodipodi:role="line"
id="tspan2989"
x="534.28992"
y="110.82124">Live Objects</tspan></text>
</g>
<g
transform="translate(-282.8963,371.4286)"
id="g3105">
<rect
style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3010"
width="15.082790"
height="13.979280"
x="510.61618"
y="127.17164"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<text
xml:space="preserve"
style="font-size:15.756983px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="534.28992"
y="138.85815"
id="text3012"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998"><tspan
sodipodi:role="line"
id="tspan3014"
x="534.28992"
y="138.85815">Pinned objects</tspan></text>
</g>
<g
transform="translate(-118.5714,344.2857)"
id="g3110">
<rect
style="fill:#000000;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3016"
width="15.082790"
height="13.979280"
x="510.61618"
y="155.20856"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<text
xml:space="preserve"
style="font-size:15.756983px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="534.9516"
y="166.89508"
id="text3018"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998"><tspan
sodipodi:role="line"
id="tspan3020"
x="534.95160"
y="166.89508">Garbage</tspan></text>
</g>
</g>
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow2Mend);stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000"
d="M 137.92030,871.86711 C 188.66513,922.95790 194.93685,877.96303 194.93685,877.96303"
id="path3022"
sodipodi:nodetypes="cc"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.4878695;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow2Mend);stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000"
d="M 578.24777,873.42803 C 511.53352,930.94739 498.89508,879.52395 498.89508,879.52395"
id="path3030"
sodipodi:nodetypes="cc"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow2Mend);stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000"
d="M 579.45614,874.14232 C 638.45729,925.94739 644.82958,878.80967 644.82958,878.80967"
id="path3032"
sodipodi:nodetypes="cc"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow2Mend);stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000"
d="M 494.45285,873.73905 C 407.69664,931.25841 391.26142,879.83497 391.26142,879.83497"
id="path3034"
sodipodi:nodetypes="cc"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="opacity:1.0000000;fill:#97ff9f;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.4505868;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3046"
width="669.29736"
height="95.744583"
x="22.945324"
y="209.49988"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:0.21176471;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3048"
width="27.900555"
height="95.629486"
x="23.096386"
y="209.55743"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3050"
width="18.257698"
height="95.629486"
x="107.13255"
y="209.55743"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:0.21176471;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3052"
width="50.757698"
height="95.629486"
x="251.20467"
y="209.55743"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:0.21176471;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3054"
width="29.686272"
height="95.629486"
x="539.81110"
y="209.55743"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3056"
width="27.900555"
height="95.629486"
x="158.28072"
y="209.55743"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:0.21176471;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3058"
width="27.900555"
height="95.629486"
x="354.45398"
y="209.55743"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3060"
width="27.900555"
height="95.629486"
x="458.73972"
y="209.55743"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:0.21176471;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3062"
width="67.113373"
height="95.629486"
x="616.36401"
y="209.55743"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="opacity:1.0000000;fill:#97ff9f;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3070"
width="664.46503"
height="95.744583"
x="26.226122"
y="376.36218"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<text
xml:space="preserve"
style="font-size:17.390287px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="27.714634"
y="188.57069"
id="text3072"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998"><tspan
sodipodi:role="line"
id="tspan3074"
x="27.714634"
y="188.57069">Nursery</tspan></text>
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow2Mend);stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
d="M 38.932235,305.42360 C 429.52601,373.97550 429.52601,373.97550 429.52601,373.97550"
id="path3080"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:0.21176471;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3082"
width="27.900555"
height="95.629486"
x="422.33337"
y="376.38739"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:0.21176471;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3084"
width="50.757698"
height="95.629486"
x="450.34406"
y="376.38739"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:0.21176471;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3086"
width="27.900555"
height="95.629486"
x="501.12524"
y="376.38739"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow2Mend);stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
d="M 278.36297,305.36424 C 467.63468,373.52980 467.63468,373.52980 467.63468,373.52980"
id="path3088"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow2Mend);stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
d="M 368.98559,305.36818 C 510.35219,374.03095 510.35219,374.03095 510.35219,374.03095"
id="path3090"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:0.21176471;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3092"
width="29.686272"
height="95.629486"
x="529.02173"
y="376.38739"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow2Mend);stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
d="M 556.19390,305.83615 C 543.35713,370.53254 543.35713,370.53254 543.35713,370.53254"
id="path3096"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow2Mend);stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
d="M 662.57239,304.85879 C 591.02693,373.02510 591.02693,373.02510 591.02693,373.02510"
id="path3098"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<g
id="g3135"
transform="translate(954.7939,-183.4489)"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998">
<g
transform="translate(-460.0000,398.5714)"
id="g3137"
inkscape:export-filename="/tmp/nursery-pinned.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998">
<rect
style="fill:#000000;fill-opacity:0.21176471;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3139"
width="15.082790"
height="13.979280"
x="510.61618"
y="99.134712"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<text
xml:space="preserve"
style="font-size:15.756983px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="534.28992"
y="110.82124"
id="text3141"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998"><tspan
sodipodi:role="line"
id="tspan3143"
x="534.28992"
y="110.82124">Live Objects</tspan></text>
</g>
<g
transform="translate(-312.2437,371.4286)"
id="g3145"
inkscape:export-filename="/tmp/nursery-pinned.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998">
<rect
style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3147"
width="15.082790"
height="13.979280"
x="510.61618"
y="127.17164"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<text
xml:space="preserve"
style="font-size:15.756983px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="534.28992"
y="138.85815"
id="text3149"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998"><tspan
sodipodi:role="line"
id="tspan3151"
x="534.28992"
y="138.85815">Pinned objects</tspan></text>
</g>
<g
id="g3186"
transform="translate(-31.42857,0.000000)"
inkscape:export-filename="/tmp/nursery-pinned.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998">
<rect
style="fill:#000000;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3155"
width="15.082790"
height="13.979280"
x="392.04477"
y="499.49426"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<text
xml:space="preserve"
style="font-size:15.756983px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="416.38019"
y="511.18079"
id="text3157"
inkscape:export-filename="/tmp/roots.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998"><tspan
sodipodi:role="line"
id="tspan3159"
x="416.38019"
y="511.18079">Free Memory</tspan></text>
</g>
</g>
<rect
style="opacity:1.0000000;fill:#97ff9f;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.4505868;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3161"
width="669.29736"
height="95.744583"
x="775.35132"
y="348.90802"
inkscape:export-filename="/tmp/nursery-pinned.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3165"
width="18.257698"
height="95.629486"
x="859.53857"
y="348.96558"
inkscape:export-filename="/tmp/nursery-pinned.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3171"
width="27.900555"
height="95.629486"
x="910.68671"
y="348.96558"
inkscape:export-filename="/tmp/nursery-pinned.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3175"
width="27.900555"
height="95.629486"
x="1211.1458"
y="348.96558"
inkscape:export-filename="/tmp/nursery-pinned.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<text
xml:space="preserve"
style="font-size:17.390287px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="776.12061"
y="327.97885"
id="text3179"
inkscape:export-filename="/tmp/nursery-pinned.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998"><tspan
sodipodi:role="line"
id="tspan3181"
x="776.12061"
y="327.97885">Nursery</tspan></text>
<rect
style="fill:#000000;fill-opacity:0.21176471;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3191"
width="67.113373"
height="95.629486"
x="558.71350"
y="376.38739"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<rect
style="fill:#000000;fill-opacity:0.21176471;fill-rule:evenodd;stroke:#000000;stroke-width:1.2500000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect3193"
width="396.27408"
height="95.629486"
x="26.046309"
y="376.15903"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998" />
<text
xml:space="preserve"
style="font-size:17.390287px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans;stroke-miterlimit:4.0000000;stroke-dasharray:none"
x="28.444891"
y="361.90738"
id="text3204"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998"><tspan
sodipodi:role="line"
id="tspan3206"
x="28.444891"
y="361.90738">Old generation</tspan></text>
<text
xml:space="preserve"
style="font-size:18.176956px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans;stroke-miterlimit:4.0000000;stroke-dasharray:none"
x="58.242008"
y="430.84366"
id="text3208"
inkscape:export-filename="/tmp/nursery.png"
inkscape:export-xdpi="91.239998"
inkscape:export-ydpi="91.239998"><tspan
sodipodi:role="line"
id="tspan3210"
x="58.242008"
y="430.84366">Objects from the previous generation</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 35 KiB

-266
View File
@@ -1,266 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="744.09448819"
height="1052.3622047"
id="svg2324"
sodipodi:version="0.32"
inkscape:version="0.42.2"
sodipodi:docbase="/home/miguel/mono/gc"
sodipodi:docname="stacks.svg">
<defs
id="defs2326">
<marker
inkscape:stockid="TriangleOutL"
orient="auto"
refY="0.0"
refX="0.0"
id="TriangleOutL"
style="overflow:visible">
<path
sodipodi:nodetypes="cccc"
id="path2462"
d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
transform="scale(0.8)" />
</marker>
<marker
inkscape:stockid="Arrow1Lstart"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow1Lstart"
style="overflow:visible">
<path
sodipodi:nodetypes="ccccc"
id="path2535"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
transform="scale(0.8)" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
inkscape:cx="247.73586"
inkscape:cy="588.43222"
inkscape:document-units="px"
inkscape:current-layer="layer1"
inkscape:window-width="1388"
inkscape:window-height="998"
inkscape:window-x="0"
inkscape:window-y="27" />
<metadata
id="metadata2329">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="opacity:1.0000000;fill:#97ff9f;fill-opacity:0.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0371026;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2332"
width="198.44141"
height="408.83401"
x="46.241261"
y="174.59003" />
<g
id="g2356"
transform="translate(-27.27417,130.3097)">
<rect
y="582.59204"
x="312.92154"
height="119.77635"
width="198.44141"
id="rect2342"
style="opacity:1.0000000;fill:#3a3a3a;fill-opacity:0.20765026;fill-rule:evenodd;stroke:#000000;stroke-width:0.56134999;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2344"
y="699.81897"
x="523.83838"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="699.81897"
x="523.83838"
id="tspan2346"
sodipodi:role="line">stack_start</tspan></text>
<text
id="text2348"
y="593.75293"
x="523.83838"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="593.75293"
x="523.83838"
id="tspan2350"
sodipodi:role="line">stack_end</tspan></text>
<text
id="text2352"
y="646.71393"
x="366.79654"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="646.71393"
x="366.79654"
id="tspan2354"
sodipodi:role="line">Thread N stack</tspan></text>
</g>
<rect
style="opacity:1.0000000;fill:#3a3a3a;fill-opacity:0.20765026;fill-rule:evenodd;stroke:#000000;stroke-width:0.54655713;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2392"
width="198.44141"
height="113.54674"
x="45.884109"
y="175.09026" />
<rect
style="opacity:1.0000000;fill:#3a3a3a;fill-opacity:0.20765026;fill-rule:evenodd;stroke:#000000;stroke-width:0.39553967;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2367"
width="198.44141"
height="59.468048"
x="45.734818"
y="175.04271" />
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="251.71294"
y="231.87846"
id="text2369"><tspan
sodipodi:role="line"
id="tspan2371"
x="251.71294"
y="231.87846">info-&gt;stack_start</tspan></text>
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="251.71294"
y="187.96211"
id="text2373"><tspan
sodipodi:role="line"
id="tspan2375"
x="251.71294"
y="187.96211">info-&gt;stack_end</tspan></text>
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="99.609818"
y="209.25038"
id="text2388"><tspan
sodipodi:role="line"
id="tspan2390"
x="99.609818"
y="209.25038">Thread 1 stack</tspan></text>
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.86822808;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:url(#TriangleOutL);stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
d="M 144.95552,246.36741 C 144.95552,277.32787 144.95552,277.32787 144.95552,277.32787"
id="path2405" />
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="251.71294"
y="284.74033"
id="text2553"><tspan
sodipodi:role="line"
id="tspan2555"
x="251.71294"
y="284.74033">limit: stack bottom</tspan></text>
<g
id="g2664"
transform="translate(0.134777,113.7128)">
<rect
y="175.09026"
x="45.884109"
height="113.54674"
width="198.44141"
id="rect2666"
style="opacity:1.0000000;fill:#3a3a3a;fill-opacity:0.20765026;fill-rule:evenodd;stroke:#000000;stroke-width:0.54655713;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<rect
y="175.04271"
x="45.734818"
height="59.468048"
width="198.44141"
id="rect2668"
style="opacity:1.0000000;fill:#3a3a3a;fill-opacity:0.20765026;fill-rule:evenodd;stroke:#000000;stroke-width:0.39553967;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2670"
y="231.87846"
x="251.71294"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="231.87846"
x="251.71294"
id="tspan2672"
sodipodi:role="line">info-&gt;stack_start</tspan></text>
<text
id="text2674"
y="187.96211"
x="251.71294"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="187.96211"
x="251.71294"
id="tspan2676"
sodipodi:role="line">info-&gt;stack_end</tspan></text>
<text
id="text2678"
y="209.25038"
x="99.609818"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="209.25038"
x="99.609818"
id="tspan2680"
sodipodi:role="line">Thread 2 stack</tspan></text>
<path
id="path2682"
d="M 144.95552,246.36741 C 144.95552,277.32787 144.95552,277.32787 144.95552,277.32787"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.86822808;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:url(#TriangleOutL);stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
<text
id="text2684"
y="284.74033"
x="251.71294"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="284.74033"
x="251.71294"
id="tspan2686"
sodipodi:role="line">limit: stack bottom</tspan></text>
</g>
<rect
style="opacity:1.0000000;fill:#000000;fill-opacity:0.098360606;fill-rule:evenodd;stroke:#000000;stroke-width:0.57452667;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="rect2699"
width="198.44141"
height="125.46541"
x="46.136436"
y="457.94003" />
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="81.862022"
y="523.79871"
id="text2701"><tspan
sodipodi:role="line"
id="tspan2703"
x="81.862022"
y="523.79871">Program, Data, Heap</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 11 KiB

-113
View File
@@ -1,113 +0,0 @@
1. Thread safety of metadata structures
----------------------------------------
1.1 Synchronization of read-only data
-------------------------------------
Read-only data is data which is not modified after creation, like the
actual binary metadata in the metadata tables.
There are three kinds of threads with regards to read-only data:
- readers
- the creator of the data
- the destroyer of the data
Most threads are readers.
- synchronization between readers is not neccesary
- synchronization between the writers is done using locks.
- synchronization between the readers and the creator is done by not exposing
the data to readers before it is fully constructed.
- synchronization between the readers and the destroyer: TBD.
1.2 Deadlock prevention plan
----------------------------
Hold locks for the shortest time possible. Avoid calling functions inside
locks which might obtain global locks (i.e. locks known outside this module).
1.3 Locks
----------
1.3.1 Simple locks
------------------
There are a lot of global data structures which can be protected by a 'simple' lock. Simple means:
- the lock protects only this data structure or it only protects the data structures in a given C module.
An example would be the appdomains list in domain.c
- the lock is only held for a short amount of time, and no other lock is acquired inside this simple lock. Thus there is
no possibility of deadlock.
1.3.2 The class loader lock
---------------------------
This locks is held by the class loading routines in class.c and loader.c. It
protects the various caches inside MonoImage which are used by these modules.
1.3.3 The domain lock
---------------------
Each appdomain has a lock which protects the per-domain data structures.
1.3.4 The locking hierarchy
---------------------------
It is useful to model locks by a locking hierarchy, which is a relation between locks, which is reflexive, transitive,
and antisymmetric, in other words, a lattice. If a thread wants to acquire a lock B, while already holding A, it can only
do it if A < B. If all threads work this way, then no deadlocks can occur.
Our locking hierarchy so far looks like this:
<DOMAIN LOCK>
\
<CLASS LOADER LOCK>
\ \
<SIMPLE LOCK 1> <SIMPLE LOCK 2>
1.4 Notes
----------
Some common scenarios:
- if a function needs to access a data structure, then it should lock it itself, and do not count on its caller locking it.
So for example, the image->class_cache hash table would be locked by mono_class_get().
- there are lots of places where a runtime data structure is created and stored in a cache. In these places, care must be
taken to avoid multiple threads creating the same runtime structure, for example, two threads might call mono_class_get ()
with the same class name. There are two choices here:
<enter mutex>
<check that item is created>
if (created) {
<leave mutex>
return item
}
<create item>
<store it in cache>
<leave mutex>
This is the easiest solution, but it requires holding the lock for the whole time which might create a scalability problem, and could also lead to deadlock.
<enter mutex>
<check that item is created>
<leave mutex>
if (created) {
return item
}
<create item>
<enter mutex>
<check that item is created>
if (created) {
/* Another thread already created and stored the same item */
<free our item>
<leave mutex>
return orig item
}
else {
<store item in cache>
<leave mutex>
return item
}
This solution does not present scalability problems, but the created item might be hard to destroy (like a MonoClass).
- lazy initialization of hashtables etc. is not thread safe
Loaded 100 of 21843 files, more files were not shown because too many files have changed in this diff. Show more