rib / gputop

A GPU profiling tool
160 stars 37 forks source link

Support for per-vGPU mode profiling #166

Open jiaopengyuan opened 6 years ago

jiaopengyuan commented 6 years ago

These 3 commits are about per virtual GPU counter profiling, which are usage for graphics workloads running inside virtual machines. User can select a specific vGPU on the web ui or through gputop-csv to observe each vGPU performance.

Let me briefly introduce my idea. If we create 2 vGPUs, there are 3 states. ctx_mode = ["Global", "vGPU1", "vGPU2"], and corresponding hw_id = ["0", hw_id1, hw_id2]. The "Global" state means the current state, without applying my patch, that is, it shows the whole counter values for any context id. All of the vgpu_id and hw_id starts from non-zero value. Hence I define the hw_id as 0 to map the "Global" state. So in the beginning without selecting any hw id, the current_hw_id is 0, it works in the "Global" state.

djdeath commented 6 years ago

The new UI has gained the ability to list processes associated to a hw_id (requires kernel 4.15+). I supposed that would display the name of the hypervisor process in your use case. Is that enough?