]> gcc.gnu.org Git - gcc.git/commit
runtime: don't call funcPC from a function
authorIan Lance Taylor <ian@gcc.gnu.org>
Wed, 7 Feb 2018 22:04:55 +0000 (22:04 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 7 Feb 2018 22:04:55 +0000 (22:04 +0000)
commitf1a2d8b1b51ee77499ccf8ed3b4b49ca5307ddb4
tree11e6655920a67f8348528f9cd25ca6b1167eb6d1
parent82e259b893021c9b82db80456d409ea6d6bc41d7
runtime: don't call funcPC from a function

    The escape analysis support is not yet good enough to avoid escaping
    the argument to funcPC.  This causes unnecessary and often harmful
    memory allocation.  E.g., (*cpuProfile).addExtra can be called from a
    signal handler, and it must not allocate memory.

    Move the calls to funcPC to use variables instead.  This was done in
    the original migration to using funcPC, but was not done for newer code.

    In one case, in signal handling code, use getSigtramp.

    Reviewed-on: https://go-review.googlesource.com/92735

From-SVN: r257463
gcc/go/gofrontend/MERGE
libgo/go/runtime/cpuprof.go
libgo/go/runtime/proc.go
libgo/go/runtime/signal_unix.go
This page took 0.056718 seconds and 5 git commands to generate.