From owner-svn-src-all@freebsd.org Thu May 17 02:19:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9EF1EE9B48; Thu, 17 May 2018 02:19:46 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E6128B6B8; Thu, 17 May 2018 02:19:46 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: by mail-wm0-f47.google.com with SMTP id a8-v6so5621763wmg.5; Wed, 16 May 2018 19:19:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=EPy8OOrUt9H0/cuB7eX6tFgA4jDFBWphkdi6s8tjts0=; b=QTNpBZTF5rurom1UZq7Nbt7cgXCs9yZr7A/TKWPPsFR0XEJKgLCbE7ITPB+rTztaK5 0g9bVN+gEBkZftBY/EgdOHJmEBnl8tgz9SZsSDysOWt1Cnb7EBMJ0Laghvr4b+4scBWN smFrKgxQSZiyKx7KP5Tj1l1RqWggQuAYHee97DhJjMjVPDbzjNo4BKYLuQ8x94wzOxzi b8rYt8CzO0BEjLcIUzPpnaYsvisME9G6Xpza6cwkcyAg3H/m1th0vexceGgZVeHyuq4z sUHpIsaqsod5GQNafJd2nY9HjLE7fzaG7LcpP2Ex+QK4I3//UvGtHNRPZ94zFnTXGD81 gDTA== X-Gm-Message-State: ALKqPwfUdbOJEoBlw5zUZOPBkpMnQvCkAbwnJzNZ8spGTmg5BqkatkH1 yXvNoK3zz2kqBOYhXqEcbfwL8oXt X-Google-Smtp-Source: AB8JxZoiZrGrrdA7t+Xn4jCJCmcbvyvEkIgVq27jsUNMzIW26Oj25iNr3XdPf8QJqyRuWvzz/XqC1Q== X-Received: by 2002:a50:b266:: with SMTP id o93-v6mr4408242edd.47.1526523584936; Wed, 16 May 2018 19:19:44 -0700 (PDT) Received: from mail-wr0-f170.google.com (mail-wr0-f170.google.com. [209.85.128.170]) by smtp.gmail.com with ESMTPSA id q6-v6sm1894630edh.9.2018.05.16.19.19.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 May 2018 19:19:44 -0700 (PDT) Received: by mail-wr0-f170.google.com with SMTP id t16-v6so777285wrm.9; Wed, 16 May 2018 19:19:44 -0700 (PDT) X-Received: by 2002:adf:b583:: with SMTP id c3-v6mr2693480wre.228.1526523584361; Wed, 16 May 2018 19:19:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.197.74 with HTTP; Wed, 16 May 2018 19:19:43 -0700 (PDT) In-Reply-To: <201805162229.w4GMTKJj070790@repo.freebsd.org> References: <201805162229.w4GMTKJj070790@repo.freebsd.org> From: "Jonathan T. Looney" Date: Wed, 16 May 2018 22:19:43 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333690 - in head/sys: dev/hwpmc kern sys To: Matt Macy Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2018 02:19:47 -0000 On Wed, May 16, 2018 at 6:29 PM, Matt Macy wrote: > > Author: mmacy > Date: Wed May 16 22:29:20 2018 > New Revision: 333690 > URL: https://svnweb.freebsd.org/changeset/base/333690 > > Log: > hwpmc: Implement per-thread counters for PMC sampling > > This implements per-thread counters for PMC sampling. The thread > descriptors are stored in a list attached to the process descriptor. > These thread descriptors can store any per-thread information necessary > for current or future features. For the moment, they just store the counters > for sampling. > > The thread descriptors are created when the process descriptor is created. > Additionally, thread descriptors are created or freed when threads > are started or stopped. Because the thread exit function is called in a > critical section, we can't directly free the thread descriptors. Hence, > they are freed to a cache, which is also used as a source of allocations > when needed for new threads. > > Approved by: sbruno > Obtained from: jtl > Sponsored by: Juniper Networks, Limelight Networks > Differential Revision: https://reviews.freebsd.org/D15335 Thanks! Jonathan