Backport Update checksizes.sh for the two previous commits.

(cherry picked from commit 20511d2a94c61265c926b51bb3e5ac8cfd5fef9f)