lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8bd0f97a0906140251t94d8c3fn28db16032fad408a@mail.gmail.com>
Date:	Sun, 14 Jun 2009 05:51:06 -0400
From:	Mike Frysinger <vapier.adi@...il.com>
To:	Paul Mundt <lethal@...ux-sh.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>, Ingo Molnar <mingo@...e.hu>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf_counters: start documenting HAVE_PERF_COUNTERS 
	requirements

On Sun, Jun 14, 2009 at 05:41, Paul Mundt wrote:
> On Fri, Jun 12, 2009 at 01:27:12PM -0400, Mike Frysinger wrote:
>> diff --git a/tools/perf/design.txt b/tools/perf/design.txt
>> index 860e116..f71e0d2 100644
>> --- a/tools/perf/design.txt
>> +++ b/tools/perf/design.txt
>> @@ -440,3 +440,18 @@ by this process or by another, and doesn't affect any counters that
>>  this process has created on other processes.  It only enables or
>>  disables the group leaders, not any other members in the groups.
>>
>> +
>> +Arch requirements
>> +-----------------
>> +
>> +If your architecture does not have hardware performance metrics, you can
>> +still use the generic software counters based on hrtimers for sampling.
>> +
>> +So to start with, in order to add HAVE_PERF_COUNTERS to your Kconfig, you
>> +will need at least this:
>> +     - asm/perf_counter.h - a basic stub will suffice at first
>> +     - support for atomic64 types (and associated helper functions)
>> +     - set_perf_counter_pending() implemented
>> +
>> +If your architecture does have hardware capabilities, you can override the
>> +weak stub hw_perf_counter_init() to register hardware counters.
>
> It would be nice to see this in arch/Kconfig instead, as that tends to
> provide a centralized checklist for new features, especially when they
> are non-trivial. At least I found the arch/Kconfig bits very helpful for
> things like tracehook support, without having to grovel around
> Documentation for verbose design documents that I otherwise couldn't care
> less about.

i wouldnt mind moving all of the hidden HAVE_XXX stubs moved to
arch/Kconfig, but documentation doesnt really belong there.
especially in the case of ftrace where the document specifically for
arch porters is pages long (233 lines atm and it doesnt even cover the
really hard stuff).  the Kconfig help tip pointing to the right
document should be fine though of course.
config HAVE_XXXX
    bool
    help
      See some/place/where/the/arch/info/is/at/foo.txt

then there is no need to wade through irrelevant crap -- the Kconfig
pointed you to the right place
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