This is an archive of the discontinued LLVM Phabricator instance.

ProcessInstanceInfoMatch: Don't match processes with no name if a name match was requested, take 2
ClosedPublic

Authored by labath on Oct 8 2019, 4:08 AM.

Details

Summary

The previous attempt at making nameless process not match when searching for a
given name failed because the macos implementation was depending on this detail
in its partial matching strategy. Doing partial matching to avoid expensive
lookups is a perfectly valid thing to do, the way it was implemented seems
somewhat unexpected.

This patch implements it differently by providing special
methods in the ProcessInstanceInfoMatch which match only a subset of fields,
and changes mac host code to use those instead.

Then, it re-applies r373925 to get make the ProcessInstanceInfoMatch with a
name *not* match a nameless process.

Diff Detail

Event Timeline

labath created this revision.Oct 8 2019, 4:08 AM

Looks reasonable to me, but I'll defer to the people that actually know this code.

clayborg accepted this revision.Oct 8 2019, 2:10 PM
This revision is now accepted and ready to land.Oct 8 2019, 2:10 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 11 2019, 4:10 AM