CoEx: Multi-Grained Level Application Profiler