@@ -980,14 +980,13 @@ mutable struct StackFrameTree{T} # where T <: Union{UInt64, StackFrame}
980980 flat_count:: Int # number of times this frame was in the flattened representation (unlike count, this'll sum to 100% of parent)
981981 max_recur:: Int # maximum number of times this frame was the *top* of the recursion in the stack
982982 count_recur:: Int # sum of the number of times this frame was the *top* of the recursion in a stack (divide by count to get an average)
983- sleeping:: Bool # whether this frame was in a sleeping state
984983 down:: Dict{T, StackFrameTree{T}}
985984 # construction workers:
986985 recur:: Int
987986 builder_key:: Vector{UInt64}
988987 builder_value:: Vector{StackFrameTree{T}}
989988 up:: StackFrameTree{T}
990- StackFrameTree {T} () where {T} = new (UNKNOWN, 0 , 0 , 0 , 0 , 0 , true , Dict {T, StackFrameTree{T}} (), 0 , UInt64[], StackFrameTree{T}[])
989+ StackFrameTree {T} () where {T} = new (UNKNOWN, 0 , 0 , 0 , 0 , 0 , Dict {T, StackFrameTree{T}} (), 0 , UInt64[], StackFrameTree{T}[])
991990end
992991
993992
@@ -1028,10 +1027,6 @@ function tree_format(frames::Vector{<:StackFrameTree}, level::Int, cols::Int, ma
10281027 base = string (base, " +" , nextra, " " )
10291028 end
10301029 strcount = rpad (string (frame. count), ndigcounts, " " )
1031- if frame. sleeping
1032- stroverhead = styled " {gray:$(stroverhead)}"
1033- strcount = styled " {gray:$(strcount)}"
1034- end
10351030 if li != UNKNOWN
10361031 if li. line == li. pointer
10371032 strs[i] = string (stroverhead, " ╎" , base, strcount, " " ,
@@ -1044,7 +1039,6 @@ function tree_format(frames::Vector{<:StackFrameTree}, level::Int, cols::Int, ma
10441039 else
10451040 fname = string (li. func)
10461041 end
1047- frame. sleeping && (fname = styled " {gray:$(fname)}" )
10481042 path, pkgname, filename = short_path (li. file, filenamemap)
10491043 if showpointer
10501044 fname = string (
@@ -1088,15 +1082,15 @@ function tree!(root::StackFrameTree{T}, all::Vector{UInt64}, lidict::Union{LineI
10881082 skip = false
10891083 nsleeping = 0
10901084 is_task_profile = false
1091- is_sleeping = true
10921085 for i in startframe: - 1 : 1
10931086 (startframe - 1 ) >= i >= (startframe - (nmeta + 1 )) && continue # skip metadata (it's read ahead below) and extra block end NULL IP
10941087 ip = all[i]
10951088 if is_block_end (all, i)
10961089 # read metadata
10971090 thread_sleeping_state = all[i - META_OFFSET_SLEEPSTATE] - 1 # subtract 1 as state is incremented to avoid being equal to 0
1098- is_sleeping = thread_sleeping_state == 1
1099- is_task_profile = thread_sleeping_state == 2
1091+ if thread_sleeping_state == 2
1092+ is_task_profile = true
1093+ end
11001094 # cpu_cycle_clock = all[i - META_OFFSET_CPUCYCLECLOCK]
11011095 taskid = all[i - META_OFFSET_TASKID]
11021096 threadid = all[i - META_OFFSET_THREADID]
@@ -1151,7 +1145,6 @@ function tree!(root::StackFrameTree{T}, all::Vector{UInt64}, lidict::Union{LineI
11511145 parent = build[j]
11521146 parent. recur += 1
11531147 parent. count_recur += 1
1154- parent. sleeping &= is_sleeping
11551148 found = true
11561149 break
11571150 end
@@ -1171,7 +1164,6 @@ function tree!(root::StackFrameTree{T}, all::Vector{UInt64}, lidict::Union{LineI
11711164 while this != = parent && (recur === :off || this. recur == 0 )
11721165 this. count += 1
11731166 this. recur = 1
1174- this. sleeping &= is_sleeping
11751167 this = this. up
11761168 end
11771169 end
@@ -1193,7 +1185,6 @@ function tree!(root::StackFrameTree{T}, all::Vector{UInt64}, lidict::Union{LineI
11931185 this. up = parent
11941186 this. count += 1
11951187 this. recur = 1
1196- this. sleeping &= is_sleeping
11971188 end
11981189 parent = this
11991190 end
0 commit comments