Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l0EJG-0002FW-N9 for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Jan 2021 01:53:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l0EJF-0007Uf-0w for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Jan 2021 01:53:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l0EJE-0007UY-NK for pgsql-hackers@lists.postgresql.org; Fri, 15 Jan 2021 01:53:52 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l0EJB-0002RW-T3 for pgsql-hackers@postgresql.org; Fri, 15 Jan 2021 01:53:51 +0000 Received: from Sergeys-MacBook-Pro.local (unknown [62.217.185.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 148E821C36C7; Fri, 15 Jan 2021 04:53:47 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1610675627; bh=b+Twf3juKBOkgRNuLzOrhbU46LcFo1EyRFQ8UUQX9Ws=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=ayAQd2Qv4oeYMpABpjeMkJrXrsr19jKzi5AMQnqoyyrn+5tlDgti/2oj4l/GMQ1J2 mO9XA3w+/OFKs7zHaGVy9OoS3HWaintH17Ccns06QN7AYXmoTpoq38W3s06fBPHvQ9 sU1zcLYuXlqY3DyUwiyEofo5ZFNOrYUYlTotgzsA= Subject: Re: pg_preadv() and pg_pwritev() To: Tom Lane Cc: Thomas Munro , pgsql-hackers References: <20201220224040.evr5pduibvm6dze5@alap3.anarazel.de> <448b3cb5-0ba0-6dc5-63c7-789e4eebc40b@postgrespro.ru> <1283127.1610554395@sss.pgh.pa.us> <1286060.1610558607@sss.pgh.pa.us> <1297389.1610562046@sss.pgh.pa.us> <1341608.1610580122@sss.pgh.pa.us> <1410650.1610638974@sss.pgh.pa.us> <1418166.1610647514@sss.pgh.pa.u! s> <1419199.1610649100@sss.pgh.pa.us> <1612230.1610662425@sss.pgh.pa.us> From: Sergey Shinderuk Message-ID: <7848499f-488e-4402-a5d5-e1395efca523@postgrespro.ru> Date: Fri, 15 Jan 2021 04:53:46 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <1612230.1610662425@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 15.01.2021 01:13, Tom Lane wrote: > than relying entirely on xcodebuild. Maybe there's a case for trying > "xcrun --sdk macosx --show-sdk-path" in between; in my tests that > seemed noticeably faster than invoking xcodebuild, and I've not yet > seen a case where it gave a different answer. > I see that "xcrun --sdk macosx --show-sdk-path" really calls "/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk macosx -version Path" under the hood. % lldb -- xcrun --no-cache --sdk macosx --show-sdk-path (lldb) target create "xcrun" Current executable set to 'xcrun' (x86_64). (lldb) settings set -- target.run-args "--no-cache" "--sdk" "macosx" "--show-sdk-path" (lldb) settings set target.unset-env-vars SDKROOT (lldb) b popen Breakpoint 1: where = libsystem_c.dylib`popen, address = 0x00007fff67265607 (lldb) r Process 26857 launched: '/usr/bin/xcrun' (x86_64) Process 26857 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 frame #0: 0x00007fff6e313607 libsystem_c.dylib`popen libsystem_c.dylib`popen: -> 0x7fff6e313607 <+0>: pushq %rbp 0x7fff6e313608 <+1>: movq %rsp, %rbp 0x7fff6e31360b <+4>: pushq %r15 0x7fff6e31360d <+6>: pushq %r14 Target 0: (xcrun) stopped. (lldb) p (char *)$arg1 (char *) $1 = 0x0000000100406960 "/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk macosx -version Path" % sudo dtrace -n 'pid$target::popen:entry { trace(copyinstr(arg0)) }' -c 'xcrun --sdk macosx --show-sdk-path' dtrace: description 'pid$target::popen:entry ' matched 1 probe CPU ID FUNCTION:NAME 0 413269 popen:entry /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk macosx -version Path /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk dtrace: pid 26905 has exited