lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081126141544.GH6562@elte.hu>
Date:	Wed, 26 Nov 2008 15:15:44 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	eranian@...glemail.com
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	x86@...nel.org, andi@...stfloor.org, eranian@...il.com,
	sfr@...b.auug.org.au
Subject: Re: [patch 00/24] perfmon: introduction


please remove all this debug crap from the patches:

+	PFM_DBG_ovfl("pfm_arch_write_pmc(0x%lx, 0x%Lx)",
+	PFM_DBG_ovfl("pfm_arch_write_pmd(0x%lx, 0x%Lx)",
+	PFM_DBG_ovfl("pfm_arch_read_pmd(0x%lx) = 0x%Lx",
+	PFM_DBG_ovfl("pfm_arch_read_pmc(0x%lx) = 0x%016Lx",
+		PFM_DBG("clear cr4.pce");
+		PFM_DBG("set cr4.pce");
+	PFM_DBG_ovfl("state=%d", ctx->state);
+		PFM_DBG_ovfl("no ctx");
+		PFM_DBG_ovfl("no ovfl");
+	PFM_DBG("LTVPC=0x%lx using_nmi=%d",
+			PFM_DBG("pmc%d(%s) already used", i, d->desc);
+	PFM_DBG("nlost=%d info_flags=0x%x\n", nlost, pmu_info->flags);
+			PFM_DBG("pmd%d(%s) already used", i, d->desc);
+		PFM_DBG("pmc%u released", i);
+		PFM_DBG("pmd%u released", i);
+		PFM_DBG("acquired Northbridge event access globally");
+		PFM_DBG("global NorthBridge event conflict");
+		PFM_DBG("released NorthBridge events globally");
+	PFM_DBG("global=0x%llx set to 0x%llx",
+	PFM_DBG("global_ctrl restored to 0x%llx\n",
+#define _PFM_DBG(lm, f, x...) \
+#define PFM_DBG(f, x...) _PFM_DBG(0x1, f, ##x)
+#define PFM_DBG_ovfl(f, x...) _PFM_DBG(0x2, f, ##x)
+#define PFM_DBG(f, x...)	do {} while (0)
+#define PFM_DBG_ovfl(f, x...)	do {} while (0)
+	PFM_DBG("ctx_task=[%d] ctx_state=%d is_system=%d",
+	PFM_DBG("pid=%d",  task->pid);
+		PFM_DBG("load_pid=%d has a context "
+	PFM_DBG("novfls=%u", num_ovfls);
+		PFM_DBG("pmd%u val=0x%llx",
+	PFM_DBG("ctx_state=%d task [%d]",
+		PFM_DBG("released ownership");
+	PFM_DBG("state=%d is_self=%d", ctx->state, ctx->flags.is_self);
+		PFM_DBG("[%d] has no ctx", current->pid);
+	PFM_DBG("work_type=%d", type);
+		PFM_DBG("unkown type=%d", type);
+	PFM_DBG("context is zombie, bailing out");
+	PFM_DBG("free ctx @0x%p", ctx);
+		PFM_DBG("user group not allowed to create a task context");
+			PFM_DBG("pmc%u=0x%llx",
+	PFM_DBG("alloc ctx @0x%p", ctx);
+		PFM_DBG("no usable PMU registers");
+	PFM_DBG("flags=0x%x fd=%d", ctx_flags, fd);
+	PFM_DBG("state=%d", state);
+		PFM_DBG("zombie ctx for [%d]", ctx->task->pid);
+	PFM_DBG("called filp=%p", filp);
+	PFM_DBG("pfm_file_ops");
+	PFM_DBG("pfm_read called");
+	PFM_DBG("pfm_write called");
+	PFM_DBG("pfm_ioctl called");
+	PFM_DBG("new inode ino=%ld @%p", inode->i_ino, inode);
+		PFM_DBG_ovfl("pmd%u ovfl=%s new=0x%llx old=0x%llx "
+	PFM_DBG_ovfl("intr_pmds=0x%llx npend=%u ip=%p u_pmds=0x%llx",
+	PFM_DBG_ovfl("ctx is zombie, converted to spurious");
+		PFM_DBG_ovfl("no ctx");
+		PFM_DBG_ovfl("spurious: not owned by current task");
+		PFM_DBG_ovfl("spurious: monitoring non active");
+		PFM_DBG_ovfl("no npend_ovfls");
+	PFM_DBG("pmu_acquired=%d", pfm_pmu_acquired);
+			PFM_DBG("regs_all.pmcs=0x%llx",
+			PFM_DBG("PMU acquired: %u PMCs, %u PMDs, %u counters",
+	PFM_DBG("pmu_acquired=%d", pfm_pmu_acquired);
+		PFM_DBG("PMU released");
+	PFM_DBG("in  thread=%u",
+	PFM_DBG("out thread=%u ret=%d",
+	PFM_DBG("in thread=%u",
+	PFM_DBG("out thread=%u",
+	PFM_DBG("in  sys=%u task=%u",
+		PFM_DBG("already some system-wide sessions");
+		PFM_DBG("%u conflicting thread_sessions",
+	PFM_DBG("out sys=%u task=%u",
+	PFM_DBG("in  sys=%u task=%u",
+	PFM_DBG("out sys=%u task=%u",
+	PFM_DBG("u_pmds=0x%llx nu_pmds=%u u_pmcs=0x%llx nu_pmcs=%u",
+			PFM_DBG("pmd%u is not available", cnum);
+		PFM_DBG("pmd%u=0x%llx a_pmu=%d "
+			PFM_DBG("pmc%u is not available", cnum);
+		PFM_DBG("pmc%u=0x%llx a_pmu=%d "
+			PFM_DBG("pmd%u is not implemented/unaccessible", cnum);
+			PFM_DBG("pmd%u cannot read, because not used", cnum);
+		PFM_DBG("pmd%u=0x%llx ",
+		PFM_DBG("cannot attach to kernel thread [%d]", task->pid);
+		PFM_DBG("cannot attach to zombie/dead task [%d]", task->pid);
+		PFM_DBG("task not found %d", pid);
+	PFM_DBG("may_attach=%d check_attach=%d", ret1, ret);
+	PFM_DBG("state=%d check_mask=0x%x task=[%d]",
+		PFM_DBG("state=%d, cmd needs context unloaded", state);
+			PFM_DBG("old_state=%d new_state=%d",
+	PFM_DBG("ret=%d",ret);
+		PFM_DBG("argument too big %zu max=%zu",
+		PFM_DBG("invalid fd %d", fd);
+		PFM_DBG("fd %d not related to perfmon", fd);
+		PFM_DBG("invalid type=%d", type);
+		PFM_DBG("invalid size=%zu for type=%d", sz, type);
+	PFM_DBG("sz=%zu sz_type=%zu count=%zu",
+	PFM_DBG("flags=0x%x sif=%p", flags, ureq);
+		PFM_DBG("no flags accepted yet");
+	PFM_DBG("fd=%d flags=0x%x type=%d req=%p sz=%zu",
+		PFM_DBG("no flags defined");
+		PFM_DBG("invalid type=%d", type);
+	PFM_DBG("fd=%d flags=0x%x type=%d req=%p sz=%zu",
+		PFM_DBG("no flags defined");
+		PFM_DBG("invalid type=%d", type);
+	PFM_DBG("fd=%d uflags=0x%x state=0x%x", fd, uflags, state);
+		PFM_DBG("no flags defined");
+		PFM_DBG("invalid state=0x%x", state);
+	PFM_DBG("fd=%d uflags=0x%x target=%d", fd, uflags, target);
+		PFM_DBG("invalid flags");

they are used way too frequently and obscures the structure and 
purpose of the code. We wouldnt mind in a driver but this is core 
kernel code.

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