let category_to_string = function
| Data -> "Data"
| Subprogram -> "Subprogram"
| Thread -> "Thread"
| Thread_group -> "Thread_group"
| Process -> "Process"
| Processor -> "Processor"
| Memory -> "Memory"
| Bus -> "Bus"
| Device -> "Device"
| System -> "System"