Add an admin port endpoint for removing units from the unit cache
commitad0e2f0dc35e8258c58ab8fcdaa8d37dd0d72d7f
authorWilfred Hughes <wilfred@fb.com>
Tue, 18 Jun 2019 12:36:47 +0000 (18 05:36 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Tue, 18 Jun 2019 12:40:39 +0000 (18 05:40 -0700)
treecf30e49fcd216c9a35468eb8230283e2b6c058ec
parentdaaeb58266cef6528c6de10719d95ff3f83cf2bc
Add an admin port endpoint for removing units from the unit cache

Summary:
Add a new `/invalidate-units` endpoint to the admin interface, to enable us to measure bytecode compilation performance on collections of dependent files.

This endpoint can be used as follows, assuming a local HHVM with admin port 8003:

```
$ curl 'http://localhost:8003/invalidate-units?path=/my/file.php&path=/my/other/file.php'
```

Reviewed By: paulbiss

Differential Revision: D15149555

fbshipit-source-id: 5e30b46aa6e5e61c1f8a1bbcaa1a5fda3ca1abf6
hphp/runtime/base/unit-cache.cpp
hphp/runtime/base/unit-cache.h
hphp/runtime/server/admin-request-handler.cpp
hphp/runtime/server/admin-request-handler.h
hphp/runtime/vm/repo.cpp
hphp/runtime/vm/repo.h