private static bool NeedSeparateKernelSession(KernelProviderInfo kernelProviderInfo)
        {
            if (kernelProviderInfo == null)
            {
                return(false);
            }

            // CPU counters need the special kernel session
            var keywords = (KernelTraceEventParser.Keywords)kernelProviderInfo.Keywords
                           & (KernelTraceEventParser.Keywords.Profile | KernelTraceEventParser.Keywords.PMCProfile);

            return(keywords != KernelTraceEventParser.Keywords.None);
        }
Example #2
0
        private static bool NeedSeparateKernelSession(KernelProviderInfo kernelProviderInfo)
        {
            if (kernelProviderInfo == null)
            {
                return(false);
            }

            // Prior to Windows 8 (NT 6.2), all kernel events needed the special kernel session.
            if (!IsWindows8OrGreater)
            {
                return(true);
            }

            // CPU counters need the special kernel session
            var keywords = (KernelTraceEventParser.Keywords)kernelProviderInfo.Keywords & KernelTraceEventParser.Keywords.PMCProfile;

            return(keywords != KernelTraceEventParser.Keywords.None);
        }