Skip to content

Commit

Permalink
Remove change to pidTidKey function
Browse files Browse the repository at this point in the history
  • Loading branch information
zacmarion-cb committed Jan 3, 2024
1 parent 071d8f8 commit 8be44af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/import/trace-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ interface TraceEventObject {

type Trace = TraceEvent[] | TraceEventObject | TraceWithSamples

function pidTidKey(pid: number | number, tid: number | number): string {
function pidTidKey(pid: number, tid: number): string {
// We zero-pad the PID and TID to make sorting them by pid/tid pair later easier.
return `${zeroPad('' + pid, 10)}:${zeroPad('' + tid, 10)}`
}
Expand Down Expand Up @@ -349,7 +349,7 @@ function frameInfoForEvent(
}
}

function getProfileNameFromPidTid(
function getProfileName(
processName: string | undefined,
threadName: string | undefined,
pid: number,
Expand Down Expand Up @@ -384,7 +384,7 @@ function getProfileNamesFromSamples(
const profileKey = pidTidKey(pid, tid)
const processName = processNamesByPid.get(pid)
const threadName = threadNamesByPidTid.get(profileKey)
const profileName = getProfileNameFromPidTid(processName, threadName, pid, tid)
const profileName = getProfileName(processName, threadName, pid, tid)

profileNamesByPidTid.set(profileKey, profileName)
})
Expand All @@ -409,7 +409,7 @@ function getProfileNamesFromTraceEvents(
const profileKey = pidTidKey(pid, tid)
const processName = processNamesByPid.get(pid)
const threadName = threadNamesByPidTid.get(profileKey)
const profileName = getProfileNameFromPidTid(processName, threadName, pid, tid)
const profileName = getProfileName(processName, threadName, pid, tid)

profileNamesByPidTid.set(profileKey, profileName)
})
Expand Down

0 comments on commit 8be44af

Please sign in to comment.