Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 015284ee authored by Jordan Crouse's avatar Jordan Crouse
Browse files

msm: kgsl: Remove the unused memory histogram



This histogram is no longer interesting and most people don't know
it exists anyway. None shall mourn it.

Change-Id: Ic0dedbad031272a85ccfe63f08c4b21e2e0391ba
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent 3d920d87
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -107,7 +107,6 @@ struct kgsl_driver {
		unsigned int coherent_max;
		unsigned int mapped;
		unsigned int mapped_max;
		unsigned int histogram[16];
	} stats;
	unsigned int full_cache_threshold;
};
+1 −23
Original line number Diff line number Diff line
@@ -236,21 +236,6 @@ static ssize_t kgsl_drv_memstat_show(struct device *dev,
	return snprintf(buf, PAGE_SIZE, "%u\n", val);
}

static ssize_t kgsl_drv_histogram_show(struct device *dev,
				   struct device_attribute *attr,
				   char *buf)
{
	int len = 0;
	int i;

	for (i = 0; i < 16; i++)
		len += snprintf(buf + len, PAGE_SIZE - len, "%d ",
			kgsl_driver.stats.histogram[i]);

	len += snprintf(buf + len, PAGE_SIZE - len, "\n");
	return len;
}

static ssize_t kgsl_drv_full_cache_threshold_store(struct device *dev,
					 struct device_attribute *attr,
					 const char *buf, size_t count)
@@ -282,7 +267,6 @@ static DEVICE_ATTR(coherent, 0444, kgsl_drv_memstat_show, NULL);
static DEVICE_ATTR(coherent_max, 0444, kgsl_drv_memstat_show, NULL);
static DEVICE_ATTR(mapped, 0444, kgsl_drv_memstat_show, NULL);
static DEVICE_ATTR(mapped_max, 0444, kgsl_drv_memstat_show, NULL);
static DEVICE_ATTR(histogram, 0444, kgsl_drv_histogram_show, NULL);
static DEVICE_ATTR(full_cache_threshold, 0644,
		kgsl_drv_full_cache_threshold_show,
		kgsl_drv_full_cache_threshold_store);
@@ -296,7 +280,6 @@ static const struct device_attribute *drv_attr_list[] = {
	&dev_attr_coherent_max,
	&dev_attr_mapped,
	&dev_attr_mapped_max,
	&dev_attr_histogram,
	&dev_attr_full_cache_threshold,
	NULL
};
@@ -597,7 +580,7 @@ _kgsl_sharedmem_page_alloc(struct kgsl_memdesc *memdesc,
			struct kgsl_pagetable *pagetable,
			size_t size)
{
	int pcount = 0, order, ret = 0;
	int pcount = 0, ret = 0;
	int j, page_size, sglen_alloc, sglen = 0;
	size_t len;
	struct page **pages = NULL;
@@ -747,11 +730,6 @@ _kgsl_sharedmem_page_alloc(struct kgsl_memdesc *memdesc,
	outer_cache_range_op_sg(memdesc->sg, memdesc->sglen,
				KGSL_CACHE_OP_FLUSH);

	order = get_order(size);

	if (order < 16)
		kgsl_driver.stats.histogram[order]++;

done:
	KGSL_STATS_ADD(memdesc->size, kgsl_driver.stats.page_alloc,
		kgsl_driver.stats.page_alloc_max);