OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2013 The Chromium Authors. All rights reserved. | 3 # Copyright 2013 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """Creates a TOC file from a Java jar. | 7 """Creates a TOC file from a Java jar. |
8 | 8 |
9 The TOC file contains the non-package API of the jar. This includes all | 9 The TOC file contains the non-package API of the jar. This includes all |
10 public/protected/package classes/functions/members and the values of static | 10 public/protected/package classes/functions/members and the values of static |
(...skipping 26 matching lines...) Expand all Loading... |
37 return classes | 37 return classes |
38 | 38 |
39 | 39 |
40 def CallJavap(classpath, classes): | 40 def CallJavap(classpath, classes): |
41 javap_cmd = [ | 41 javap_cmd = [ |
42 'javap', | 42 'javap', |
43 '-package', # Show public/protected/package. | 43 '-package', # Show public/protected/package. |
44 # -verbose is required to get constant values (which can be inlined in | 44 # -verbose is required to get constant values (which can be inlined in |
45 # dependents). | 45 # dependents). |
46 '-verbose', | 46 '-verbose', |
| 47 '-J-XX:NewSize=4m', |
47 '-classpath', classpath | 48 '-classpath', classpath |
48 ] + classes | 49 ] + classes |
49 return build_utils.CheckOutput(javap_cmd) | 50 return build_utils.CheckOutput(javap_cmd) |
50 | 51 |
51 | 52 |
52 def ExtractToc(disassembled_classes): | 53 def ExtractToc(disassembled_classes): |
53 # javap output is structured by indent (2-space) levels. | 54 # javap output is structured by indent (2-space) levels. |
54 good_patterns = [ | 55 good_patterns = [ |
55 '^[^ ]', # This includes all class/function/member signatures. | 56 '^[^ ]', # This includes all class/function/member signatures. |
56 '^ SourceFile:', | 57 '^ SourceFile:', |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 build_utils.WriteDepfile( | 116 build_utils.WriteDepfile( |
116 options.depfile, | 117 options.depfile, |
117 build_utils.GetPythonDependencies()) | 118 build_utils.GetPythonDependencies()) |
118 | 119 |
119 if options.stamp: | 120 if options.stamp: |
120 build_utils.Touch(options.stamp) | 121 build_utils.Touch(options.stamp) |
121 | 122 |
122 | 123 |
123 if __name__ == '__main__': | 124 if __name__ == '__main__': |
124 sys.exit(main()) | 125 sys.exit(main()) |
OLD | NEW |