Gastroliths are the dinosaur equivalent of gizzard stones in birds. Some birds (e.g., chickens) & some modern reptiles (e.g., crocodilians) swallow pebbles and retain them in their gizzards. The stones help to grind down food as it passes through the upper digestive tract. The rocks themselves get polished in the process. Some dinosaur skeletons have been found with concentrations of highly polished, somewhat size-sorted rocks associated with the rib cage area. These have been reasonably identified as dinosaur gizzard stones (gastroliths; a.k.a. gastric stones). Gastroliths have only been reported to be associated with the remains of sauropods, some early ceratopsians, and some ankylosaurs.
Dinosaur gastrolith (6.1 cm across) attributed to the Morrison Formation (Upper Jurassic) of western USA.