Commit graph

3020 commits

Author SHA1 Message Date
LaMont Jones
83b2794179 Wrap singleton ninjaString Eval calls am: 7c2ebdef75 am: fa016e5910 am: adc079478c
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2654105

Change-Id: Iad71e5d008fcb4cb975af8a27d88c3e72e320208
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-12 18:27:08 +00:00
LaMont Jones
adc079478c Wrap singleton ninjaString Eval calls am: 7c2ebdef75 am: fa016e5910
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2654105

Change-Id: I14994b03e59a038748dc08b1edc37145bb1831f2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-12 17:42:21 +00:00
LaMont Jones
fa016e5910 Wrap singleton ninjaString Eval calls am: 7c2ebdef75
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2654105

Change-Id: I1b40f1aa57d06cee6cacabc1779a7449789986fd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-12 16:57:01 +00:00
LaMont Jones
7c2ebdef75 Wrap singleton ninjaString Eval calls
This avoids a concurrent map read and write error in parallel
singletons.

Bug: 290795374
Test: manual, treehugger
Change-Id: I7f89909a98c4f530da92a3d2cc01ca8eaeddbfa0
2023-07-11 19:58:01 +00:00
Spandan Das
11193662d0 Merge "Add a testdata property in goPackage and goBinary" am: 5d3bfd147b am: d1044697df am: c909cd036d am: 36511fc852 am: 8e917b6912 am: c6e97e097e
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2636751

Change-Id: I50dc811095d1d5af6a65c6867cd448a3a250f8ae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-28 21:16:15 +00:00
Spandan Das
c6e97e097e Merge "Add a testdata property in goPackage and goBinary" am: 5d3bfd147b am: d1044697df am: c909cd036d am: 36511fc852 am: 8e917b6912
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2636751

Change-Id: Ic3564918364d5e9e14e7c9d38eacae85cb9b50f7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-28 20:29:13 +00:00
Spandan Das
8e917b6912 Merge "Add a testdata property in goPackage and goBinary" am: 5d3bfd147b am: d1044697df am: c909cd036d am: 36511fc852
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2636751

Change-Id: Ic50a787b3a44558c06ce6af92b3def31031b4387
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-28 19:47:11 +00:00
Spandan Das
36511fc852 Merge "Add a testdata property in goPackage and goBinary" am: 5d3bfd147b am: d1044697df am: c909cd036d
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2636751

Change-Id: I742ab3a1887991dad270866a68bcd79b495324a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-28 18:39:17 +00:00
Spandan Das
c909cd036d Merge "Add a testdata property in goPackage and goBinary" am: 5d3bfd147b am: d1044697df
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2636751

Change-Id: I49054cda40e8b56f33d33554cc51c2d19a46086d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-28 17:10:28 +00:00
Spandan Das
d1044697df Merge "Add a testdata property in goPackage and goBinary" am: 5d3bfd147b
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2636751

Change-Id: Iaf37d6be7b15a3aca23df54452adc3de8f5c1463
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-28 16:33:46 +00:00
Spandan Das
5d3bfd147b Merge "Add a testdata property in goPackage and goBinary" 2023-06-28 15:49:27 +00:00
Treehugger Robot
4a39c57042 Merge "Plumb module tags through to ninja." am: 797fe25cb2 am: 27186d0a91 am: b50e951349 am: 544470742f am: 36d91b3075 am: e19600c8df
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2631633

Change-Id: If528c9da809535ac7ef5a49d7a1709ec7e69f76d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-24 00:07:33 +00:00
Treehugger Robot
e19600c8df Merge "Plumb module tags through to ninja." am: 797fe25cb2 am: 27186d0a91 am: b50e951349 am: 544470742f am: 36d91b3075
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2631633

Change-Id: I4e04b9f77377e53d6458be9b086ec3263d353d98
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-23 23:19:28 +00:00
Treehugger Robot
36d91b3075 Merge "Plumb module tags through to ninja." am: 797fe25cb2 am: 27186d0a91 am: b50e951349 am: 544470742f
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2631633

