ObjProf user nodes only
[hiphop-php.git] / hphp / runtime / ext / objprof / ext_objprof.php
blob596efa2c5038780d511e4784c0a63e0d4ad81215
1 <?hh
3 namespace HH {
5 /**
6 * Do a memory scan and collect information about allocated objects
8 * @return Array - an Array of (object allocation datas) as well as
9 * It is possible for the output of this function to change in the near
10 * future. If so, it will be documented.
13 type ObjprofPathsStats = shape(
14 'instances' => int,
15 'bytes' => int,
16 'path' => array<string>,
19 type ObjprofObjectStats = shape(
20 'instances' => int,
21 'bytes' => int,
22 'paths' => ObjprofPathsStats,
25 type ObjprofStringStats = shape(
26 'dups' => int,
27 'refs' => int,
28 'srefs' => int,
29 'path' => string,
32 <<__Native>>
33 function objprof_get_data(
34 int $flags = OBJPROF_FLAGS_DEFAULT,
35 array $exclude_list = array(),
36 ): array<string, ObjprofObjectStats>;
38 <<__Native>>
39 function objprof_get_strings(int $min_dup): array<string, ObjprofStringStats>;
41 <<__Native>>
42 function objprof_get_paths(
43 int $flags = OBJPROF_FLAGS_DEFAULT,
44 array $exclude_list = array(),
45 ): array<string, ObjprofObjectStats>;
47 <<__Native>>
48 function thread_memory_stats(): array<string, int>;
50 <<__Native>>
51 function thread_mark_stack(): void;
53 <<__Native>>
54 function set_mem_threshold_callback(int $threshold, mixed $callback): void;