cache.c (48804eebd4a327e4b11f902ba80a00876ee53a43) cache.c (402587419993d86638f1f81fc4e55625a320ad2f)
1/*
2 * Copyright (C) 2021, Mahmoud Mandour <ma.mandourr@gmail.com>
3 *
4 * License: GNU GPL, version 2 or later.
5 * See the COPYING file in the top-level directory.
6 */
7
8#include <inttypes.h>

--- 758 unchanged lines hidden (view full) ---

767 l2_cachesize = l2_assoc * l2_blksize * 2048;
768
769 policy = LRU;
770
771 cores = sys ? qemu_plugin_n_vcpus() : 1;
772
773 for (i = 0; i < argc; i++) {
774 char *opt = argv[i];
1/*
2 * Copyright (C) 2021, Mahmoud Mandour <ma.mandourr@gmail.com>
3 *
4 * License: GNU GPL, version 2 or later.
5 * See the COPYING file in the top-level directory.
6 */
7
8#include <inttypes.h>

--- 758 unchanged lines hidden (view full) ---

767 l2_cachesize = l2_assoc * l2_blksize * 2048;
768
769 policy = LRU;
770
771 cores = sys ? qemu_plugin_n_vcpus() : 1;
772
773 for (i = 0; i < argc; i++) {
774 char *opt = argv[i];
775 g_autofree char **tokens = g_strsplit(opt, "=", 2);
775 g_auto(GStrv) tokens = g_strsplit(opt, "=", 2);
776
777 if (g_strcmp0(tokens[0], "iblksize") == 0) {
778 l1_iblksize = STRTOLL(tokens[1]);
779 } else if (g_strcmp0(tokens[0], "iassoc") == 0) {
780 l1_iassoc = STRTOLL(tokens[1]);
781 } else if (g_strcmp0(tokens[0], "icachesize") == 0) {
782 l1_icachesize = STRTOLL(tokens[1]);
783 } else if (g_strcmp0(tokens[0], "dblksize") == 0) {

--- 77 unchanged lines hidden ---
776
777 if (g_strcmp0(tokens[0], "iblksize") == 0) {
778 l1_iblksize = STRTOLL(tokens[1]);
779 } else if (g_strcmp0(tokens[0], "iassoc") == 0) {
780 l1_iassoc = STRTOLL(tokens[1]);
781 } else if (g_strcmp0(tokens[0], "icachesize") == 0) {
782 l1_icachesize = STRTOLL(tokens[1]);
783 } else if (g_strcmp0(tokens[0], "dblksize") == 0) {

--- 77 unchanged lines hidden ---