Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753153AbdLNUVY (ORCPT ); Thu, 14 Dec 2017 15:21:24 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:40620 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752770AbdLNUUy (ORCPT ); Thu, 14 Dec 2017 15:20:54 -0500 Smtp-Origin-Hostprefix: devbig From: Teng Qin Smtp-Origin-Hostname: devbig473.prn1.facebook.com To: CC: , , , , , , , Teng Qin Smtp-Origin-Cluster: prn1c29 Subject: [PATCH tip 0/3] Improvements of scheduler related Tracepoints Date: Thu, 14 Dec 2017 12:20:41 -0800 Message-ID: <20171214202044.1629279-1-qinteng@fb.com> X-Mailer: git-send-email 2.9.5 X-FB-Internal: Safe MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-12-14_12:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1258 Lines: 29 This set of commits attempts to improve three scheduler related Tracepoints: sched_switch, sched_process_fork, sched_process_exit. Firstly, these commit add additional flag values, namely preempt, clone_flags and group_dead to these Tracepoints, to make information exposed via the Tracepoints more useful and complete. Secondly, these commits exposes task_struct pointers in these Tracepoints. The task_struct pointers are arguments of the Tracepoints and currently only used to compute struct field values. But for BPF programs attached to these Tracepoints, we may want to read additional task information via the task_struct pointers. This is currently either impossible, or we have to make assumption of whether the Tracepoint is running from previous / parent or next / child, and use current pointer instead. Exposing the task_struct pointers explicitly makes such use case easier and more reliable. Teng Qin (3): Improve sched_switch Tracepoint Improve sched_process_fork Tracepoint Improve sched_process_exit Tracepoint include/trace/events/sched.h | 54 ++++++++++++++++++++++++++++++++++++-------- kernel/exit.c | 2 +- kernel/fork.c | 2 +- 3 files changed, 46 insertions(+), 12 deletions(-) -- 2.9.5