Change-Id: I97de6f75ba98b90f528fd8252b6694b008dab7b0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-23 22:29:45 +00:00
Treehugger Robot
544470742f Merge "Plumb module tags through to ninja." am: 797fe25cb2 am: 27186d0a91 am: b50e951349
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2631633

Change-Id: I33994b667017f4dae6e9b412c0c19d49a75c64f4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-23 21:40:47 +00:00
Treehugger Robot
b50e951349 Merge "Plumb module tags through to ninja." am: 797fe25cb2 am: 27186d0a91
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2631633

Change-Id: Id573dcebe69f956633e67b88116ce60a970e3a5e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-23 20:05:29 +00:00
Treehugger Robot
27186d0a91 Merge "Plumb module tags through to ninja." am: 797fe25cb2
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2631633

Change-Id: Id4acacee7905d4fa469bd2467ef1b09e1a8ccd99
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-23 19:21:56 +00:00
Treehugger Robot
797fe25cb2 Merge "Plumb module tags through to ninja." 2023-06-23 18:08:07 +00:00
Spandan Das
7eef6d03cb Export goPackage and goBinary from bootstrap package am: 4e84d6b010 am: a6e512f08c am: 5e73937ab4 am: 901375c51b am: 2e467c438f am: 4ebfaa94cd
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2627057

Change-Id: I7cd8ad5bcf99d34737db96e6b40daec58da192a5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-23 12:31:02 +00:00
Spandan Das
4ebfaa94cd Export goPackage and goBinary from bootstrap package am: 4e84d6b010 am: a6e512f08c am: 5e73937ab4 am: 901375c51b am: 2e467c438f
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2627057

Change-Id: Ib00b802afbbea03e9c25bb2c804f8b67ce3a6762
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-23 11:40:04 +00:00
Spandan Das
2e467c438f Export goPackage and goBinary from bootstrap package am: 4e84d6b010 am: a6e512f08c am: 5e73937ab4 am: 901375c51b
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2627057

Change-Id: Ie38e0878c09752e68bcc61e1f6b1e0e2ee616c60
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-23 10:36:50 +00:00
Spandan Das
901375c51b Export goPackage and goBinary from bootstrap package am: 4e84d6b010 am: a6e512f08c am: 5e73937ab4
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2627057

Change-Id: I014cbfbcf9ae7019bd78ab8b58b027f7fd848d6f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-23 09:47:41 +00:00
Spandan Das
5e73937ab4 Export goPackage and goBinary from bootstrap package am: 4e84d6b010 am: a6e512f08c
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2627057

Change-Id: Ic4aa7e62f8d0b7480c8e99d3d9401272a7031767
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-23 09:01:53 +00:00
Spandan Das
a6e512f08c Export goPackage and goBinary from bootstrap package am: 4e84d6b010
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2627057

Change-Id: I4c2c3f62d5c7994cc2d8746b74dbcc12354675fd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-23 08:17:56 +00:00
Spandan Das
6a3475adf5 Add a testdata property in goPackage and goBinary
Some go tests depend on testData, but do not declare it explicitly. In
preparation for the stricter sandboxing constratints imposed by Bazel,
introduce this property.

This will be a no-op in Soong for now. But bp2build will convert it into
`data` property of go_test

Test: go build ./blueprint/bootstrap
Bug: 288491147
Change-Id: I0e1e7941db1efe6f1488936d9bae7e8d295b88ba
2023-06-23 00:15:44 +00:00
Spandan Das
4e84d6b010 Export goPackage and goBinary from bootstrap package
These two module types will be special-cased in bp2build. To enable this
special-casing, export from the package alongwith getter methods to
access its properties.

Test: go build ./bootstrap

Change-Id: I9ef7ac4b6331fec99713296f8f78f614f3536847
2023-06-22 23:50:02 +00:00
Dan Albert
629a6a3bc3 Plumb module tags through to ninja.
Bug: http://b/259130368
Test: built android, saw tags set in perfetto trace
Change-Id: I09618114832b143a10a2f84baccfaf3aa0fd5bd8
2023-06-22 17:15:33 +00:00
Treehugger Robot
cc41fab444 Merge "Helper function to register go module types in tests" am: f99595ba0d am: 74652490f3 am: 8dc45fc0e9 am: 3f24bff0b4 am: d33e896bee am: b88824f24c
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2627056

