summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | Reduce the memory usage in ReferenceMapperPiotr Jastrzebski2015-03-181-40/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ReferenceMapper.get(FieldBinding) and ReferenceMapper.get(MethodBinding) create a signature of a binding to use it as a key in |methods| and |fields| maps. This requires creation of a string which is a copy of data from binding. We can avoid this and reduce the ammount of memory used by using a special SignatureKey instead of string signature. The new key shares data with binding so we don't need to copy it. Before this change ReferenceMapper.get(FieldBinding) was allocating 65MB of memory with 957,507 allocations (1% of all allocated memory) and ReferenceMapper.get(MethodBinding) was allocating 71MB of memory with 1,138,383 allocations (1,1% of all allocated memory) during Music app compilation. After this change ReferenceMapper.get(FieldBinding) allocates 1MB of memory with 32,666 allocations (0.0% of all allocated memory) and ReferenceMapper.get(MethodBinding) allocates 10MB of memory with 231,556 allocations (0.2% of all allocated memory). This means we saved 125MB of memory and 1,831,668 allocations (1.9% of all allocated memory). Change-Id: I91f08a7ac13271d67803028955156f4afdc5d54f
* | | | | | | Merge "Remove reference to StandardCharsets" into ub-jackYohann Roussel2015-03-181-3/+5
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | |
| * | | | | | Remove reference to StandardCharsetsYohann Roussel2015-03-181-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since it's java 7. Change-Id: Iaee93f5e074c0fb4c7dead6aee51a95e4660c7d6
* | | | | | | Declare a jar containing jack annotationsJean-Marie Henaff2015-03-171-0/+36
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In build.xml. Change-Id: I9b321ab80cd3b89154ecec042f7f0e846aa54e5f
* | | | | | Set Jack instance to 6mikaelpeltier2015-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Icbeb80a934445b177179c7192986878e9375b9bf
* | | | | | Declare a jar containing jack annotationsYohann Roussel2015-03-171-0/+12
|/ / / / / | | | | | | | | | | | | | | | Change-Id: I9462901166e2153c01f1d199d85787d00012e5e1
* | | | | Merge "Stop creating CstString bytes eagerly." into ub-jackPiotr Jastrzebski2015-03-171-17/+36
|\ \ \ \ \
| * | | | | Stop creating CstString bytes eagerly.Piotr Jastrzebski2015-03-161-17/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Profiler showed that during a Music app compilation we create 1,364,332 instances of CstStrings. They require allocation of 395MB which is 6.4% of all memory allocated. It requires 5,457,328 allocations. Most of them is done in stringToUtf8Bytes. Fortunately only 157,495 instances actually uses the |bytes| field. This means that if we create |bytes| lazily then we can save a lot of memory and cpu (stringToUtf8Bytes is also a cpu hotspot). This change makes |bytes| in CtsString lazily computed. For Music app the memory allocation is reduced by 353MB which is 5.6% of all memory allocated. It also saves us 3,788,436 allocations. Change-Id: I8f2980be07da29d31fc639543dfb9b3966c8cd4e
* | | | | | Merge "Avoid comparing full signatures of methods." into ub-jackPiotr Jastrzebski2015-03-173-2/+187
|\ \ \ \ \ \
| * | | | | | Avoid comparing full signatures of methods.Piotr Jastrzebski2015-03-173-2/+187
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TypePackageAndMethodFormatter.getName(JMethod) is not cheap both cpu and memory wise. In ReferenceMapper.findMethod we don't need to compare MethodBindings with signature of every method. Instead we can first compare the name of the method and the number of parameters and only when those are equal check the full signature. This saves a lot of memory allocations. Before findMethod was making 1,215,894 allocations for over 77MB of memory. After this change it makes only 84,391 allocations for 5MB of memory. This reduces the total amount of memory used during compilation (org.eclipse.jdt.internal.compiler.ProcessTaskManager.run) from 951MB to 879MB which is over 7.5%. Change-Id: I01362d881e9d64ee7a0b6d06e83558dae17c1b87
* | | | | | Merge "Adapt test-opcodes.mk to renaming of test sources" into ub-jackYohann Roussel2015-03-171-4/+4
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | |
| * | | | | Adapt test-opcodes.mk to renaming of test sourcesYohann Roussel2015-03-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Renaming was done by commit 24bdf084c107acaeb33f89fcbef97ce276c3a749 Change-Id: I7072774ba9cbfc92a0899d3e1a0ca9f532eda7db
* | | | | | Merge "Construct jayce related fields lazily in InputJackLibrary." into ub-jackPiotr Jastrzebski2015-03-171-32/+32
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | Construct jayce related fields lazily in InputJackLibrary.Piotr Jastrzebski2015-03-171-32/+32
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JackFormatErrorTest fails because it expects LibraryReadingException to be thrown while compiling. This was no longer the case because library verification was happening on its creation. Create and verify jayce related bit of input library only when it's used. This way the exception behaviour is preserved. Bug: 19778533 Change-Id: Icd75aedf91dc2ad80ecb66efcb7726c290a9b455
* | | | | Merge "Revert "Package jack annotations"" into ub-jackYohann Roussel2015-03-171-8/+0
|\ \ \ \ \
| * | | | | Revert "Package jack annotations"Yohann Roussel2015-03-171-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 654914e837381345f929ff3f788371a06ab2f085 Change-Id: I2410144d1f409f448e9c53d78a209ac8480d04ef
* | | | | | Merge "VPath must not end by '/'" into ub-jackmikaelpeltier2015-03-171-1/+1
|\ \ \ \ \ \
| * | | | | | VPath must not end by '/'mikaelpeltier2015-03-171-1/+1
| |/ / / / / | | | | | | | | | | | | | | | | | | Change-Id: I915b89aca13d73d1b8836c4b0afb4aaa2bad4097
* | | | | | Accept more tests to run with cli-based ToolchainsJean-Marie Henaff2015-03-1714-13/+104
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | About 200 tests were skipped with those toolchains. Try to reduce this number. Change-Id: I7713638275ca5fa1569dd141c367a683e9c330ae
* | | | | Load default libraries from jack.jarYohann Roussel2015-03-1720-43/+413
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | For now the only default library contains the jack annotations. The default libraries can be ignored by "--no-default-libraries". Bug: 17803510 Change-Id: I0eb0c1a535e1d4ff808c744ba7c1924e4dd4aee6
* | | | Add missing minElements(0) on some propertiesJean-Philippe Lesot2015-03-161-2/+2
| | | | | | | | | | | | | | | | Change-Id: I4311c968cbd38261625a911b6dc338259c09d2a3
* | | | Rework all variable names in the config frameworkJean-Philippe Lesot2015-03-1679-138/+464
| | | | | | | | | | | | | | | | Change-Id: Icf61c8f1326cfd2c80f3f043a6adc57aa765632b
* | | | Merge "Fix build breakage." into ub-jackPiotr Jastrzebski2015-03-163-101/+78
|\ \ \ \
| * | | | Fix build breakage.Piotr Jastrzebski2015-03-163-101/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two problems with https://android-review.googlesource.com/#/c/138081: 1. Not every JackInputLibrary contains jayce files and the ones that don't are also missing JayceProperties.KEY_JAYCE_MAJOR_VERSION and JayceProperties.KEY_JAYCE_MINOR_VERSION properties. 2. When something goes wrong in InputJackLibrary constructor we throw exception with location but at this point location is not yet created. The solution for these problems is to check if the library contains jayce files before initializing jayce specific fields and to move location to InputJackLibrary from InputJackLibraryImpl subclasses. This also removes some code duplication. Change-Id: Icc83f061bcace3b7023d93a1e76d21f5e6ef7e82
* | | | | Merge "Speed up Ant script" into ub-jackJean-Marie Hénaff2015-03-165-15/+253
|\ \ \ \ \
| * | | | | Speed up Ant scriptJean-Marie Hénaff2015-03-165-15/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit be49dc7d7d939391a5646a174df8eebe77b31fef, but also fixes a bug that made jack tests fail which is why it had been reverted. Change-Id: Iee6e3b05549c3f603558910eb45149eb88333f0a
* | | | | | Merge "Print internal compiler exception on the right error stream" into ub-jackmikaelpeltier2015-03-161-1/+1
|\ \ \ \ \ \ | |_|/ / / / |/| | | | |
| * | | | | Print internal compiler exception on the right error streammikaelpeltier2015-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ice4946d0980b7a89df10dadf25dd2c2178288ab9
* | | | | | Merge "Reduce the number of JayceReader constructor created." into ub-jackPiotr Jastrzebski2015-03-164-86/+95
|\ \ \ \ \ \
| * | | | | | Reduce the number of JayceReader constructor created.Piotr Jastrzebski2015-03-164-86/+95
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In JayceReaderFactory.get we use a Constructor<?> of a JayceReader. This reader is always the same for a library but currently we obtain the Constructor<?> object for each type in a library. This change keeps the Constructor<?> object for each JackInputLibrary in the library object. This way it can be created only once per library and reused for reading all the types in the library. Change-Id: I2786624b8b51339645d16bfc71f5773d2ec3da37
* | | | | | Merge "Reduce the number of iterators created." into ub-jackPiotr Jastrzebski2015-03-168-14/+32
|\ \ \ \ \ \ | | |_|/ / / | |/| | | / | |_|_|_|/ |/| | | |
| * | | | Reduce the number of iterators created.Piotr Jastrzebski2015-03-118-14/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Profiler showed that Collection.iterator() allocates 6% of all allocated memory. This is 406MB for Music app. It turns out that big part of this is called in JVisitor.accept(Collection<T>). At least half of the time we know that the collection is an ArrayList and we can iterate through it without an iterator by just calling ArrayList.get(index). This change introduces new accept(ArrayList<T>) method to JVisitor and JVisitorWithConcurrentModification. Those methods iterate over the collection without iterator. Also in JVisitorWithConcurrentModification when we know that copy is an ArrayList we don't need to use iterator. This change reduces the ammout of memory allocated by Collection.iterator() to 3% from 6%. For Music app this is 220MB instead of 406MB. It also means over 5,000,000 allocations less. Impact on performance is also positive as iterator makes more operations than get() method. Change-Id: I7e55a32b5ff01eb9b071908f1de5e21a1fb70f00
* | | | | Bump version to 1.1-a9Jean-Philippe Lesot2015-03-161-2/+2
| |/ / / |/| | | | | | | | | | | Change-Id: I4d114f0a6cf63ca4f9d43e09bf7278f1259d9b3d
* | | | Merge "Do not print warnings for unsupported proguard flags, for now" into ↵Benoit Lamarche2015-03-131-3/+1
|\ \ \ \ | | | | | | | | | | | | | | | ub-jack
| * | | | Do not print warnings for unsupported proguard flags, for nowBenoit Lamarche2015-03-131-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Bug: 19637337 Change-Id: Ie68859b83056038cdd20689089b7851264e834da
* | | | | Merge "Allow to build args4j 2.0.30 with java 6" into ub-jackmikaelpeltier2015-03-134-63/+16
|\ \ \ \ \
| * | | | | Allow to build args4j 2.0.30 with java 6mikaelpeltier2015-03-134-63/+16
| |/ / / / | | | | | | | | | | | | | | | Change-Id: I27a62e7c0863caede0853b20cd2949eac76c4d8e
* | | | | Ensure that jack script use TMPDIRYohann Roussel2015-03-132-3/+5
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | If the environment variable is defined. Bug: 19654122 Change-Id: Iaa26c4f729eabec8953be715b2c09eff827e8695
* | | | Merge "Add property to set an output file by reporter level" into ub-jackJean-Philippe Lesot2015-03-136-30/+88
|\ \ \ \
| * | | | Add property to set an output file by reporter levelJean-Philippe Lesot2015-03-136-30/+88
| | | | | | | | | | | | | | | | | | | | | | | | | Bug: 19715777 Change-Id: Ic729dc387f6ac7b95068f864ae44cf63f0469a90
* | | | | Add forgotten documentation into servermikaelpeltier2015-03-131-1/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: Ib277f6325714394bc49d5a731f18ba4eda9b8fad
* | | | | Merge "Update arg4j to version 2.0.30" into ub-jackmikaelpeltier2015-03-13129-1120/+3549
|\ \ \ \ \
| * | | | | Update arg4j to version 2.0.30mikaelpeltier2015-03-13129-1120/+3549
| |/ / / / | | | | | | | | | | | | | | | Change-Id: Ia94c584414379011b92c7e1d5f1e143bd1d4dc75
* | | | | Merge "Enable server running jack into the same vm" into ub-jackmikaelpeltier2015-03-132-2/+2
|\ \ \ \ \
| * | | | | Enable server running jack into the same vmmikaelpeltier2015-03-132-2/+2
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Set the number of Jack instance to 10, seems to be the best value currently. Change-Id: I275c78d80006abab45fc7284817eae70af5490c3
* | | | | Update documentation to remove a stopshipmikaelpeltier2015-03-131-3/+3
|/ / / / | | | | | | | | | | | | Change-Id: I7d9bc28f915d8f936f30d63cbf93e8acc409f9d3
* | | | Add documentation on Server classesmikaelpeltier2015-03-134-4/+4
| | | | | | | | | | | | | | | | Change-Id: I62542d1f529fd322fb0083fcab40f491d2fd1440
* | | | Fix PairCodec and ConvertCodecJean-Philippe Lesot2015-03-134-38/+60
| |/ / |/| | | | | | | | | | | | | | | | | If a StringCodec return an object from checkString, we can not ignore it. It was not the way PairCodec and ConvertCodec work. Change-Id: Ic61f5d8fbd30fc7a0e22949f3a324dae3fd710ed
* | | Revert "Speed up Ant script"Benoit Lamarche2015-03-125-253/+18
| | | | | | | | | | | | This reverts commit 6f4d464b8728997b9e7052ac8ed169272859b229.
* | | Rename Options.getProguarfFlagsFileFromWorkingDir()Benoit Lamarche2015-03-123-8/+4
| | | | | | | | | | | | | | | | | | | | | - Also, remove Options.getInputSources(). - And fix a line too long in CommandLine Change-Id: I600a6e6d479be464a5b424ad93db429dc47c3c76