summaryrefslogtreecommitdiff
path: root/test/files/instrumented
Commit message (Collapse)AuthorAgeFilesLines
* Optimize primitive Array(e1, ..., en)Jason Zaugg2012-11-071-1/+23
| | | | | | | Expands an existing optimization for reference arrays to apply to primitives, as well. Fixes one aspect of SI-6247.
* Revert "Expand optimization of Array(e1, ..., en) to primitive arrays."Jason Zaugg2012-11-061-23/+1
| | | | This reverts commit 8265175ecc42293997d59049f430396c77a2b891.
* Expand optimization of Array(e1, ..., en) to primitive arrays.Jason Zaugg2012-11-041-1/+23
|
* SI-6611 Tighten up an unsafe array optimizationJason Zaugg2012-11-032-0/+14
| | | | | The net was cast too wide and was unsafely optimizing away array copies.
* Enable inlining in constructors.Grzegorz Kossakowski2012-08-075-0/+39
| | | | | | | | | | | | | | | | | Inlining in constructors has been disabled a long time ago due to some VerifyErrors. Unfortunately, @dragos cannot recall what exactly was the problem. I tried to enable inlining in constructors and I didn't see any problem. `Predef.assert` calls in class constructors are one of the biggest contributors to closure allocation in a compiler so we better off get rid of it. Added a test-case that checks if inlining in constructors works properly. Review by @magarciaEPFL and @paulp.
* Instrument all classes in `instrumented` package.Grzegorz Kossakowski2012-07-262-0/+20
| | | | | | | | | | | | | | | Extend instrumenting infrastructure to instrument classes in `instrumented` package. This is useful because very often you need to put your classes into non-empty package. E.g. inliner doesn't work properly with empty package at the moment so in order to test any behaviour we need to put classes in some other package that is instrumented. Added testing code for that to instrumentation test-case. Review by @phaller.
* Partest: add `instrumented` test category.Grzegorz Kossakowski2012-07-163-0/+33
--- (taken from README) Tests in `instrumented/` directory are executed the same way as in `run/` but they have additional byte-code instrumentation performed for profiling. You should put your tests in `instrumented/` directory if you are interested in method call counts. Examples include tests for specialization (you want to count boxing and unboxing method calls) or high-level tests for optimizer where you are interested if methods are successfuly inlined (so they should not be called at runtime) or closures are eliminated (so no constructors of closures are called). Check `scala.tools.partest.instrumented.Instrumentation` to learn how to use the instrumentation infrastructure. The instrumentation itself is achieved by attaching a Java agent to the forked VM process that injects calls to profiler. Check `scala.tools.partest.javaagent.ProfilingAgent` for details. --- A few notes on low-level details of this change: * Partest now depends on asm library for byte-code instrumentation (`build.xml`) * Build additional jar called `scala-partest-javaagent.jar` that is used with `-javaagent:` option. (`build.xml`) * Set `-javaagent:` option for all tests in `instrumented/` directory. (`RunnerManger.scala`) * Introduce a new category of tests called `instrumented`. * Add one instrumented test to demonstrate usage and test new infrastructure itself. (`InstrumentationTest.scala`) Review by @phaller.