This page is no longer maintained — Please continue to the home page at www.scala-lang.org

better performance tracking through linearization

2 replies
extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.

New tool:

https://raw.github.com/paulp/libscala/master/bin/git-linearize-history

Branch produced by said tool (since v2.9.1)

http://github.com/paulp/scala/branches/rebased-master

Motivation for tool:

Benchmark graphs which don't look like something's teeth:
http://www.scala-lang.org/node/360/master!Compilation%20time%20-%20quick_comp
What, you knew a better way? Then you should have told me.

Ratio of "Was" commits to "Reset" commits (see below for explanation):

1672 :: 62 (not bad at all)

Illustration of difference between real master and rebased-master:

% git --no-pager log -n20 --oneline --graph master

* a6a9684f5b (stem/master, stem/failing-tests, origin/master,
leaf/master, bud/master, master) A better error message for
inheritance conflict.
* e512518d25 Streamlining skolemization, specialization.
* 63d9ae6dc4 Merge remote-tracking branch 'TiarkRompf/SI-5506' into develop
|\
| * b9ac439608 fixes SI-5506. better cps type propagation for
polymorphic and multi-argument list methods.
* | b0ae549fcc (origin/develop) Merge remote-tracking branch
'szabolcsberecz/SI-5215' into develop
|\ \
| * | 5e52ce9a13 Fix for SI-5215: scalac crash when @elidable used in trait
* | | 526c92848a Specialize Tuple2 on more types.
|/ /
* | cf0ae72aae (stem/si-3575) Fix [@spec A] to correctly induce AnyRef
specialization.
* | 4a5c6a0184 Merge remote-tracking branch 'phaller/execution-context'
|\ \
| * | 91dcdbd377 Fix race condition in scala-concurrent-tck test
* | | 87e369ef46 More specialization tests.
* | | ec160bae7e More on SI-5500.
| | |
| \ \
*-. \ \ 0d19fe04eb Merge branch 'master', remote-tracking branch
'non/si-5500' into develop
|\ \ \ \
| | * | | 1df4fc6e59 Fixed over-optimistic anyrefSpecCache (closes SI-5500).
| * | | | 0894d3be18 Cleanup in aisle New.
| | | | |
| \ \ \ \
*-. \ \ \ \ 08f9a19555 Merge remote-tracking branches
'hubertp/issue/5452' and 'hubertp/issue/5493' into develop
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | |
| | * | | | b433bdba5a Closes #5497. Chain contexts by sharing the
error buffer, unless you explicitly create a silent context. Review by
@odersky
| | | |_|/
| | |/| |
| * | | | b10b5821f4 Closes #5452. Instead of trying to track the
fallback attempts we rely on the context state to inform us which
fallback is the last one. setError cannot always be called in
NoBestMethodAlternativeError because inferMethodAlternative relies on
side-effects. Review by @paulp.
| |/ / /
* | | | 2fe570291a Merge remote-tracking branch
'scalamacros/pullrequest/macros' into develop
|\ \ \ \
| * | | | e9926a5207 Fixes miscellaneous macro bugs
| |/ / /

% git --no-pager log -n20 --oneline --graph rebased-master

git --no-pager log -n20 --oneline --graph rebased-master
* 1f1130e44c (HEAD, paulp/rebased-master, rebased-master) (Was
v2.10.0-M1-380-ga6a9684f5b) A better error message for inheritance
conflict.
* d938e04e3b (Was v2.10.0-M1-379-ge512518d25) Streamlining
skolemization, specialization.
* 0218f1e75d (Was v2.10.0-M1-269-gb9ac439608) fixes SI-5506. better
cps type propagation for polymorphic and multi-argument list methods.
* f760ad4358 (Was v2.10.0-M1-374-g5e52ce9a13) Fix for SI-5215: scalac
crash when @elidable used in trait
* 7f79aa26b6 (Was v2.10.0-M1-374-g526c92848a) Specialize Tuple2 on more types.
* 5acd7b0551 (Was v2.10.0-M1-373-gcf0ae72aae) Fix [@spec A] to
correctly induce AnyRef specialization.
* c349c254f3 (Was v2.10.0-M1-345-g91dcdbd377) Fix race condition in
scala-concurrent-tck test
* dd6946343d (Was v2.10.0-M1-370-g87e369ef46) More specialization tests.
* ab637c2bd6 (Was v2.10.0-M1-369-gec160bae7e) More on SI-5500.
* f19e0331ca (Was v2.10.0-M1-282-g1df4fc6e59) Fixed over-optimistic
anyrefSpecCache (closes SI-5500).
* 0afc0ff92a (Was v2.10.0-M1-363-g0894d3be18) Cleanup in aisle New.
* 4fb089c7f3 (Was v2.10.0-M1-269-gb433bdba5a) Closes #5497. Chain
contexts by sharing the error buffer, unless you explicitly create a
silent context. Review by @odersky
* f1e6cdd466 (Was v2.10.0-M1-269-gb10b5821f4) Closes #5452. Instead
of trying to track the fallback attempts we rely on the context state
to inform us which fallback is the last one. setError cannot always
be called in NoBestMethodAlternativeError because
inferMethodAlternative relies on side-effects. Review by @paulp.
* 323d770d4e (Was v2.10.0-M1-269-ge9926a5207) Fixes miscellaneous macro bugs
* 1df9c88e9f (Reset v2.10.0-M1-358-g0288a0788a) Fix for "type _$1
defined twice".
* e9fd5b8f70 (Was v2.10.0-M1-116-gf2ccb43a84) Change the default
reportFailure implementation.
* 8f746d09c3 (Was v2.10.0-M1-115-gce0bfa62aa) Fix typo in Future
trait. Simplify recoverWith.
* ba10d7ce3d (Was v2.10.0-M1-114-g14bf00cda4) Rename to recoverWith
and fallbackTo in Future.
* 910d5b2311 (Was v2.10.0-M1-113-g0d23e83d13) Replaced Either with Try
throughout scala.concurrent.
* 89bb697b8e (Was v2.10.0-M1-112-g8f36bf7a71) Add some missing
methods, remove obsolete methods in futures.