Change-Id: Idfa1bd1420a8276bd8f932c93cfbc909558f0a2f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-22 00:58:01 +00:00
Treehugger Robot
b88824f24c Merge "Helper function to register go module types in tests" am: f99595ba0d am: 74652490f3 am: 8dc45fc0e9 am: 3f24bff0b4 am: d33e896bee
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2627056

Change-Id: Ie33fa6f9b3ece8af62c8e4176283eaaf70ecfcc9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-22 00:14:47 +00:00
Treehugger Robot
d33e896bee Merge "Helper function to register go module types in tests" am: f99595ba0d am: 74652490f3 am: 8dc45fc0e9 am: 3f24bff0b4
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2627056

Change-Id: Idc5aa320231927ac8ec3d10905579938260f57fc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 23:29:42 +00:00
Treehugger Robot
3f24bff0b4 Merge "Helper function to register go module types in tests" am: f99595ba0d am: 74652490f3 am: 8dc45fc0e9
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2627056

Change-Id: Ia1adf67a8c85303f1c3f3ea9d6c1565041eaa1a5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 22:22:10 +00:00
Treehugger Robot
8dc45fc0e9 Merge "Helper function to register go module types in tests" am: f99595ba0d am: 74652490f3
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2627056

Change-Id: I185a3d853bdd2748b240b98408d3439c8fb6e857
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 21:38:31 +00:00
Treehugger Robot
74652490f3 Merge "Helper function to register go module types in tests" am: f99595ba0d
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2627056

Change-Id: I8d0b96415969a9e9c27498fe7dfc94ab433a0c95
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 20:55:40 +00:00
Treehugger Robot
f99595ba0d Merge "Helper function to register go module types in tests" 2023-06-21 20:07:28 +00:00
Lukacs T. Berki
3500dc0e9e Make RunBlueprint() return an error, if need be. am: 2cd5fe6206 am: b554384964 am: c3d04341f8 am: 82e8ae635e am: 6c3ac827e5 am: 9e65d90dde
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2628106

Change-Id: I544351e6a41ab868c3866ecd9b3f130bb6593845
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 15:16:49 +00:00
Lukacs T. Berki
9e65d90dde Make RunBlueprint() return an error, if need be. am: 2cd5fe6206 am: b554384964 am: c3d04341f8 am: 82e8ae635e am: 6c3ac827e5
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2628106

Change-Id: I13fa1b2141954c3b19487efe6ba0160155d70b02
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 14:31:20 +00:00
Lukacs T. Berki
6c3ac827e5 Make RunBlueprint() return an error, if need be. am: 2cd5fe6206 am: b554384964 am: c3d04341f8 am: 82e8ae635e
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2628106

Change-Id: I7cdf7e068b9143785cc8270c1d19ca5be61767c0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 13:54:21 +00:00
Lukacs T. Berki
82e8ae635e Make RunBlueprint() return an error, if need be. am: 2cd5fe6206 am: b554384964 am: c3d04341f8
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2628106

Change-Id: I8d93194a0ce9e62b3e351433fb2fd22b78de668f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 13:11:23 +00:00
Lukacs T. Berki
c3d04341f8 Make RunBlueprint() return an error, if need be. am: 2cd5fe6206 am: b554384964
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2628106

Change-Id: I668b63b72983b1de7b610345df07215cfc47b731
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 12:25:14 +00:00
Lukacs T. Berki
b554384964 Make RunBlueprint() return an error, if need be. am: 2cd5fe6206
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2628106

Change-Id: Iaf197a77d9bd6b7cec3a9c597e4e3f275436b643
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 11:48:17 +00:00
Lukacs T. Berki
2cd5fe6206 Make RunBlueprint() return an error, if need be.
This is so that it doesn't need to abruptly call os.Exit(), denying
callers the opportunity to do cleanups.

Bug: 244730498
Test: Presubmits.
Change-Id: Ifd191d3bbbf2fdea2ca49e4fb552e5d1c557b80f
2023-06-20 09:44:50 +00:00
Colin Cross
d25be661e6 Optimize memory usage of ninjaString am: 6126fe8067 am: bf2fad52f5 am: 4f7e7ecdf8 am: ad37cb38f2 am: 0e8d94d4e5 am: 9321533499
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2628470

