lkml.org 
[lkml]   [2012]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tip:perf/uprobes] uprobes/core: Clean up, refactor and improve the code
> 
> - remove unnecessary volatile

volatiles were added because of warnings thrown by gcc-4.6. Please see
below.

>
> - restructure comment blocks to make them more uniform and
> more readable in general
>

...

> diff --git a/arch/Kconfig b/arch/Kconfig
> index 284f589..cca5b54 100644
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -66,13 +66,19 @@ config OPTPROBES
> depends on !PREEMPT
>
> config UPROBES
> - bool "User-space probes (EXPERIMENTAL)"
> + bool "Transparent user-space probes (EXPERIMENTAL)"
> depends on ARCH_SUPPORTS_UPROBES
> default n
> help
> - Uprobes enables kernel subsystems to establish probepoints
> - in user applications and execute handler functions when
> - the probepoints are hit.
> + Uprobes is the user-space counterpart to kprobes: they
> + enable instrumentation applications (such as 'perf probe')
> + to establish unintrusive probes in user-space binaries and
> + libraries, by executing handler functions when the probes
> + are hit by user-space applications.
> +
> + ( These probes come in the form of single-byte breakpoints,

One nit: In some architectures like powerpc, the breakpoints arent
single-byte.

> + managed by the kernel and kept transparent to the probed
> + application. )
>
> If in doubt, say "N".
>
>
> #ifdef CONFIG_X86_64
> -static volatile u32 good_insns_64[256 / 32] = {
> +static u32 good_insns_64[256 / 32] = {

The volatiles were added to arch/x86/kernel/kprobes.c because of commit
7115e3fcf45 and 315eb8a2a1b. The volatiles are required because gcc 4.6
gave a warning about the asm operand for test_bit. So the same were
added to arch/x86/kernel/uprobes.c.

--
Thanks and Regards
Srikar



\
 
 \ /
  Last update: 2012-02-20 07:25    [W:0.063 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site