Re: pg_preadv() and pg_pwritev() - Mailing list pgsql-hackers

From Sergey Shinderuk
Subject Re: pg_preadv() and pg_pwritev()
Date
Msg-id 7848499f-488e-4402-a5d5-e1395efca523@postgrespro.ru
Whole thread Raw
In response to Re: pg_preadv() and pg_pwritev()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_preadv() and pg_pwritev()  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: pg_preadv() and pg_pwritev()  (Sergey Shinderuk <s.shinderuk@postgrespro.ru>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_preadv() and pg_pwritev()
Next
From: Tom Lane
Date:
Subject: Re: pg_preadv() and pg_pwritev()