Help from said tool:

** Warning! This utterly destroys the current branch AND
deletes every file in the tree which is not checked in by
virtue of calling git clean -fxd. You have been warned.

Calculates a linear path from to the current HEAD and
rewrites the current branch such that all commits since
are applied linearly. It does this by first attempting
to cherry-pick each commit, and if that fails, resetting
the state of the tree to that of the commit it is trying to
cherry-pick.

Commits which cherry-pick cleanly are rewritten:
(Was )
Commits for which a hard reset must be issued are rewritten:
(Reset )

This means that a "Was" commit accurately reproduces the
change in the original patch, but not necessarily the same
tree. Conversely, a "Reset" commit accurately reproduces
the original tree at that point, but does not reproduce the
original patch.

Example usage:

git checkout -b my-destroyable-branch master
git log --oneline --graph # for comparison purposes
$0 HEAD~20

git log --oneline --graph

adriaanm
Joined: 2010-02-08,
User offline. Last seen 31 weeks 4 days ago.
Re: better performance tracking through linearization
wb, Toothless Benchmark Charts!
On Mon, Feb 20, 2012 at 7:58 PM, Paul Phillips <paulp@improving.org> wrote:
New tool:

 https://raw.github.com/paulp/libscala/master/bin/git-linearize-history

Branch produced by said tool (since v2.9.1)

 http://github.com/paulp/scala/branches/rebased-master

Motivation for tool:

 Benchmark graphs which don't look like something's teeth:
   http://www.scala-lang.org/node/360/master!Compilation%20time%20-%20quick_comp
 What, you knew a better way? Then you should have told me.

Ratio of "Was" commits to "Reset" commits (see below for explanation):

 1672 :: 62  (not bad at all)

Illustration of difference between real master and rebased-master:


% git --no-pager log -n20 --oneline --graph master

* a6a9684f5b (stem/master, stem/failing-tests, origin/master,
leaf/master, bud/master, master) A better error message for
inheritance conflict.
* e512518d25 Streamlining skolemization, specialization.
*   63d9ae6dc4 Merge remote-tracking branch 'TiarkRompf/SI-5506' into develop
|\
| * b9ac439608 fixes SI-5506. better cps type propagation for
polymorphic and multi-argument list methods.
* |   b0ae549fcc (origin/develop) Merge remote-tracking branch
'szabolcsberecz/SI-5215' into develop
|\ \
| * | 5e52ce9a13 Fix for SI-5215: scalac crash when @elidable used in trait
* | | 526c92848a Specialize Tuple2 on more types.
|/ /
* | cf0ae72aae (stem/si-3575) Fix [@spec A] to correctly induce AnyRef
specialization.
* |   4a5c6a0184 Merge remote-tracking branch 'phaller/execution-context'
|\ \
| * | 91dcdbd377 Fix race condition in scala-concurrent-tck test
* | | 87e369ef46 More specialization tests.
* | | ec160bae7e More on SI-5500.
| | |
|  \ \
*-. \ \   0d19fe04eb Merge branch 'master', remote-tracking branch
'non/si-5500' into develop
|\ \ \ \
| | * | | 1df4fc6e59 Fixed over-optimistic anyrefSpecCache (closes SI-5500).
| * | | | 0894d3be18 Cleanup in aisle New.
| | | | |
|  \ \ \ \
*-. \ \ \ \   08f9a19555 Merge remote-tracking branches
'hubertp/issue/5452' and 'hubertp/issue/5493' into develop
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | |
| | * | | | b433bdba5a Closes #5497. Chain contexts by sharing the
error buffer, unless you explicitly create a silent context. Review by
@odersky
| | | |_|/
| | |/| |
| * | | | b10b5821f4  Closes #5452.  Instead of trying to track the
fallback attempts we rely on the  context state to inform us which
fallback is the last one.  setError cannot always be called in
NoBestMethodAlternativeError  because inferMethodAlternative relies on
side-effects.  Review by @paulp.
| |/ / /
* | | |   2fe570291a Merge remote-tracking branch
'scalamacros/pullrequest/macros' into develop
|\ \ \ \
| * | | | e9926a5207 Fixes miscellaneous macro bugs
| |/ / /


