[{"id":2745,"web_url":"https://patchwork.libcamera.org/comment/2745/","msgid":"<20191003181446.GA4737@pendragon.ideasonboard.com>","date":"2019-10-03T18:14:46","subject":"Re: [libcamera-devel] [PATCH 3/5] ipa: ipa_manager: Print the\n\tloaded IPA modules path","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch.\n\nOn Thu, Oct 03, 2019 at 05:20:35PM +0200, Jacopo Mondi wrote:\n> Add debug message to report which IPA modules have been loaded and in\n> which order.\n> \n> The loading order is particularly relevant for the test VIMC IPA, as the\n> same IPA is compiled with an open source license tag and a proprietary\n> one and they both match() against the VIMC pipeline handler. Being\n> informed about their loading order is helpful to understand which one of\n> the two is actually in use.\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/libcamera/ipa_manager.cpp | 7 +++++--\n>  1 file changed, 5 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\n> index 708233e8a9c7..e990bdcdf84b 100644\n> --- a/src/libcamera/ipa_manager.cpp\n> +++ b/src/libcamera/ipa_manager.cpp\n> @@ -120,13 +120,16 @@ int IPAManager::addDir(const char *libDir)\n>  \t\tif (strcmp(&ent->d_name[offset], \".so\"))\n>  \t\t\tcontinue;\n>  \n> -\t\tIPAModule *ipaModule = new IPAModule(std::string(libDir) +\n> -\t\t\t\t\t\t     \"/\" + ent->d_name);\n> +\t\tstd::string modulePath = std::string(libDir) + \"/\" +\n> +\t\t\t\t\t ent->d_name;\n> +\t\tIPAModule *ipaModule = new IPAModule(modulePath);\n>  \t\tif (!ipaModule->isValid()) {\n>  \t\t\tdelete ipaModule;\n>  \t\t\tcontinue;\n>  \t\t}\n>  \n> +\t\tLOG(IPAManager, Debug) << \"Loaded IPA module: \" << modulePath;\n\nI'd write\n\n\t\tLOG(IPAManager, Debug)\n\t\t\t<< \"Loaded IPA module '\" << modulePath << \"'\";\n\nThe rationale is that strings that could contain spaces or can be empty\n(the former case only here) should be quoted. No need for a colon\neither, the module path name is the continuation of the sentence (you\nwouldn't write \"I'll have dinner in a: restaurant\" :-)).\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> +\n>  \t\tmodules_.push_back(ipaModule);\n>  \t\tcount++;\n>  \t}","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8CB3B60BE9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  3 Oct 2019 20:15:00 +0200 (CEST)","from pendragon.ideasonboard.com (unknown [132.205.230.12])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E97AE2E5;\n\tThu,  3 Oct 2019 20:14:59 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1570126500;\n\tbh=YOdWpjvum8w8h80V2AqifrHsHwQ74+Wgi6YgEUxqmKo=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=CT2cEyi4aM8yYaqigVjkupg9VPCoGpL96+tWOjs+GMwA+uFdIEG9DDR9uP02+YIkF\n\tKQ1jpjy/YIOz2zig+M23qDAL0FJyygjsE2+V/Tkyj0b3auugpyJr9MRB7vozC+ZbGy\n\tKOfeS2Bn5929Ou3TZ+Toma0K0JIM6kDRD+qifvwM=","Date":"Thu, 3 Oct 2019 21:14:46 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20191003181446.GA4737@pendragon.ideasonboard.com>","References":"<20191003152037.74617-1-jacopo@jmondi.org>\n\t<20191003152037.74617-4-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20191003152037.74617-4-jacopo@jmondi.org>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 3/5] ipa: ipa_manager: Print the\n\tloaded IPA modules path","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Thu, 03 Oct 2019 18:15:00 -0000"}},{"id":2766,"web_url":"https://patchwork.libcamera.org/comment/2766/","msgid":"<20191003202902.GU1322@bigcity.dyn.berto.se>","date":"2019-10-03T20:29:02","subject":"Re: [libcamera-devel] [PATCH 3/5] ipa: ipa_manager: Print the\n\tloaded IPA modules path","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Jacopo,\n\nThanks for your patch.\n\nOn 2019-10-03 17:20:35 +0200, Jacopo Mondi wrote:\n> Add debug message to report which IPA modules have been loaded and in\n> which order.\n> \n> The loading order is particularly relevant for the test VIMC IPA, as the\n> same IPA is compiled with an open source license tag and a proprietary\n> one and they both match() against the VIMC pipeline handler. Being\n> informed about their loading order is helpful to understand which one of\n> the two is actually in use.\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n\nWith Laurent's comment addressed,\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> ---\n>  src/libcamera/ipa_manager.cpp | 7 +++++--\n>  1 file changed, 5 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\n> index 708233e8a9c7..e990bdcdf84b 100644\n> --- a/src/libcamera/ipa_manager.cpp\n> +++ b/src/libcamera/ipa_manager.cpp\n> @@ -120,13 +120,16 @@ int IPAManager::addDir(const char *libDir)\n>  \t\tif (strcmp(&ent->d_name[offset], \".so\"))\n>  \t\t\tcontinue;\n>  \n> -\t\tIPAModule *ipaModule = new IPAModule(std::string(libDir) +\n> -\t\t\t\t\t\t     \"/\" + ent->d_name);\n> +\t\tstd::string modulePath = std::string(libDir) + \"/\" +\n> +\t\t\t\t\t ent->d_name;\n> +\t\tIPAModule *ipaModule = new IPAModule(modulePath);\n>  \t\tif (!ipaModule->isValid()) {\n>  \t\t\tdelete ipaModule;\n>  \t\t\tcontinue;\n>  \t\t}\n>  \n> +\t\tLOG(IPAManager, Debug) << \"Loaded IPA module: \" << modulePath;\n> +\n>  \t\tmodules_.push_back(ipaModule);\n>  \t\tcount++;\n>  \t}\n> -- \n> 2.23.0\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lf1-x144.google.com (mail-lf1-x144.google.com\n\t[IPv6:2a00:1450:4864:20::144])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 22FB460BE8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  3 Oct 2019 22:29:04 +0200 (CEST)","by mail-lf1-x144.google.com with SMTP id q11so2814019lfc.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 03 Oct 2019 13:29:04 -0700 (PDT)","from localhost (h-93-159.A463.priv.bahnhof.se. [46.59.93.159])\n\tby smtp.gmail.com with ESMTPSA id\n\tf5sm639914lfh.52.2019.10.03.13.29.03\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 03 Oct 2019 13:29:03 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=W1XeOmVS1uIO7yxX8u6L2/E13Cp/z4RfjTtraZ6yKjs=;\n\tb=hI1aeX0nZuf7N6q7zqL/V8OFxLbGKmYWBLpA4LEpBUbQsr6UEGf1N3rtjd+Z+ZYrEG\n\tCzMNsRuMqF9GWDjy4XRvF/2fsBh9Kx3KXxiCJ2YWULe+Ztzr2TQa+cSz0VXeV89roZBE\n\tX2biID0w2TN/XWxonrTB4FX2PV5QkA5jhBgSAWBmq1FOC+Zf93mA9E6E9pgvZ8gDYCHT\n\ta+rrqRNAepGnzDwDF5e+WnJjdkGg0eCvOGu4zgPASU7qBfOO62jrS/RSurFYXaZJbnO2\n\teW1Wjj+h7EIGjgJrgJc4zCnF12MulticKlax1q8VwVmDKH9jhu3xzOW7AmEkbH07tWWn\n\tja+Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=W1XeOmVS1uIO7yxX8u6L2/E13Cp/z4RfjTtraZ6yKjs=;\n\tb=kcZ+QlOk6ZPxDHjaRpcDvsKLgSddS07JkUUzpfOTQL8MMBNVUy5aSimkpYqAfIa0O9\n\tOuJuap9cE9XfVA7tZ6p7hCV6mK8zhsK685zPdFBEvYgOjPPmU3Rtd6qrTyHH/RqJ7ACv\n\to/yqXtLIrQlmQks4Jl3LBVWBwSwZsqQe6Ibr7nawA76C9PMae5m53Ri+2FRuc50jk6CS\n\tmJCY+oH7TFLM3XviZTfmTnckL9PkSK6BC3QZ8OVxXVu0wJgjMmu4VSlVKFSu1vvrlV2N\n\tgRwP6MMAJx2lrtXhUp0dueibNPL7DEqZY+sP0rxdJb3TzjnXlFt16iHVSsvbN6AxLgJu\n\tZEzw==","X-Gm-Message-State":"APjAAAUbHGSx74+NG5Tcpsgk1IayEVxK8gzv9M2rvZNsbqaQ7Vx53EGg\n\tL3mglQ4AVNfz03JqMxT8hascxQKSjpI=","X-Google-Smtp-Source":"APXvYqw9scKNavLjoID3q6AnbxjdPFUq+XMZDb5+Tg8W0LMnldR5hdIeMSPYNASUWEJpZOJm9u+vgw==","X-Received":"by 2002:a19:6748:: with SMTP id e8mr6954218lfj.136.1570134543603;\n\tThu, 03 Oct 2019 13:29:03 -0700 (PDT)","Date":"Thu, 3 Oct 2019 22:29:02 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20191003202902.GU1322@bigcity.dyn.berto.se>","References":"<20191003152037.74617-1-jacopo@jmondi.org>\n\t<20191003152037.74617-4-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20191003152037.74617-4-jacopo@jmondi.org>","User-Agent":"Mutt/1.12.1 (2019-06-15)","Subject":"Re: [libcamera-devel] [PATCH 3/5] ipa: ipa_manager: Print the\n\tloaded IPA modules path","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Thu, 03 Oct 2019 20:29:04 -0000"}}]