Change-Id: I6e2a783600f34d701d486d568b5c7fbbd87c1446
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 20:17:28 +00:00
Colin Cross
9321533499 Optimize memory usage of ninjaString am: 6126fe8067 am: bf2fad52f5 am: 4f7e7ecdf8 am: ad37cb38f2 am: 0e8d94d4e5
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2628470

Change-Id: Ic62d9d22f68ee6e79b3d238046acc37d39a74a62
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 19:31:46 +00:00
Colin Cross
0e8d94d4e5 Optimize memory usage of ninjaString am: 6126fe8067 am: bf2fad52f5 am: 4f7e7ecdf8 am: ad37cb38f2
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2628470

Change-Id: I719d6e162f9cdffa3d2343c10e4dcf5ad0c293dd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 18:47:42 +00:00
Colin Cross
ad37cb38f2 Optimize memory usage of ninjaString am: 6126fe8067 am: bf2fad52f5 am: 4f7e7ecdf8
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2628470

Change-Id: Ie235a5c13037754065f16a93bed77943d73d7491
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 18:02:27 +00:00
Colin Cross
4f7e7ecdf8 Optimize memory usage of ninjaString am: 6126fe8067 am: bf2fad52f5
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2628470

Change-Id: Id80bcc139ece811a14cccb7f7e2c5d391813e296
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 17:15:11 +00:00
Colin Cross
bf2fad52f5 Optimize memory usage of ninjaString am: 6126fe8067
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2628470

Change-Id: I1203d233b9c4e84a174b531b95620969f97ae9a9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 16:31:40 +00:00
Colin Cross
6126fe8067 Optimize memory usage of ninjaString
ninjaString is an interface, which uses 16 bytes of memory on top
of the size of the concrete type.  A literalNinjaString is a string,
which is another 16 bytes for the string header for a total of 32
bytes.  A varNinjaString is two slices, which are 24 bytes each
for the slice headers, for a total of 64 bytes.  The slices contain
the first constant string, and then altenrating variable and string
parts of the ninjaString, resulting in 16 bytes plus 32 bytes per
variable.

This patch replaces the ninjaString interface with a *ninjaString
concrete struct type.  The ninjaString struct is a string and a
pointer to a slice of variable references, for a total of 24 bytes.

ninjaStrings with no variable references (the equivalent of the old
literalNinjaString) have a nil slice, and now use 24 bytes instead
of 32 bytes.

ninjaStrings with variable references allocate a slice of variable
references that contain 32-bit start and end offsets and a Variable
interface, but reuse the original string and so avoid the extra
string headers, resulting in 24 bytes for the slice header, and
24 bytes per variable.

These savings reduce the peak memory usage averaged across 10 runs of
/bin/time -v build/soong/soong_ui.bash --make-mode nothing
on the internal master branch cf_x86_64_phone-userdebug build
from 50114842kB to 45577638kB, a savings of 4537204kB or 9%.

The new Benchmark_parseNinjaString shows savings in both time and
memory.  Before:
Benchmark_parseNinjaString/constant/1-128       	594251787	         2.006 ns/op	       0 B/op	       0 allocs/op
Benchmark_parseNinjaString/constant/10-128      	21191347	        65.57 ns/op	      16 B/op	       1 allocs/op
Benchmark_parseNinjaString/constant/100-128     	 9983748	       130.2 ns/op	     112 B/op	       1 allocs/op
Benchmark_parseNinjaString/constant/1000-128    	 2632527	       445.1 ns/op	    1024 B/op	       1 allocs/op
Benchmark_parseNinjaString/variable/1-128       	 2964896	       419.4 ns/op	     176 B/op	       4 allocs/op
Benchmark_parseNinjaString/variable/10-128      	 1807341	       670.6 ns/op	     192 B/op	       7 allocs/op
Benchmark_parseNinjaString/variable/100-128     	 1000000	      1092 ns/op	     352 B/op	       7 allocs/op
Benchmark_parseNinjaString/variable/1000-128    	  300649	      3773 ns/op	    1584 B/op	       7 allocs/op
Benchmark_parseNinjaString/variables/1-128      	 2858432	       441.6 ns/op	     176 B/op	       4 allocs/op
Benchmark_parseNinjaString/variables/2-128      	 2360505	       513.4 ns/op	     208 B/op	       4 allocs/op
Benchmark_parseNinjaString/variables/3-128      	 1867136	       635.6 ns/op	     240 B/op	       4 allocs/op
Benchmark_parseNinjaString/variables/4-128      	 1584045	       752.1 ns/op	     272 B/op	       4 allocs/op
Benchmark_parseNinjaString/variables/5-128      	 1338189	       885.8 ns/op	     304 B/op	       4 allocs/op
Benchmark_parseNinjaString/variables/10-128     	 1000000	      1468 ns/op	     464 B/op	       4 allocs/op
Benchmark_parseNinjaString/variables/100-128    	   88768	     12895 ns/op	    3712 B/op	       4 allocs/op
Benchmark_parseNinjaString/variables/1000-128   	    8972	    133627 ns/op	   32896 B/op	       4 allocs/op

