------------------------------------------------------------ revno: 11735 revision-id: squid3@treenet.co.nz-20121202080913-vj2h46slcjneen50 parent: squid3@treenet.co.nz-20121130235820-cjx0zin5a5guk7rl committer: Amos Jeffries branch nick: 3.2 timestamp: Sun 2012-12-02 01:09:13 -0700 message: Remove unnecessary xmemset() Was a simple wrapper around memset() to add debugs() traces. However other profiling tools can trace memset far better. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20121202080913-vj2h46slcjneen50 # target_branch: http://bzr.squid-cache.org/bzr/squid3/branches\ # /SQUID_3_2 # testament_sha1: 3999ac411726e586532b019e5d95f53cfa6e7843 # timestamp: 2012-12-02 08:52:49 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/branches\ # /SQUID_3_2 # base_revision_id: squid3@treenet.co.nz-20121130235820-\ # cjx0zin5a5guk7rl # # Begin patch === modified file 'src/DiskIO/DiskDaemon/DiskdAction.cc' --- src/DiskIO/DiskDaemon/DiskdAction.cc 2012-02-05 06:09:46 +0000 +++ src/DiskIO/DiskDaemon/DiskdAction.cc 2012-12-02 08:09:13 +0000 @@ -17,7 +17,7 @@ DiskdActionData::DiskdActionData() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } DiskdActionData& === modified file 'src/StoreStats.cc' --- src/StoreStats.cc 2012-02-05 06:09:46 +0000 +++ src/StoreStats.cc 2012-12-02 08:09:13 +0000 @@ -14,7 +14,7 @@ StoreInfoStats::StoreInfoStats() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } StoreInfoStats & @@ -57,6 +57,6 @@ StoreIoStats::StoreIoStats() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } === modified file 'src/ipc/SharedListen.cc' --- src/ipc/SharedListen.cc 2012-02-05 06:09:46 +0000 +++ src/ipc/SharedListen.cc 2012-12-02 08:09:13 +0000 @@ -45,7 +45,7 @@ Ipc::OpenListenerParams::OpenListenerParams() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } bool === modified file 'src/ipc/StoreMap.cc' --- src/ipc/StoreMap.cc 2012-10-17 00:02:26 +0000 +++ src/ipc/StoreMap.cc 2012-12-02 08:09:13 +0000 @@ -272,8 +272,8 @@ Ipc::StoreMapSlot::StoreMapSlot(): state(Empty) { - xmemset(&key, 0, sizeof(key)); - xmemset(&basics, 0, sizeof(basics)); + memset(&key, 0, sizeof(key)); + memset(&basics, 0, sizeof(basics)); } void === modified file 'src/ipc/TypedMsgHdr.cc' --- src/ipc/TypedMsgHdr.cc 2012-02-05 06:09:46 +0000 +++ src/ipc/TypedMsgHdr.cc 2012-12-02 08:09:13 +0000 @@ -14,7 +14,7 @@ Ipc::TypedMsgHdr::TypedMsgHdr() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); sync(); } @@ -208,7 +208,7 @@ void Ipc::TypedMsgHdr::prepForReading() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); allocName(); allocData(); allocControl(); === modified file 'src/mgr/CountersAction.cc' --- src/mgr/CountersAction.cc 2012-02-05 06:09:46 +0000 +++ src/mgr/CountersAction.cc 2012-12-02 08:09:13 +0000 @@ -19,7 +19,7 @@ Mgr::CountersActionData::CountersActionData() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } Mgr::CountersActionData& === modified file 'src/mgr/InfoAction.cc' --- src/mgr/InfoAction.cc 2012-02-05 06:09:46 +0000 +++ src/mgr/InfoAction.cc 2012-12-02 08:09:13 +0000 @@ -26,7 +26,7 @@ Mgr::InfoActionData::InfoActionData() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } Mgr::InfoActionData& === modified file 'src/mgr/IntervalAction.cc' --- src/mgr/IntervalAction.cc 2012-02-05 06:09:46 +0000 +++ src/mgr/IntervalAction.cc 2012-12-02 08:09:13 +0000 @@ -19,7 +19,7 @@ Mgr::IntervalActionData::IntervalActionData() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } Mgr::IntervalActionData& === modified file 'src/mgr/IoAction.cc' --- src/mgr/IoAction.cc 2012-02-05 06:09:46 +0000 +++ src/mgr/IoAction.cc 2012-12-02 08:09:13 +0000 @@ -19,7 +19,7 @@ Mgr::IoActionData::IoActionData() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } Mgr::IoActionData& === modified file 'src/mgr/ServiceTimesAction.cc' --- src/mgr/ServiceTimesAction.cc 2012-02-05 06:09:46 +0000 +++ src/mgr/ServiceTimesAction.cc 2012-12-02 08:09:13 +0000 @@ -18,7 +18,7 @@ Mgr::ServiceTimesActionData::ServiceTimesActionData() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } Mgr::ServiceTimesActionData& === modified file 'src/mgr/StoreIoAction.cc' --- src/mgr/StoreIoAction.cc 2012-02-05 06:09:46 +0000 +++ src/mgr/StoreIoAction.cc 2012-12-02 08:09:13 +0000 @@ -15,7 +15,7 @@ Mgr::StoreIoActionData::StoreIoActionData() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } Mgr::StoreIoActionData& === modified file 'src/protos.h' --- src/protos.h 2012-07-13 11:53:18 +0000 +++ src/protos.h 2012-12-02 08:09:13 +0000 @@ -519,9 +519,6 @@ String ProcessRoles(); SQUIDCEXTERN int DebugSignal; -/* AYJ debugs function to show locations being reset with memset() */ -SQUIDCEXTERN void *xmemset(void *dst, int, size_t); - SQUIDCEXTERN void debug_trap(const char *); SQUIDCEXTERN void logsFlush(void); SQUIDCEXTERN const char *checkNullString(const char *p); === modified file 'src/snmp/Pdu.cc' --- src/snmp/Pdu.cc 2012-07-28 05:38:50 +0000 +++ src/snmp/Pdu.cc 2012-12-02 08:09:13 +0000 @@ -44,7 +44,7 @@ void Snmp::Pdu::init() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); errstat = SNMP_DEFAULT_ERRSTAT; errindex = SNMP_DEFAULT_ERRINDEX; } === modified file 'src/snmp/Session.cc' --- src/snmp/Session.cc 2012-02-05 06:09:46 +0000 +++ src/snmp/Session.cc 2012-12-02 08:09:13 +0000 @@ -38,7 +38,7 @@ void Snmp::Session::clear() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } void === modified file 'src/snmp/Var.cc' --- src/snmp/Var.cc 2012-02-05 06:09:46 +0000 +++ src/snmp/Var.cc 2012-12-02 08:09:13 +0000 @@ -42,7 +42,7 @@ void Snmp::Var::init() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } Snmp::Var& === modified file 'src/tests/stub_tools.cc' --- src/tests/stub_tools.cc 2012-02-05 06:09:46 +0000 +++ src/tests/stub_tools.cc 2012-12-02 08:09:13 +0000 @@ -47,13 +47,6 @@ fatal("tools.cc required"); } -void* -xmemset(void* dst, int val, size_t sz) -{ - assert(dst); - return memset(dst, val, sz); -} - bool IamWorkerProcess() { === modified file 'src/tools.cc' --- src/tools.cc 2012-11-30 13:34:49 +0000 +++ src/tools.cc 2012-12-02 08:09:13 +0000 @@ -1385,13 +1385,3 @@ Ip::Interceptor.StopTransparency("Missing needed capability support."); #endif /* HAVE_SYS_CAPABILITY_H */ } - -void * -xmemset(void *dst, int val, size_t sz) -{ - // do debugs output - debugs(63, 9, "memset: dst=" << dst << ", val=" << val << ", bytes=" << sz); - - // call the system one to do the actual work ~safely. - return memset(dst, val, sz); -}