lkml.org 
[lkml]   [2020]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/10] perf report: Add 'cgroup' sort key
On Mon, Feb 24, 2020 at 01:37:45PM +0900, Namhyung Kim wrote:

SNIP

> @@ -634,6 +637,39 @@ struct sort_entry sort_cgroup_id = {
> .se_width_idx = HISTC_CGROUP_ID,
> };
>
> +/* --sort cgroup */
> +
> +static int64_t
> +sort__cgroup_cmp(struct hist_entry *left, struct hist_entry *right)
> +{
> + return right->cgroup - left->cgroup;
> +}
> +
> +static int hist_entry__cgroup_snprintf(struct hist_entry *he,
> + char *bf, size_t size,
> + unsigned int width __maybe_unused)
> +{
> + const char *cgrp_name = "N/A";
> +
> + if (he->cgroup) {
> + struct cgroup *cgrp = cgroup__find(he->ms.maps->machine->env,

eveything is connected :)) great that this one works

jirka

\
 
 \ /
  Last update: 2020-03-06 15:10    [W:0.149 / U:3.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site