summaryrefslogtreecommitdiff
path: root/xmake/core/sandbox/modules/import/lib
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/sandbox/modules/import/lib')
-rw-r--r--xmake/core/sandbox/modules/import/lib/detect/find_program.lua3
-rw-r--r--xmake/core/sandbox/modules/import/lib/detect/find_programver.lua3
2 files changed, 6 insertions, 0 deletions
diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_program.lua b/xmake/core/sandbox/modules/import/lib/detect/find_program.lua
index 90dd963fb..0fedf66c7 100644
--- a/xmake/core/sandbox/modules/import/lib/detect/find_program.lua
+++ b/xmake/core/sandbox/modules/import/lib/detect/find_program.lua
@@ -28,6 +28,7 @@ local option = require("base/winos")
local table = require("base/table")
local utils = require("base/utils")
local option = require("base/option")
+local profiler = require("base/profiler")
local project = require("project/project")
local detectcache = require("cache/detectcache")
local sandbox = require("sandbox/sandbox")
@@ -301,7 +302,9 @@ function sandbox_lib_detect_find_program.main(name, opt)
-- find executable program
checking = coroutine_running and name or nil
+ profiler:enter("find_program", name)
result = sandbox_lib_detect_find_program._find(name, paths, opt)
+ profiler:leave("find_program", name)
checking = nil
-- cache result
diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_programver.lua b/xmake/core/sandbox/modules/import/lib/detect/find_programver.lua
index 24e6b97e0..8a048e4fa 100644
--- a/xmake/core/sandbox/modules/import/lib/detect/find_programver.lua
+++ b/xmake/core/sandbox/modules/import/lib/detect/find_programver.lua
@@ -28,6 +28,7 @@ local table = require("base/table")
local utils = require("base/utils")
local option = require("base/option")
local semver = require("base/semver")
+local profiler = require("base/profiler")
local project = require("project/project")
local detectcache = require("cache/detectcache")
local sandbox = require("sandbox/sandbox")
@@ -81,6 +82,7 @@ function sandbox_lib_detect_find_programver.main(program, opt)
-- attempt to get version output info
checking = coroutine_running and program or nil
+ profiler:enter("find_programver", program)
local ok = false
local outdata = nil
local command = opt.command
@@ -93,6 +95,7 @@ function sandbox_lib_detect_find_programver.main(program, opt)
ok, outdata = os.iorunv(program, {command or "--version"}, {envs = opt.envs})
end
checking = nil
+ profiler:leave("find_programver", program)
-- find version info
if ok and outdata and #outdata > 0 then