[llvm-dev] How to use -forder-file-instrumentation to generate order file for iOS Apps?

Jack Chen via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 23 01:04:24 PDT 2021


Hello llvm developers,

I wonder how to use the flag *-forder-file-instrumentation* for iOS Apps
written in objective-C and swift?

I enabled the flags* -forder-file-instrumentation -mllvm
-orderfile-write-mapping* *-fprofile-instr-generate *when building my iOS
App, which is written in objective-C and swift.
After running the App on the iOS simulator on my macbook, a profraw.order
file is generated in the simulator's folder. However, the file doesn't
contain the correct contents. It contains too few bytes, also most data
blobs are 32 bits (I believe the right format is 64-bits MD5), and many of
them are duplicated. FWIW, here are the first few bytes:

00000000: 70aa cb11 0100 0000 f8ac cb11 0100 0000  p...............
00000010: 90ab cb11 0100 0000 58aa cb11 0100 0000  ........X.......
00000020: ffff ffff 0000 0000 0000 0000 0000 0000  ................
00000030: 0000 0000 0000 0000 ffff ffff 0000 0000  ................
00000040: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000050: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000060: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000070: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000080: 0000 0000 0000 0000 0000 0000 0000 0000  ................

I wonder if the feature *-forder-file-instrumentation *is supported for iOS
Apps that are written in objective-C and swift?
If yes, then I wonder what's the proper steps to use it?

Thank you very much for your time.

Regards,
Jack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210923/3b759742/attachment.html>


More information about the llvm-dev mailing list