[proflog] Add counters sampling on profiler shutdown and startup