From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751272AbcFCBLa (ORCPT ); Thu, 2 Jun 2016 21:11:30 -0400 Received: from mail-pf0-f169.google.com ([209.85.192.169]:33771 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751202AbcFCBL0 (ORCPT ); Thu, 2 Jun 2016 21:11:26 -0400 From: Omar Sandoval X-Google-Original-From: Omar Sandoval To: Steven Rostedt , Ingo Molnar , Masami Hiramatsu , Namhyung Kim Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, Omar Sandoval Subject: [PATCH v2 1/3] tracing: document "string_size" [ku]probe type Date: Thu, 2 Jun 2016 18:11:01 -0700 Message-Id: X-Mailer: git-send-email 2.8.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Omar Sandoval It has been undocumented since it was introduced in commit e09c8614b329 ("tracing/kprobes: Support "string" type"). Signed-off-by: Omar Sandoval --- Documentation/trace/kprobetrace.txt | 11 ++++++----- Documentation/trace/uprobetracer.txt | 9 +++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Documentation/trace/kprobetrace.txt b/Documentation/trace/kprobetrace.txt index d68ea5fc812b..4b3f5293b7bf 100644 --- a/Documentation/trace/kprobetrace.txt +++ b/Documentation/trace/kprobetrace.txt @@ -43,8 +43,8 @@ Synopsis of kprobe_events +|-offs(FETCHARG) : Fetch memory at FETCHARG +|- offs address.(**) NAME=FETCHARG : Set NAME as the argument name of FETCHARG. FETCHARG:TYPE : Set TYPE as the type of FETCHARG. Currently, basic types - (u8/u16/u32/u64/s8/s16/s32/s64), "string" and bitfield - are supported. + (u8/u16/u32/u64/s8/s16/s32/s64), "string", "string_size", and + bitfield are supported. (*) only for return probe. (**) this is useful for fetching a field of data structures. @@ -54,9 +54,10 @@ Types Several types are supported for fetch-args. Kprobe tracer will access memory by given type. Prefix 's' and 'u' means those types are signed and unsigned respectively. Traced arguments are shown in decimal (signed) or hex (unsigned). -String type is a special type, which fetches a "null-terminated" string from -kernel space. This means it will fail and store NULL if the string container -has been paged out. +"string" is a special type which fetches a null-terminated string from kernel +space. This means it will fail and store NULL if the string container has been +paged out. "string_size" is the length of a null-terminated string including +the NUL byte. Bitfield is another special type, which takes 3 parameters, bit-width, bit- offset, and container-size (usually 32). The syntax is; diff --git a/Documentation/trace/uprobetracer.txt b/Documentation/trace/uprobetracer.txt index f1cf9a34ad9d..7e0480263c2f 100644 --- a/Documentation/trace/uprobetracer.txt +++ b/Documentation/trace/uprobetracer.txt @@ -39,8 +39,8 @@ Synopsis of uprobe_tracer +|-offs(FETCHARG) : Fetch memory at FETCHARG +|- offs address.(**) NAME=FETCHARG : Set NAME as the argument name of FETCHARG. FETCHARG:TYPE : Set TYPE as the type of FETCHARG. Currently, basic types - (u8/u16/u32/u64/s8/s16/s32/s64), "string" and bitfield - are supported. + (u8/u16/u32/u64/s8/s16/s32/s64), "string", + "string_size", and bitfield are supported. (*) only for return probe. (**) this is useful for fetching a field of data structures. @@ -50,8 +50,9 @@ Types Several types are supported for fetch-args. Uprobe tracer will access memory by given type. Prefix 's' and 'u' means those types are signed and unsigned respectively. Traced arguments are shown in decimal (signed) or hex (unsigned). -String type is a special type, which fetches a "null-terminated" string from -user space. +"string" is a special type which fetches a null-terminated string from user +space. "string_size" is the length of a null-terminated string including the +NUL byte. Bitfield is another special type, which takes 3 parameters, bit-width, bit- offset, and container-size (usually 32). The syntax is; -- 2.8.3