Merge "Add logging of file resource limits in Soong" am: 1aa1f1aa95
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1975186 Change-Id: I571bc03719fb29f12fa4c3b51ba0e056338e0313
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"android/soong/shared"
|
"android/soong/shared"
|
||||||
@@ -204,6 +205,15 @@ func main() {
|
|||||||
buildCtx.Verbosef("Parallelism (local/remote/highmem): %v/%v/%v",
|
buildCtx.Verbosef("Parallelism (local/remote/highmem): %v/%v/%v",
|
||||||
config.Parallel(), config.RemoteParallel(), config.HighmemParallel())
|
config.Parallel(), config.RemoteParallel(), config.HighmemParallel())
|
||||||
|
|
||||||
|
{
|
||||||
|
var limits syscall.Rlimit
|
||||||
|
err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &limits)
|
||||||
|
if err != nil {
|
||||||
|
buildCtx.Verbosef("Failed to get file limit:", err)
|
||||||
|
}
|
||||||
|
buildCtx.Verbosef("Current file limits: %d soft, %d hard", limits.Cur, limits.Max)
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
// The order of the function calls is important. The last defer function call
|
// The order of the function calls is important. The last defer function call
|
||||||
// is the first one that is executed to save the rbe metrics to a protobuf
|
// is the first one that is executed to save the rbe metrics to a protobuf
|
||||||
|
Reference in New Issue
Block a user