diff --git a/src/serialization.jl b/src/serialization.jl index a49092a8..57eb61da 100644 --- a/src/serialization.jl +++ b/src/serialization.jl @@ -31,28 +31,6 @@ function JSON.lower(x::Union{values(SUPPORTED_TYPES)...}) return [string(nameof(typeof(x))), d] end -# Should this be in LinuxPerf? -JSON.lower(::typeof(LinuxPerf.parse_groups)) = "LinuxPerf.parse_groups" - -# Should this be in LinuxPerf? -# Need this to deserialize LinuxPerf.Stats -Base.convert(::Type{LinuxPerf.Stats}, d::Dict{String}) = LinuxPerf.Stats(d["threads"]) -function Base.convert(::Type{LinuxPerf.ThreadStats}, d::Dict{String}) - return LinuxPerf.ThreadStats(d["pid"], d["groups"]) -end -function JSON.lower(counter::LinuxPerf.Counter) - return [ - counter.event.category, - counter.event.event, - counter.value, - counter.enabled, - counter.running, - ] -end -function Base.convert(::Type{LinuxPerf.Counter}, v::Vector) - return LinuxPerf.Counter(LinuxPerf.EventType(v[1], v[2]), v[3], v[4], v[5]) -end - # a minimal 'eval' function, mirroring KeyTypes, but being slightly more lenient safeeval(@nospecialize x) = x safeeval(x::QuoteNode) = x.value diff --git a/src/trials.jl b/src/trials.jl index cd036171..9280bb9b 100644 --- a/src/trials.jl +++ b/src/trials.jl @@ -2,18 +2,6 @@ # Trial # ######### -# Move into LinuxPerf.jl -Base.copy(stats::LinuxPerf.Stats) = LinuxPerf.Stats(copy(stats.threads)) -function Base.copy(thread_stats::LinuxPerf.ThreadStats) - return LinuxPerf.ThreadStats(thread_stats.pid, copy(thread_stats.groups)) -end -function Base.copy(counter::LinuxPerf.Counter) - return LinuxPerf.Counter( - copy(counter.event), counter.value, counter.enabled, counter.running - ) -end -Base.copy(event::LinuxPerf.EventType) = LinuxPerf.EventType(event.category, event.event) - mutable struct Trial params::Parameters times::Vector{Float64}