sim,misc: Move protobuf housekeeping out of gem5Main.

Put that code into a singleton class in src/proto, so that it gets
called during initialization and teardown of gem5 without cluttering up
gem5Main. This also removes the need to use #ifdefs to guard for
actualling having protobuf support.

Change-Id: I93b5d994eee478a9c159a3f3d02b3e996af02a3e
Maintainer: Gabe Black <>
Reviewed-by: Andreas Sandberg <>
Tested-by: kokoro <>
3 files changed