From owner-freebsd-current@freebsd.org Wed Aug 28 17:28:27 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 630E7E2419 for ; Wed, 28 Aug 2019 17:28:27 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46JXlG1ynfz4T8Z for ; Wed, 28 Aug 2019 17:28:25 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by mail-qk1-x729.google.com with SMTP id m10so489517qkk.1 for ; Wed, 28 Aug 2019 10:28:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=x/NObVyR1XQZoum1OG4SVRSTWDaEwhsyQ1/hwC54Qws=; b=VAI5KYMrxILNCPYcrRrxWc+wmhbDR6ATGPgUjW2/raHVFYaOeihh5u94oeCExPfaGG osUeNTplU7X6IVGLsSGUkELdjMfvgNXs8rXsgvdYM01CliksgKXEaLd0s/XZ2eLfoX2Y N35p2GDrkRlZdpM0sqHVlINmGuWbilffjEl0kkIRpKJ5kcve9zmO1ruhjrlkfJu2wcT6 BSgdbNLXri1RBO4rnUakMfBtWcQ2HOH1lVW01kzqfr3WJ9aJXPn+6Fj+r5tjpgIRIkDq ZAHHRZ0ZEpVcRFSrHhm1RjUip9oCUYfYm4MCWwDaDgShWrUpYv6YV290FgqHW8wQID/t O+Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=x/NObVyR1XQZoum1OG4SVRSTWDaEwhsyQ1/hwC54Qws=; b=H+/kPlQ/HE4mC3blBXvmAqJ69EyMHRfDsjvYZuYOFWRkOpsw//LKLBBaRj/i6UdD2n jQWbkbhw2Wviihh6dcnzNnoTsD5jHT51KFWYtHxoQlfcMgD62RehMOxMSKu43iobUyBE UTBK8+nuwJUYFOoDlMn3F87kEPIxahCsKPzoRsK0Jh85InKoMdEJYo0azExh4Jfnxvd3 ULqWEjSlhSPDyv3AJyNfaXfBvjbtEq1zhbAKNYvUSPxWAtlC3eGRR4nf4K5CnBjfLVT8 IpIuiS1GbhvbsGC3BsZ+7TjwVhjEjvYSz8fogob10zccsUGjVkJvWDFM5sT+99DWoXuj AWew== X-Gm-Message-State: APjAAAV5hiLTghyf52Vi1lKKNV0xe/983BuOhh5ZRYAsQRvw++xauJsf eIkTaRoPTXB04qksu81XtLcA3kpEKKB4HEsxPOZqDM1p X-Google-Smtp-Source: APXvYqxYlWE/MXsUogD0jOKPE4+0noz0pXO2KwZkhSHZp4/Z+A1Oc8aFMDCvFkSLp502yh6MGF2NCuVM6R4NDn29goU= X-Received: by 2002:a05:620a:6cf:: with SMTP id 15mr4914237qky.98.1567013304736; Wed, 28 Aug 2019 10:28:24 -0700 (PDT) MIME-Version: 1.0 From: Ryan Stone Date: Wed, 28 Aug 2019 13:28:13 -0400 Message-ID: Subject: hwpmc: events don't seem to distinguish kernel and userland callchains anymore To: FreeBSD Current Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 46JXlG1ynfz4T8Z X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=VAI5KYMr; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rysto32@gmail.com designates 2607:f8b0:4864:20::729 as permitted sender) smtp.mailfrom=rysto32@gmail.com X-Spamd-Result: default: False [-4.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(0.00)[ip: (-9.31), ipnet: 2607:f8b0::/32(-2.85), asn: 15169(-2.32), country: US(-0.05)]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[9.2.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-1.00)[-0.998,0]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2019 17:28:27 -0000 Historically when processing callchain events from hwpmc, you could use PMC_CALLCHAIN_CPUFLAGS_TO_USERMODE(ev..pl_u.pl_cc.pl_cpuflags) to distinguish callchains that were captured in user mode from those captured in kernel mode. However, on 12.0-RELEASE and a month-old head, I have noticed that this macro never returns true anymore. Is there any way to make this distinction now, beyond an architecture-specific hack based off of the sample address?