perftool.get_events: some small cleanups