After:
Benchmark_parseNinjaString/constant/1-128       	584600864	         2.004 ns/op	       0 B/op	       0 allocs/op
Benchmark_parseNinjaString/constant/10-128      	19274581	        64.84 ns/op	      16 B/op	       1 allocs/op
Benchmark_parseNinjaString/constant/100-128     	 9017640	       127.6 ns/op	     112 B/op	       1 allocs/op
Benchmark_parseNinjaString/constant/1000-128    	 2630797	       453.0 ns/op	    1024 B/op	       1 allocs/op
Benchmark_parseNinjaString/variable/1-128       	 3460422	       347.0 ns/op	     136 B/op	       4 allocs/op
Benchmark_parseNinjaString/variable/10-128      	 2103404	       519.9 ns/op	     152 B/op	       7 allocs/op
Benchmark_parseNinjaString/variable/100-128     	 1315778	       906.5 ns/op	     312 B/op	       7 allocs/op
Benchmark_parseNinjaString/variable/1000-128    	  354812	      3284 ns/op	    1544 B/op	       7 allocs/op
Benchmark_parseNinjaString/variables/1-128      	 3386868	       361.5 ns/op	     136 B/op	       4 allocs/op
Benchmark_parseNinjaString/variables/2-128      	 2675594	       456.9 ns/op	     160 B/op	       4 allocs/op
Benchmark_parseNinjaString/variables/3-128      	 2344670	       520.0 ns/op	     192 B/op	       4 allocs/op
Benchmark_parseNinjaString/variables/4-128      	 1919482	       648.1 ns/op	     208 B/op	       4 allocs/op
Benchmark_parseNinjaString/variables/5-128      	 1560556	       723.9 ns/op	     240 B/op	       4 allocs/op
Benchmark_parseNinjaString/variables/10-128     	 1000000	      1169 ns/op	     352 B/op	       4 allocs/op
Benchmark_parseNinjaString/variables/100-128    	  116738	     10168 ns/op	    2800 B/op	       4 allocs/op
Benchmark_parseNinjaString/variables/1000-128   	   10000	    105646 ns/op	   24688 B/op	       4 allocs/op

Bug: 286423944
Test: ninja_strings_test.go
Test: out/soong/build*.ninja is the same before and after this change
Change-Id: I1ecffbaccb0d0469a41fa31255c1b17311e01687
2023-06-15 21:53:56 -07:00
Spandan Das
c5db2df213 Helper function to register go module types in tests
These two module types will be special-cased in bp2build generation
logic in build/soong. To write bp2build tests, create a helper function
to register these two module types

Test: go build ./bootstrap
Change-Id: If6abd8c8911a525bf6841b199d8ce204941d7bcb
2023-06-14 17:44:07 +00:00
Chris Parsons
14e8804203 Make skip-cloning blueprint option public am: 1b5e9aba43 am: e5c8b9ae6f am: 3ed7ebd759 am: e79cb5165a am: e11d7e6285 am: 334deb73f8
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2623170

Change-Id: I3c838a578212df28e28fb713bf2873243f975673
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 06:46:18 +00:00