% git --no-pager log -n20 --oneline --graph rebased-master

git --no-pager log -n20 --oneline --graph rebased-master
* 1f1130e44c (HEAD, paulp/rebased-master, rebased-master) (Was
v2.10.0-M1-380-ga6a9684f5b) A better error message for inheritance
conflict.
* d938e04e3b (Was v2.10.0-M1-379-ge512518d25) Streamlining
skolemization, specialization.
* 0218f1e75d (Was v2.10.0-M1-269-gb9ac439608) fixes SI-5506. better
cps type propagation for polymorphic and multi-argument list methods.
* f760ad4358 (Was v2.10.0-M1-374-g5e52ce9a13) Fix for SI-5215: scalac
crash when @elidable used in trait
* 7f79aa26b6 (Was v2.10.0-M1-374-g526c92848a) Specialize Tuple2 on more types.
* 5acd7b0551 (Was v2.10.0-M1-373-gcf0ae72aae) Fix [@spec A] to
correctly induce AnyRef specialization.
* c349c254f3 (Was v2.10.0-M1-345-g91dcdbd377) Fix race condition in
scala-concurrent-tck test
* dd6946343d (Was v2.10.0-M1-370-g87e369ef46) More specialization tests.
* ab637c2bd6 (Was v2.10.0-M1-369-gec160bae7e) More on SI-5500.
* f19e0331ca (Was v2.10.0-M1-282-g1df4fc6e59) Fixed over-optimistic
anyrefSpecCache (closes SI-5500).
* 0afc0ff92a (Was v2.10.0-M1-363-g0894d3be18) Cleanup in aisle New.
* 4fb089c7f3 (Was v2.10.0-M1-269-gb433bdba5a) Closes #5497. Chain
contexts by sharing the error buffer, unless you explicitly create a
silent context. Review by @odersky
* f1e6cdd466 (Was v2.10.0-M1-269-gb10b5821f4)  Closes #5452.  Instead
of trying to track the fallback attempts we rely on the  context state
to inform us which fallback is the last one.  setError cannot always
be called in NoBestMethodAlternativeError  because
inferMethodAlternative relies on side-effects.  Review by @paulp.
* 323d770d4e (Was v2.10.0-M1-269-ge9926a5207) Fixes miscellaneous macro bugs
* 1df9c88e9f (Reset v2.10.0-M1-358-g0288a0788a) Fix for "type _$1
defined twice".
* e9fd5b8f70 (Was v2.10.0-M1-116-gf2ccb43a84) Change the default
reportFailure implementation.
* 8f746d09c3 (Was v2.10.0-M1-115-gce0bfa62aa) Fix typo in Future
trait. Simplify recoverWith.
* ba10d7ce3d (Was v2.10.0-M1-114-g14bf00cda4) Rename to recoverWith
and fallbackTo in Future.
* 910d5b2311 (Was v2.10.0-M1-113-g0d23e83d13) Replaced Either with Try
throughout scala.concurrent.
* 89bb697b8e (Was v2.10.0-M1-112-g8f36bf7a71) Add some missing
methods, remove obsolete methods in futures.


Help from said tool:

** Warning! This utterly destroys the current branch AND
deletes every file in the tree which is not checked in by
virtue of calling git clean -fxd. You have been warned.

Calculates a linear path from <ref> to the current HEAD and
rewrites the current branch such that all commits since
<ref> are applied linearly. It does this by first attempting
to cherry-pick each commit, and if that fails, resetting
the state of the tree to that of the commit it is trying to
cherry-pick.

Commits which cherry-pick cleanly are rewritten:
 (Was <ref>)
Commits for which a hard reset must be issued are rewritten:
 (Reset <ref>)

This means that a "Was" commit accurately reproduces the
change in the original patch, but not necessarily the same
tree.  Conversely, a "Reset" commit accurately reproduces
the original tree at that point, but does not reproduce the
original patch.

Example usage:

   git checkout -b my-destroyable-branch master
   git log --oneline --graph # for comparison purposes
   $0 HEAD~20
   <twiddle thumbs>
   git log --oneline --graph

odersky
Joined: 2008-07-29,
User offline. Last seen 45 weeks 6 days ago.
Re: better performance tracking through linearization

On Mon, Feb 20, 2012 at 8:23 PM, Adriaan Moors wrote:
> wb, Toothless Benchmark Charts!

I prefer toothless over pointless in any case :-) Great news!

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland