On 07/15/16 12:15, Ard Biesheuvel wrote: > On 15 July 2016 at 11:51, Laszlo Ersek <[email protected]> wrote:
>> What I'd be most interested in is >> enabling optimization (saving space) for -b DEBUG -- I don't do source >> level debugging, but I want the debug messages and the ASSERT()s. Saving >> space with those compiled in would be superb -- I guess that's where the >> savings would really shine. >> > > Doing the same build for DEBUG gives me > > -O0 > > SECFV [20%Full] 212992 total, 44464 used, 168528 free > FVMAIN_COMPACT [75%Full] 1753088 total, 1326592 used, 426496 free > DXEFV [67%Full] 10485760 total, 7077696 used, 3408064 free > PEIFV [28%Full] 917504 total, 257200 used, 660304 free > > -O1 > > SECFV [16%Full] 212992 total, 35248 used, 177744 free > FVMAIN_COMPACT [76%Full] 1753088 total, 1339592 used, 413496 free > DXEFV [56%Full] 10485760 total, 5933120 used, 4552640 free > PEIFV [23%Full] 917504 total, 216240 used, 701264 free > > -O2 > > SECFV [17%Full] 212992 total, 36688 used, 176304 free > FVMAIN_COMPACT [83%Full] 1753088 total, 1469904 used, 283184 free > DXEFV [58%Full] 10485760 total, 6157440 used, 4328320 free > PEIFV [24%Full] 917504 total, 227408 used, 690096 free > > which paints roughly the same picture: much smaller binaries, but O2 > is worse than O0/O1 after compression. Thank you for checking this -- in absolute terms, -O1 shaves about 1.1MB off DXEFV. Not bad! > Another thing to take into account is that DXE code size translates > directly into RuntimeServicesCode memory footprint of > DXE_RUNTIME_DRIVER modules, Good point! > although I am not sure if that has ever > been a source of concern. I've never thought of it -- my gut feeling is that the AcpiNVS stuff is larger. (I could easily be biased though: the AcpiNVS allocations are all manual and require thought, while RuntimeServicesCode allocs are all automatic. I might be projecting "mental effort required" to "allocation size" :)) Thanks Laszlo _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

