profiler
profiler copied to clipboard
Fix types in GCSlice marker fields
julienw said "I noticed trigger_amount and trigger_threshold are strings too, but strings that contain only a number, so maybe we should just convert them when we process this marker. (in a future PR)" and he's right. These are also the last two things with incorrect types.
I checked the corresponding C++ code and these are either floats within strings or the bareword null: https://searchfox.org/mozilla-central/source/js/src/vm/JSONPrinter.cpp#174 which is used when the float is infinite (and I presume NaN). We should convert this to the type number | 'null' when we load the profile. IMHO it does not need to be a profile conversion step, but I'd like to know what others think.
┆Issue is synchronized with this Jira Task
I'd rather use number | null, and have a profile conversion step, because if existing profiles have the value "null" we can have weird results after formatBytes