I've got some performance debugging suggestions here:
https://android.googlesource.com/platform/build/soong/+/master/docs/perf.md

In this case, can you check out/verbose.log.gz after the long ckati run (we
also keep the previous 5 logs numbered newest to oldest), that's where the
*kati* verbose messages will be these days. There should be some amount of
timing information to help figure out what was taking so long.

Do you have a SSD, or spinning HD? On some systems I've seen our find
emulator startup take a long time, as it has to iterate over the entire
tree (it's still faster than doing it multiple times without the cache).
Though that's usually not a problem after a sync, since that should load
most of the metadata into the file cache (assuming you've got plenty of
RAM).

- Dan

On Mon, Nov 26, 2018 at 8:55 AM Yongqin Liu <[email protected]> wrote:

> Hi, All
>
> Not sure if anyone has any idea on why the ckati takes very long time
> during the regenerating of something,
> on my local side,  it takes more than 30 minutes after I finished repo sync
>
> 16:43:59 dl380:master$ make idegen && development/tools/idegen/idegen.sh
> ============================================
> PLATFORM_VERSION_CODENAME=Q
> PLATFORM_VERSION=Q
> TARGET_PRODUCT=hikey
> TARGET_BUILD_VARIANT=userdebug
> TARGET_BUILD_TYPE=release
> TARGET_ARCH=arm64
> TARGET_ARCH_VARIANT=armv8-a
> TARGET_CPU_VARIANT=cortex-a53
> TARGET_2ND_ARCH=arm
> TARGET_2ND_ARCH_VARIANT=armv8-a
> TARGET_2ND_CPU_VARIANT=cortex-a53
> HOST_ARCH=x86_64
> HOST_2ND_ARCH=x86
> HOST_OS=linux
> HOST_OS_EXTRA=Linux-4.15.0-39-generic-x86_64-Ubuntu-18.04.1-LTS
> HOST_CROSS_OS=windows
> HOST_CROSS_ARCH=x86
> HOST_CROSS_2ND_ARCH=x86_64
> HOST_BUILD_TYPE=release
> BUILD_ID=PI
> OUT_DIR=out
> ============================================
> device/linaro/hikey/hikey-common.mk was modified, regenerating...
>
>
> here is the command details of that ckati which is running:
>
> 16:56:21 dl380:master$ ps -ef|grep ckati
> liuyq    48106 45959  0 16:45 pts/0    00:00:05
> prebuilts/build-tools/linux-x86/bin/ckati --ninja --ninja_dir=out
> --ninja_suffix=-hikey-cleanspec --no_ninja_prelude --regen
> --ignore_optional_include=out/%.P --detect_android_echo --color_warnings
> --gen_all_targets --use_find_emulator --werror_find_emulator
> --no_builtin_rules --werror_suffix_rules --warn_real_to_phony
> --warn_phony_looks_real --kati_stats --werror_implicit_rules
> --werror_overriding_commands -f build/make/core/cleanbuild.mk
> SOONG_MAKEVARS_MK=out/soong/make_vars-hikey.mk
> TARGET_DEVICE_DIR=device/linaro/hikey/hikey
> liuyq    48888 48187  0 16:56 pts/2    00:00:00 grep --color=auto ckati
> 16:56:36 dl380:master$
>
>
>
> output from the top command:
> top - 17:04:45 up  7:18,  2 users,  load average: 1.47, 2.04, 5.53
> 任务: 585 total,   1 running, 390 sleeping,   0 stopped,   0 zombie
> %Cpu(s):  2.2 us,  0.6 sy,  0.0 ni, 95.1 id,  2.1 wa,  0.0 hi,  0.0 si,
> 0.0 st
> KiB Mem : 26410513+total, 24048569+free,  4408708 used, 19210740 buff/cache
> KiB Swap:  2097148 total,  2097148 free,        0 used. 25771504+avail Mem
>
>
> and output from the iotop command:
> Total DISK READ :     174.43 K/s | Total DISK WRITE :       0.00 B/s
> Actual DISK READ:     174.43 K/s | Actual DISK WRITE:       0.00 B/s
> TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND
>
> 48106 be/4 liuyq     174.43 K/s    0.00 B/s  0.00 % 62.11 %
> prebuilts/build-tools/linux-x86/bin/ckati
> ~TARGET_DEVICE_DIR=device/linaro/hikey/hikey
> 1 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % init splash
>
>
> Thanks,
> Yongqin Liu
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to