Well actually that totally depends.
China Airlines out of San Francisco to Taipei made every single "cattle" passenger, yes hundreds of us, place our carry on junk in a box to measure volume and it was weighed at the gate
But they didn't know that until you got to the airport...correct? It's a pass vs fail methodology based on policy. If everybody is way under limit both weight wise and dimension wise its much different than everyone being just at the limit. They're not looking at what the overheads can hold capacity wise for the entire plane....they are just making sure it fits.