[PATCH] D29954: [PGO] Suspend SIGKILL for PR_SET_PDEATHSIG in profile-write

Rong Xu via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 15 13:34:08 PST 2017


Usleep() is in milliseconds.

As for the check, parent should get to the profile dump first as it sleeps
 for 10ms. 80MB profile take 1 second to write. We should get the merged
profile in any system with rasonable scheduler.

I did not use 0 size check also because I don't find the support in
FileCheck. I would need to use a shell command for this.





On Feb 15, 2017 1:22 PM, "David Li via Phabricator" <
reviews at reviews.llvm.org> wrote:

> davidxl added inline comments.
>
>
> ================
> Comment at: test/profile/Linux/prctl.c:17
> +int main(int argc, char **argv)
> +{
> +    pid_t pid = fork();
> ----------------
> format the test in llvm style.
>
>
> ================
> Comment at: test/profile/Linux/prctl.c:23
> +        int sum = 0;
> +        /* child process: sleep 50ms and get to runtime before the
> +         * main process exits. */
> ----------------
> 50 us or microsec
>
>
> ================
> Comment at: test/profile/Linux/prctl.c:33
> +    {
> +        /* parent process: sleep 10ms to get into profile runtime first.
> */
> +        usleep(10);
> ----------------
> 10us
>
>
> ================
> Comment at: test/profile/Linux/prctl.c:40
> +// CHECK: Total functions: 1
> +// CHECK: Maximum function count: 5000
> +// CHECK: Maximum internal block count: 1
> ----------------
> Just check size of profile data? It is not guaranteed that child process
> will have a chance to dump.
>
>
> https://reviews.llvm.org/D29954
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170215/cc2fa2e3/attachment.html>


More information about the llvm-commits mailing list