From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87056C8300A for ; Thu, 30 Apr 2020 08:51:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 60BCA20838 for ; Thu, 30 Apr 2020 08:51:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588236669; bh=B25IdFkSF/Xe5nfhCVFQRFDEhKUayIXoiR5sj0+5jMs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=RlIyG6mXl7XTJxuooirBcqZbpdC1raI6ddxCBPbvwqM/pEOx8ylhoEtdKtfLLOLwo kl3T/e5ERfGsn1Y/OnXsmIWh379zQFBb3ehQqgLFIwVrPYHcI1WLp6zTqIVedqSeHE vE0BEqYOxw3A4joqKvqtRlLRBHQtYIv0MClnlujY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726736AbgD3IvI (ORCPT ); Thu, 30 Apr 2020 04:51:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:38732 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726412AbgD3IvI (ORCPT ); Thu, 30 Apr 2020 04:51:08 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0E54920787; Thu, 30 Apr 2020 08:51:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588236667; bh=B25IdFkSF/Xe5nfhCVFQRFDEhKUayIXoiR5sj0+5jMs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CQpj6MdPRT8b93Oyrn50O5QctFKfv7EG0MoIOkqp4mdOlo8hcVYXd65sWdV1zHoQt Os3vgxS45zA62gjVSPdyQVLKG9ePdxlAr9m9/oAGrrJKjpRWBilACWjfAhQ6z+pXO8 4Cnih2x/4oppwN83J/SciohdcrFoxsblbuWuope8= Date: Thu, 30 Apr 2020 10:51:05 +0200 From: Greg Kroah-Hartman To: Frankie Chang Cc: Todd Kjos , Joel Fernandes , Todd Kjos , Martijn Coenen , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Christian Brauner , LKML , linux-mediatek@lists.infradead.org, wsd_upstream , Jian-Min Liu Subject: Re: [PATCH v3 1/1] binder: transaction latency tracking for user build Message-ID: <20200430085105.GF2496467@kroah.com> References: <1586929044-12708-2-git-send-email-Frankie.Chang@mediatek.com> <1588234439-7959-1-git-send-email-Frankie.Chang@mediatek.com> <1588234439-7959-2-git-send-email-Frankie.Chang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1588234439-7959-2-git-send-email-Frankie.Chang@mediatek.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 30, 2020 at 04:13:59PM +0800, Frankie Chang wrote: > Record start/end timestamp for binder transaction. > When transaction is completed or transaction is free, > it would be checked if transaction latency over threshold (2 sec), > if yes, printing related information for tracing. > > /* Implement details */ > - Add tracepoint/trace at free transaction. > Since the original trace_binder_transaction_received cannot > precisely present the real finished time of transaction, adding a > trace_binder_free_transaction at the point of free transaction > may be more close to it. > > - Add latency tracer module to monitor slow transaction. > The trace_binder_free_transaction would not be enabled > by default. Monitoring which transaction is too slow to > cause some of exceptions is important. So we hook the > tracepoint to call the monitor function. > > - Move some struct from core file to header file. > Need some struct defined in core file in latency trace module > In addition, moving all structs to header file makes module > more extendable, and make all these strcuts to be defined > in the same file. Also, this should be split up into a patch series, the first moving things around, and the rest of the patches each adding a single feature. As it is, this patch is almost impossible to review. thanks, greg k-h