Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A9DD2200BBA for ; Sat, 22 Oct 2016 00:58:31 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A8520160AE9; Fri, 21 Oct 2016 22:58:31 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id EDF5D160AE8 for ; Sat, 22 Oct 2016 00:58:30 +0200 (CEST) Received: (qmail 487 invoked by uid 500); 21 Oct 2016 22:58:30 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 473 invoked by uid 99); 21 Oct 2016 22:58:29 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Oct 2016 22:58:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 5A07C180666 for ; Fri, 21 Oct 2016 22:58:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id RF3qjc4QefRs for ; Fri, 21 Oct 2016 22:58:26 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id ADCA05F201 for ; Fri, 21 Oct 2016 22:58:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id u9LMw8rq022486; Fri, 21 Oct 2016 22:58:08 GMT Message-Id: <201610212258.u9LMw8rq022486@ip-10-146-233-104.ec2.internal> Date: Fri, 21 Oct 2016 22:58:07 +0000 From: "Tim Armstrong (Code Review)" To: Jim Apple , impala-cr@cloudera.com, reviews@impala.incubator.apache.org Reply-To: tarmstrong@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-3676=3A_Use_clang_as_a_static_analysis_tool=0A?= X-Gerrit-Change-Id: I4ed168488cb30ddeccd0087f3840541d858f9c06 X-Gerrit-ChangeURL: X-Gerrit-Commit: 97385d51cd3c99cb510beb9d2f7a1706dd2b6180 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.2 archived-at: Fri, 21 Oct 2016 22:58:31 -0000 Tim Armstrong has posted comments on this change. Change subject: IMPALA-3676: Use clang as a static analysis tool ...................................................................... Patch Set 4: (7 comments) Just a few remaining things. http://gerrit.cloudera.org:8080/#/c/4758/2/be/CMakeLists.txt File be/CMakeLists.txt: Line 106: SET(CXX_FLAGS_TIDY "${CXX_FLAGS_TIDY} --gcc-toolchain=${GCC_ROOT}") > I think that might be just for building the toolchain. I tried changing it It sets up CMake to use clang as the C++ compiler (see bin/impala_impala.sh where the different build types use different toolchain.cmake). We already have all of the logic in there to build Impala with Clang so we should use that instead of solving it in a different way for this build type. http://gerrit.cloudera.org:8080/#/c/4758/4/be/src/common/status.h File be/src/common/status.h: Line 212: return *msg_; // NOLINT: with DCHECKS off, this might deref a nullptr I still think we should reword this to make it clear that it's a limitation of the static analysis not a product bug, e.g. // NOLINT: clang-tidy thinks this might deref a nullptr. http://gerrit.cloudera.org:8080/#/c/4758/1/be/src/runtime/coordinator.h File be/src/runtime/coordinator.h: > I'm interested in your thoughts on which struct reordering s are, in your o Either if the multiple instances of the struct are touched on a particularly perf-critical part of query execution (e.g. maybe BloomFilter) or if there are so many instances of it that they make up a significant part of the memory footprint of the process (hash table buckets, tuples, etc). We only have one coordinator per query and it shouldn't be touched that frequently (only when returning each result batch or serving an RPC) so I don't see a benefit. http://gerrit.cloudera.org:8080/#/c/4758/4/be/src/runtime/coordinator.h File be/src/runtime/coordinator.h: Line 432: bool needs_finalization_; Can you revert these changes? http://gerrit.cloudera.org:8080/#/c/4758/1/be/src/util/runtime-profile.h File be/src/util/runtime-profile.h: Line 335 > I have put these variables back in the logical (but suboptimaly packed) ord I'm ok with this but we should revisit if there are a lot of spurious warnings or people feel compelled to repack everything. http://gerrit.cloudera.org:8080/#/c/4758/4/bin/run_clang_tidy.sh File bin/run_clang_tidy.sh: Line 46: # This script has been tested when CORES is actually higher than the number of cores 2 space indents are the (imperfectly followed) standard in the shell scripts. http://gerrit.cloudera.org:8080/#/c/4758/4/buildall.sh File buildall.sh: Line 256: Remove extra blank line. -- To view, visit http://gerrit.cloudera.org:8080/4758 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4ed168488cb30ddeccd0087f3840541d858f9c06 Gerrit-PatchSet: 4 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Jim Apple Gerrit-Reviewer: Jim Apple Gerrit-Reviewer: Tim Armstrong Gerrit-HasComments: Yes