)
])
-dnl check that we have functional CPU clock access for the profiler
-dnl sets squid_cv_profiler_works to "yes" or "no"
-
-AC_DEFUN([SQUID_CHECK_FUNCTIONAL_CPU_PROFILER],[
- AC_CACHE_CHECK([for operational CPU clock access],
- squid_cv_cpu_profiler_works,
- AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
-#include <ctime>
-#if defined(__GNUC__) && ( defined(__i386) || defined(__i386__) )
-// okay
-#elif defined(__GNUC__) && ( defined(__x86_64) || defined(__x86_64__) )
-// okay
-#elif defined(__GNUC__) && defined(__alpha)
-// okay
-#elif defined(_M_IX86) && defined(_MSC_VER) /* x86 platform on Microsoft C Compiler ONLY */
-// okay
-#elif defined(HAVE_CLOCK_GETTIME_NSEC_NP) && defined(CLOCK_MONOTONIC_RAW)
-// okay
-#else
-#error This CPU is unsupported. No profiling available here.
-#endif
- ]])],[
- squid_cv_cpu_profiler_works=yes],[
- squid_cv_cpu_profiler_works=no])
- )
-])
-
dnl check whether recv takes a char* or void* as a second argument
AC_DEFUN([SQUID_CHECK_RECV_ARG_TYPE],[
AC_CACHE_CHECK([whether recv takes a pointer to void or char as second argument],
#include "squid.h"
#include "compat/xalloc.h"
-#include "profiler/Profiler.h"
#if XMALLOC_STATISTICS
#define XMS_DBG_MAXSIZE (1024*1024)
void *
xcalloc(size_t n, size_t sz)
{
- PROF_start(xcalloc);
-
if (n < 1)
n = 1;
if (sz < 1)
sz = 1;
- PROF_start(calloc);
void *p = calloc(n, sz);
- PROF_stop(calloc);
if (p == NULL) {
if (failure_notify) {
malloc_stat(sz * n);
#endif
- PROF_stop(xcalloc);
return p;
}
void *
xmalloc(size_t sz)
{
- PROF_start(xmalloc);
-
if (sz < 1)
sz = 1;
- PROF_start(malloc);
void *p = malloc(sz);
- PROF_stop(malloc);
if (p == NULL) {
if (failure_notify) {
malloc_stat(sz);
#endif
- PROF_stop(xmalloc);
return (p);
}
void *
xrealloc(void *s, size_t sz)
{
- PROF_start(xrealloc);
-
if (sz < 1)
sz = 1;
- PROF_start(realloc);
void *p= realloc(s, sz);
- PROF_stop(realloc);
if (p == NULL) {
if (failure_notify) {
malloc_stat(sz);
#endif
- PROF_stop(xrealloc);
return (p);
}
{
void *s = const_cast<void *>(s_const);
- PROF_start(free_const);
- PROF_start(free);
free(s);
- PROF_stop(free);
- PROF_stop(free_const);
}
[Print stack traces on fatal errors])
AC_MSG_NOTICE([Automatically print stack trace on fatal errors: $enable_stacktraces])
-
-# CPU Profiling options handling
-AC_ARG_ENABLE(cpu-profiling,
- AS_HELP_STRING([--enable-cpu-profiling],
- [Enable instrumentation to try and understand how CPU power
- is spent by squid, by enabling specific probes in selected
- functions.
- New probes can only be added by modifying the source code.
- It is meant to help developers in optimizing performance
- of Squid internal functions.
- If you are not developer you should not enable this,
- as it slows squid down somewhat.
- See lib/Profiler.c for more details.]), [
-SQUID_YESNO([$enableval],
- [unrecognized argument to --enable-cpu-profiling: $enableval])
-])
-# Default OFF. This is a debug feature. Only check and enable if forced ON.
-if test "x$enable_cpu_profiling" = "xyes"; then
- AC_CHECK_FUNCS(clock_gettime_nsec_np)
- SQUID_CHECK_FUNCTIONAL_CPU_PROFILER
- if test "x$squid_cv_cpu_profiler_works" = "xno"; then
- AC_MSG_ERROR([CPU profiling will not be functional in this build.])
- fi
-fi
-SQUID_DEFINE_BOOL(USE_XPROF_STATS,${enable_cpu_profiling:=no},
- [Define to enable CPU profiling within Squid])
-AM_CONDITIONAL(ENABLE_XPROF_STATS,
- test "x$enable_cpu_profiling" = "xyes")
-AC_MSG_NOTICE([CPU profiling enabled: $enable_cpu_profiling])
-
# Enable X-Accelerator-Vary for Vary support within an accelerator setup
AC_ARG_ENABLE(x-accelerator-vary,
AS_HELP_STRING([--enable-x-accelerator-vary],
lib/libTrie/Makefile
lib/libTrie/test/Makefile
lib/ntlmauth/Makefile
- lib/profiler/Makefile
lib/rfcnb/Makefile
lib/smblib/Makefile
lib/snmplib/Makefile
<sect1>Removed options<label id="removedoptions">
<p>
<descrip>
- <p>There have been no options changed.
+ <tag>--enable-cpu-profiling</tag>
+ <p>This feature has been unreliable for many years. Other tools such as
+ oprofile provide better tracking and should be used instead.
</descrip>
include $(top_srcdir)/src/Common.am
-DIST_SUBDIRS = ntlmauth profiler rfcnb smblib libTrie snmplib
+DIST_SUBDIRS = ntlmauth rfcnb smblib libTrie snmplib
SUBDIRS=
EXTRA_DIST=
if ENABLE_SNMP
SUBDIRS += snmplib
endif
-if ENABLE_XPROF_STATS
-SUBDIRS += profiler
-endif
install: all
install-strip: all
#include "squid.h"
#include "hash.h"
-#include "profiler/Profiler.h"
#include <cassert>
#include <cmath>
hash_lookup(hash_table * hid, const void *k)
{
int b;
- PROF_start(hash_lookup);
assert(k != NULL);
b = hid->hash(k, hid->size);
for (hash_link *walker = hid->buckets[b]; walker != NULL; walker = walker->next) {
if ((hid->cmp) (k, walker->key) == 0) {
- PROF_stop(hash_lookup);
return (walker);
}
assert(walker != walker->next);
}
- PROF_stop(hash_lookup);
return NULL;
}
+++ /dev/null
-## Copyright (C) 1996-2021 The Squid Software Foundation and contributors
-##
-## Squid software is distributed under GPLv2+ license and includes
-## contributions from numerous individuals and organizations.
-## Please see the COPYING and CONTRIBUTORS files for details.
-##
-
-include $(top_srcdir)/src/Common.am
-include $(top_srcdir)/src/TestHeaders.am
-
-XPROFSRC= \
- get_tick.h \
- Profiler.cc \
- Profiler.h \
- xprof_type.h
-
-if ENABLE_XPROF_STATS
-libprofiler_la_SOURCES = $(XPROFSRC)
-noinst_LTLIBRARIES = libprofiler.la
-else
-EXTRA_DIST = $(XPROFSRC)
-endif
+++ /dev/null
-/*
- * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
- *
- * Squid software is distributed under GPLv2+ license and includes
- * contributions from numerous individuals and organizations.
- * Please see the COPYING and CONTRIBUTORS files for details.
- */
-
-/* DEBUG: section 81 CPU Profiling Routines */
-
-/**
- * CPU Profiling implementation.
- *
- * \par
- * This library implements the Probes needed to gather stats.
- * See src/ProfStats.c which implements historical recording and
- * presentation in CacheMgr.cgi.
- *
- * \par
- * For timing we prefer on-CPU ops that retrieve cpu ticks counter.
- * For Intel, this is "rdtsc", which is 64-bit counter that virtually
- * never wraps. For alpha, this is "rpcc" which is 32-bit counter and
- * wraps every few seconds. Currently, no handling of wrapping counters
- * is implemented. Other CPU's are also not covered. Potentially all
- * modern CPU's has similar counters.
- *
- * Usage.
- * Insert macro PROF_state(probename) in strategic places in code.
- * PROF_start(probename);
- * ... section of code measured ...
- * PROF_stop(probename);
- *
- * probename must be added to the xprof_type.h enum list
- * with prepended "XPROF_" string.
- *
- * \section description Description.
- * \par PROF
- * gathers stats per probename into structures. It indexes these
- * structures by enum type index in an array.
- *
- * \par PROF
- * records best, best, average and worst values for delta time,
- * also, if UNACCED is defined, it measures "empty" time during which
- * no probes are in measuring state. This allows to see time "unaccounted"
- * for. If OVERHEAD is defined, additional calculations are made at every
- * probe to measure approximate overhead of the probe code itself.
- *
- * \par
- * Probe data is stored in linked-list, so the more probes you define,
- * the more overhead is added to find the deepest nested probe. To reduce
- * average overhead, linked list is manipulated each time PR_start is
- * called, so that probe just started is moved 1 position up in linkedlist.
- * This way frequently used probes are moved closer to the head of list,
- * reducing average overhead.
- * Note that all overhead is on the scale of one hundred of CPU clock
- * ticks, which on the scale of submicroseconds. Yet, to optimise really
- * fast and frequent sections of code, we want to reduce this overhead
- * to absolute minimum possible.
- *
- * \par
- * For actual measurements, probe overhead cancels out mostly. Still,
- * do not take the measured times as facts, they should be viewed in
- * relative comparison to overall CPU time and on the same platform.
- *
- * \par
- * Every 1 second, Event within squid is called that parses gathered
- * statistics of every probe, and accumulates that into historical
- * structures for last 1,5,30 secs, 1,5,30 mins, and 1,5 and 24 hours.
- * Each second active probe stats are reset, and only historical data
- * is presented in cachemgr output.
- *
- * \section reading Reading stats.
- * \par
- * "Worst case" may be misleading. Anything can happen at any section
- * of code that could delay reaching to probe stop. For eg. system may
- * need to service interrupt routine, task switch could occur, or page
- * fault needs to be handled. In this sense, this is quite meaningless
- * metric. "Best case" shows fastest completion of probe section, and
- * is also somewhat useless, unless you know that amount of work is
- * constant. Best metric to watch is "average time" and total cumulated
- * time in given timeframe, which really show percentage of time spent
- * in given section of code, and its average completion time. This data
- * could be used to detect bottlenecks within squid and optimise them.
- *
- * \par
- * TOTALS are quite off reality. Its there just to summarise cumulative
- * times and percent column. Percent values over 100% shows that there
- * have been some probes nested into each other.
- *
- */
-
-#include "squid.h"
-#include "profiler/Profiler.h"
-
-#if USE_XPROF_STATS
-
-#include <cassert>
-#if HAVE_GNUMALLLOC_H
-#include <gnumalloc.h>
-#elif HAVE_MALLOC_H
-#include <malloc.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-/* Exported Data */
-TimersArray *xprof_Timers = NULL;
-
-/* Private stuff */
-
-/* new stuff */
-#define MAXSTACKDEPTH 512
-
-struct _callstack_entry {
- int timer; /* index into timers array */
- const char *name;
- hrtime_t start, stop, accum;
-};
-
-struct _callstack_entry cstack[MAXSTACKDEPTH];
-int cstack_head = 0;
-
-#if defined(_MSC_VER) /* Microsoft C Compiler ONLY */
-static __inline void
-#else
-static inline void
-#endif
-xprof_update(xprof_stats_data * head)
-{
- if (head->delta < head->best)
- head->best = head->delta;
- if (head->worst < head->delta)
- head->worst = head->delta;
- head->summ += head->delta;
- ++head->count;
-}
-
-static xprof_stats_data *xp_UNACCOUNTED;
-static int xprof_inited = 0;
-
-static void
-xprof_InitLib(void)
-{
- if (xprof_inited)
- return;
-
- xprof_Timers = static_cast<TimersArray *>(calloc(XPROF_LAST + 2, sizeof(xprof_stats_node)));
-
- xprof_Timers[XPROF_PROF_UNACCOUNTED]->name = "PROF_UNACCOUNTED";
- xprof_Timers[XPROF_PROF_UNACCOUNTED]->accu.start = get_tick();
- xp_UNACCOUNTED = &xprof_Timers[XPROF_PROF_UNACCOUNTED]->accu;
- cstack_head = 0;
- xprof_inited = 1;
-}
-
-void
-xprof_start(xprof_type type, const char *timer)
-{
- hrtime_t tt = get_tick();
- if (!xprof_inited)
- xprof_InitLib();
-
- /* If nested, stop current stack frame */
- if (cstack_head > 0) {
- cstack[cstack_head - 1].accum += get_tick() - cstack[cstack_head - 1].start;
- cstack[cstack_head - 1].start = -1;
- }
-
- /* Are we at the first level? If so; stop the unaccounted timer */
- if (cstack_head == 0) {
- assert(xp_UNACCOUNTED->start != -1);
- xp_UNACCOUNTED->delta = tt - xp_UNACCOUNTED->start;
- xp_UNACCOUNTED->start = -1;
- xprof_update(xp_UNACCOUNTED);
- }
-
- /* Allocate new stack frame */
- cstack[cstack_head].start = tt;
- cstack[cstack_head].stop = -1;
- cstack[cstack_head].accum = 0;
- cstack[cstack_head].timer = type;
- cstack[cstack_head].name = timer;
- ++cstack_head;
- assert(cstack_head < MAXSTACKDEPTH);
-
-}
-
-void
-xprof_stop(xprof_type type, const char *timer)
-{
- hrtime_t tt = get_tick();
- assert(cstack_head > 0);
- --cstack_head;
- assert(cstack[cstack_head].timer == type);
-
- /* Record timer details */
- cstack[cstack_head].accum += tt - cstack[cstack_head].start;
- xprof_Timers[type]->accu.delta = cstack[cstack_head].accum;
- xprof_Timers[type]->name = timer;
-
- /* Update */
- xprof_update(&xprof_Timers[type]->accu);
-
- /* Restart previous timer if we're not at the top level */
- if (cstack_head > 0) {
- cstack[cstack_head - 1].start = tt;
- cstack[cstack_head - 1].stop = 0;
- return;
- }
- /* Get here? We're at the top level; unaccounted */
- xp_UNACCOUNTED->start = tt;
-}
-
-#endif /* USE_XPROF_STATS */
-
+++ /dev/null
-/*
- * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
- *
- * Squid software is distributed under GPLv2+ license and includes
- * contributions from numerous individuals and organizations.
- * Please see the COPYING and CONTRIBUTORS files for details.
- */
-
-#ifndef _PROFILER_H_
-#define _PROFILER_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// NP: CPU support for get_tick() determines whether we can profile.
-// always include get_tick.h first since it may undefine USE_XPROF_STATS
-
-#include "profiler/get_tick.h"
-#include "profiler/xprof_type.h"
-
-#if !USE_XPROF_STATS
-
-#define PROF_start(probename) ((void)0)
-#define PROF_stop(probename) ((void)0)
-
-#else /* USE_XPROF_STATS */
-
-#define XP_NOBEST (hrtime_t)-1
-
-typedef struct _xprof_stats_node xprof_stats_node;
-
-typedef struct _xprof_stats_data xprof_stats_data;
-
-struct _xprof_stats_data {
- hrtime_t start;
- hrtime_t stop;
- hrtime_t delta;
- hrtime_t best;
- hrtime_t worst;
- hrtime_t count;
- hrtime_t accum;
- int64_t summ;
-};
-
-struct _xprof_stats_node {
- const char *name;
- xprof_stats_data accu;
- xprof_stats_data hist;
-};
-
-typedef xprof_stats_node TimersArray[1];
-
-/* public Data */
-extern TimersArray *xprof_Timers;
-
-/* Exported functions */
-extern void xprof_start(xprof_type type, const char *timer);
-extern void xprof_stop(xprof_type type, const char *timer);
-extern void xprof_event(void *data);
-
-#define PROF_start(probename) xprof_start(XPROF_##probename, #probename)
-#define PROF_stop(probename) xprof_stop(XPROF_##probename, #probename)
-
-#endif /* USE_XPROF_STATS */
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _PROFILING_H_ */
-
+++ /dev/null
-/*
- * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
- *
- * Squid software is distributed under GPLv2+ license and includes
- * contributions from numerous individuals and organizations.
- * Please see the COPYING and CONTRIBUTORS files for details.
- */
-
-#ifndef _PROFILER_GET_TICK_H_
-#define _PROFILER_GET_TICK_H_
-
-#if USE_XPROF_STATS
-#include <ctime>
-
-/*
- * Ensure that any changes here are synchronised with SQUID_CHECK_FUNCTIONAL_CPU_PROFILER
- */
-
-#if !_SQUID_SOLARIS_
-typedef int64_t hrtime_t;
-#endif
-
-#if defined(__GNUC__) && ( defined(__i386) || defined(__i386__) )
-static inline hrtime_t
-get_tick(void)
-{
- hrtime_t regs;
-
- asm volatile ("rdtsc":"=A" (regs));
- return regs;
- /* We need return value, we rely on CC to optimise out needless subf calls */
- /* Note that "rdtsc" is relatively slow OP and stalls the CPU pipes, so use it wisely */
-}
-
-#elif defined(__GNUC__) && ( defined(__x86_64) || defined(__x86_64__) )
-static inline hrtime_t
-get_tick(void)
-{
- uint32_t lo, hi;
- // Based on an example in Wikipedia
- /* We cannot use "=A", since this would use %rax on x86_64 */
- asm volatile ("rdtsc" : "=a" (lo), "=d" (hi));
- return (hrtime_t)hi << 32 | lo;
-}
-
-#elif defined(__GNUC__) && defined(__alpha)
-static inline hrtime_t
-get_tick(void)
-{
- hrtime_t regs;
-
- asm volatile ("rpcc %0" : "=r" (regs));
- return regs;
-}
-
-#elif defined(_M_IX86) && defined(_MSC_VER) /* x86 platform on Microsoft C Compiler ONLY */
-static __inline hrtime_t
-get_tick(void)
-{
- hrtime_t regs;
-
- __asm {
- cpuid
- rdtsc
- mov eax,DWORD PTR regs[0]
- mov edx,DWORD PTR regs[4]
- }
- return regs;
-}
-
-#elif defined(HAVE_CLOCK_GETTIME_NSEC_NP) && defined(CLOCK_MONOTONIC_RAW)
-
-static inline hrtime_t
-get_tick()
-{
- return clock_gettime_nsec_np(CLOCK_MONOTONIC_RAW);
-}
-
-#else
-/* This CPU is unsupported. Short-circuit, no profiling here */
-// #error for configure tests to prevent library construction
-#error This CPU is unsupported. No profiling available here.
-#endif
-
-#endif /* USE_XPROF_STATS */
-#endif /* _PROFILING_H_ */
-
+++ /dev/null
-/*
- * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
- *
- * Squid software is distributed under GPLv2+ license and includes
- * contributions from numerous individuals and organizations.
- * Please see the COPYING and CONTRIBUTORS files for details.
- */
-
-#ifndef _PROFILER_XPROF_TYPE_H_
-#define _PROFILER_XPROF_TYPE_H_
-/* AUTO-GENERATED FILE */
-#if USE_XPROF_STATS
-typedef enum {
- XPROF_PROF_UNACCOUNTED,
- XPROF_aclCheckFast,
- XPROF_ACL_matches,
- XPROF_calloc,
- XPROF_clientSocketRecipient,
- XPROF_comm_accept,
- XPROF_comm_check_incoming,
- XPROF_comm_close,
- XPROF_comm_connect_addr,
- XPROF_comm_handle_ready_fd,
- XPROF_commHandleWrite,
- XPROF_comm_open,
- XPROF_comm_poll_normal,
- XPROF_comm_poll_prep_pfds,
- XPROF_comm_read_handler,
- XPROF_comm_udp_sendto,
- XPROF_comm_write_handler,
- XPROF_diskHandleRead,
- XPROF_diskHandleWrite,
- XPROF_esiExpressionEval,
- XPROF_esiParsing,
- XPROF_esiProcessing,
- XPROF_eventRun,
- XPROF_file_close,
- XPROF_file_open,
- XPROF_file_read,
- XPROF_file_write,
- XPROF_free,
- XPROF_free_const,
- XPROF_hash_lookup,
- XPROF_headersEnd,
- XPROF_HttpHeaderClean,
- XPROF_HttpHeader_getCc,
- XPROF_HttpHeaderParse,
- XPROF_HttpMsg_httpMsgParseStep,
- XPROF_HttpParserParseReplyLine,
- XPROF_HttpParserParseReqLine,
- XPROF_httpRequestFree,
- XPROF_HttpServer_parseOneRequest,
- XPROF_httpStart,
- XPROF_HttpStateData_processReplyBody,
- XPROF_HttpStateData_processReplyHeader,
- XPROF_InvokeHandlers,
- XPROF_malloc,
- XPROF_MemBuf_append,
- XPROF_MemBuf_consume,
- XPROF_MemBuf_consumeWhitespace,
- XPROF_MemBuf_grow,
- XPROF_mem_hdr_write,
- XPROF_MemObject_write,
- XPROF_PROF_OVERHEAD,
- XPROF_read,
- XPROF_realloc,
- XPROF_recv,
- XPROF_send,
- XPROF_SignalEngine_checkEvents,
- XPROF_storeClient_kickReads,
- XPROF_storeDirCallback,
- XPROF_StoreEntry_write,
- XPROF_storeGetMemSpace,
- XPROF_storeMaintainSwapSpace,
- XPROF_storeRelease,
- XPROF_StringAllocAndFill,
- XPROF_StringAppend,
- XPROF_StringClean,
- XPROF_StringInitBuf,
- XPROF_StringReset,
- XPROF_write,
- XPROF_xcalloc,
- XPROF_xmalloc,
- XPROF_xrealloc,
- XPROF_LAST
-} xprof_type;
-#endif
-#endif
-
run_ processDebugMessages || return
}
-# Build XPROF types file from current sources
-(
-cat scripts/boilerplate.h
-echo "#ifndef _PROFILER_XPROF_TYPE_H_"
-echo "#define _PROFILER_XPROF_TYPE_H_"
-echo "/* AUTO-GENERATED FILE */"
-echo "#if USE_XPROF_STATS"
-echo "typedef enum {"
-echo " XPROF_PROF_UNACCOUNTED,"
-grep -R -h "PROF_start.*" ./* | grep -v probename | sed -e 's/ //g; s/PROF_start(/ XPROF_/; s/);/,/;' | sort -u
-echo " XPROF_LAST"
-echo "} xprof_type;"
-echo "#endif"
-echo "#endif"
-echo ""
-) >lib/profiler/list
-mv lib/profiler/list lib/profiler/xprof_type.h
-
printAmFile ()
{
sed -e 's%\ \*%##%; s%/\*%##%; s%##/%##%' < scripts/boilerplate.h
USE_WCCP \
USE_WCCPv2 \
USE_WIN32_SERVICE \
- USE_XPROF_STATS \
WITH_VALGRIND \
X_ACCELERATOR_VARY
## XXX: Do we really need this? Does auto-dependency tracking work?
$(OBJS): $(top_srcdir)/include/version.h $(top_builddir)/include/autoconf.h
-## Internal profiler is used even by some of the compat library stuff.
-if ENABLE_XPROF_STATS
-LIBPROFILER = $(top_builddir)/lib/profiler/libprofiler.la
-else
-LIBPROFILER=
-endif
-
## Because compatibility is almost universal. And the link order is important.
COMPAT_LIB = $(top_builddir)/compat/libcompatsquid.la $(LIBPROFILER)
#include "MemBuf.h"
#include "mgr/Registration.h"
#include "mime_header.h"
-#include "profiler/Profiler.h"
#include "rfc1123.h"
#include "sbuf/StringConvert.h"
#include "SquidConfig.h"
assert(owner > hoNone && owner < hoEnd);
debugs(55, 7, "cleaning hdr: " << this << " owner: " << owner);
- PROF_start(HttpHeaderClean);
-
if (owner <= hoReply) {
/*
* An unfortunate bug. The entries array is initialized
len = 0;
conflictingContentLength_ = false;
teUnsupported_ = false;
- PROF_stop(HttpHeaderClean);
}
/* append entries (also see httpHeaderUpdate) */
const char *header_end = header_start + hdrLen; // XXX: remove
int warnOnError = (Config.onoff.relaxed_header_parser <= 0 ? DBG_IMPORTANT : 2);
- PROF_start(HttpHeaderParse);
-
assert(header_start && header_end);
debugs(55, 7, "parsing hdr: (" << this << ")" << std::endl << getStringPrefix(header_start, hdrLen));
++ HttpHeaderStats[owner].parsedCount;
if ((nulpos = (char*)memchr(header_start, '\0', hdrLen))) {
debugs(55, DBG_IMPORTANT, "WARNING: HTTP header contains NULL characters {" <<
getStringPrefix(header_start, nulpos-header_start) << "}\nNULL\n{" << getStringPrefix(nulpos+1, hdrLen-(nulpos-header_start)-1));
- PROF_stop(HttpHeaderParse);
clean();
return 0;
}
if (!field_ptr) {
// missing <LF>
- PROF_stop(HttpHeaderParse);
clean();
return 0;
}
debugs(55, DBG_IMPORTANT, "SECURITY WARNING: Rejecting HTTP request with a CR+ "
"header field to prevent request smuggling attacks: {" <<
getStringPrefix(header_start, hdrLen) << "}");
- PROF_stop(HttpHeaderParse);
clean();
return 0;
}
++p;
}
} else {
- PROF_stop(HttpHeaderParse);
clean();
return 0;
}
if (this_line + 1 == field_end && this_line > field_start) {
debugs(55, warnOnError, "WARNING: Blank continuation line in HTTP header {" <<
getStringPrefix(header_start, hdrLen) << "}");
- PROF_stop(HttpHeaderParse);
clean();
return 0;
}
if (field_ptr < header_end) {
debugs(55, warnOnError, "WARNING: unparsable HTTP header field near {" <<
getStringPrefix(field_start, hdrLen-(field_start-header_start)) << "}");
- PROF_stop(HttpHeaderParse);
clean();
return 0;
}
getStringPrefix(field_start, field_end-field_start) << "}");
debugs(55, warnOnError, " in {" << getStringPrefix(header_start, hdrLen) << "}");
- PROF_stop(HttpHeaderParse);
clean();
return 0;
}
if (!hasBareCr) // already warned about bare CRs
debugs(55, warnOnError, "WARNING: obs-fold in framing-sensitive " << e->name << ": " << e->value);
delete e;
- PROF_stop(HttpHeaderParse);
clean();
return 0;
}
if (Config.onoff.relaxed_header_parser)
continue; // clen has printed any necessary warnings
- PROF_stop(HttpHeaderParse);
clean();
return 0;
}
}
}
- PROF_stop(HttpHeaderParse);
return 1; /* even if no fields where found, it is a valid header */
}
{
if (!CBIT_TEST(mask, Http::HdrType::CACHE_CONTROL))
return NULL;
- PROF_start(HttpHeader_getCc);
String s;
getList(Http::HdrType::CACHE_CONTROL, &s);
httpHeaderNoteParsedEntry(Http::HdrType::CACHE_CONTROL, s, !cc);
- PROF_stop(HttpHeader_getCc);
-
return cc;
}
DELAY_POOL_SOURCE =
endif
-if ENABLE_XPROF_STATS
-XPROF_STATS_SOURCE = ProfStats.cc
-else
-XPROF_STATS_SOURCE =
-endif
-
if ENABLE_HTCP
HTCPSOURCE = htcp.cc htcp.h
endif
$(UNLINKDSOURCE) \
$(WIN32_SOURCE) \
$(WINSVC_SOURCE) \
- $(XPROF_STATS_SOURCE) \
AccessLogEntry.cc \
AccessLogEntry.h \
AsyncEngine.cc \
$(WIN32_ALL_SOURCE) \
$(all_AUTHMODULES) \
ConfigOption.h \
- ProfStats.cc \
htcp.cc \
htcp.h \
ipc.cc \
#include "squid.h"
#include "mem/forward.h"
#include "MemBuf.h"
-#include "profiler/Profiler.h"
/* local constants */
assert(0 <= shiftSize && shiftSize <= cSize);
assert(!stolen); /* not frozen */
- PROF_start(MemBuf_consume);
if (shiftSize > 0) {
if (shiftSize < cSize)
memmove(buf, buf + shiftSize, cSize - shiftSize);
terminate();
}
- PROF_stop(MemBuf_consume);
}
/// removes all whitespace prefix bytes and "packs" by moving content left
void MemBuf::consumeWhitespacePrefix()
{
- PROF_start(MemBuf_consumeWhitespace);
if (contentSize() > 0) {
const char *end = buf + contentSize();
const char *p = buf;
if (p-buf > 0)
consume(p-buf);
}
- PROF_stop(MemBuf_consumeWhitespace);
}
// removes last tailSize bytes
assert(buf || (0==capacity && 0==size));
assert(!stolen); /* not frozen */
- PROF_start(MemBuf_append);
if (sz > 0) {
if (size + sz + 1 > capacity)
grow(size + sz + 1);
memcpy(space(), newContent, sz);
appended(sz);
}
- PROF_stop(MemBuf_append);
}
/// updates content size after external append
assert(!stolen);
assert(capacity < min_cap);
- PROF_start(MemBuf_grow);
-
/* determine next capacity */
if (min_cap > 64 * 1024) {
/* done */
capacity = (mb_size_t) buf_cap;
- PROF_stop(MemBuf_grow);
}
/* Reports */
#include "HttpReply.h"
#include "MemBuf.h"
#include "MemObject.h"
-#include "profiler/Profiler.h"
#include "SquidConfig.h"
#include "Store.h"
#include "StoreClient.h"
void
MemObject::write(const StoreIOBuffer &writeBuffer)
{
- PROF_start(MemObject_write);
debugs(19, 6, "memWrite: offset " << writeBuffer.offset << " len " << writeBuffer.length);
/* We don't separate out mime headers yet, so ensure that the first
assert (data_hdr.endOffset() || writeBuffer.offset == 0);
assert (data_hdr.write (writeBuffer));
- PROF_stop(MemObject_write);
}
void
+++ /dev/null
-/*
- * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
- *
- * Squid software is distributed under GPLv2+ license and includes
- * contributions from numerous individuals and organizations.
- * Please see the COPYING and CONTRIBUTORS files for details.
- */
-
-/* DEBUG: section 81 CPU Profiling Routines */
-
-#include "squid.h"
-
-#if USE_XPROF_STATS
-
-#include "event.h"
-#include "mgr/Registration.h"
-#include "profiler/Profiler.h"
-#include "SquidMath.h"
-#include "Store.h"
-
-/* Private stuff */
-
-#define MAX_SORTLIST 200
-
-static hrtime_t xprof_delta = 0;
-static hrtime_t xprof_start_t = 0;
-static hrtime_t xprof_verystart = 0;
-static hrtime_t xprof_average_delta = 0;
-static int xprof_events = 0;
-static int xprof_inited = 0;
-static xprof_stats_data Totals;
-
-static TimersArray *xprof_stats_avg1sec = NULL;
-static TimersArray *xprof_stats_avg5sec = NULL;
-static TimersArray *xprof_stats_avg30sec = NULL;
-static TimersArray *xprof_stats_avg1min = NULL;
-static TimersArray *xprof_stats_avg5min = NULL;
-static TimersArray *xprof_stats_avg30min = NULL;
-static TimersArray *xprof_stats_avg1hour = NULL;
-static TimersArray *xprof_stats_avg5hour = NULL;
-static TimersArray *xprof_stats_avg24hour = NULL;
-
-static xprof_stats_node *sortlist[XPROF_LAST + 2];
-static void xprof_summary(StoreEntry * sentry);
-
-static void
-xprof_reset(xprof_stats_data * head)
-{
- head->summ = 0;
- head->count = 0;
- head->delta = 0;
- head->best = XP_NOBEST;
- head->worst = 0;
- head->start = 0;
- head->stop = 0;
-}
-
-static void
-xprof_move(xprof_stats_data * head, xprof_stats_data * hist)
-{
- memcpy(hist, head, sizeof(xprof_stats_data));
-}
-
-static int
-xprof_comp(const void *A, const void *B)
-{
- const xprof_stats_node *ii = *(static_cast<const xprof_stats_node * const *>(A));
- const xprof_stats_node *jj = *(static_cast<const xprof_stats_node * const *>(B));
-
- if (ii->hist.summ < jj->hist.summ)
- return (1);
-
- if (ii->hist.summ > jj->hist.summ)
- return (-1);
-
- return (0);
-}
-
-static void
-xprof_sorthist(TimersArray * xprof_list)
-{
- for (int i = 0; i < XPROF_LAST; ++i) {
- sortlist[i] = xprof_list[i];
- }
-
- qsort(&sortlist[XPROF_PROF_UNACCOUNTED+1], XPROF_LAST - XPROF_PROF_UNACCOUNTED+1, sizeof(xprof_stats_node *), xprof_comp);
-}
-
-static double time_frame;
-
-static void
-xprof_show_item(StoreEntry * sentry, const char *name, xprof_stats_data * hist)
-{
- storeAppendPrintf(sentry,
- "%s\t %" PRIu64 "\t %" PRIu64 "\t %" PRIu64 "\t %" PRIu64 "\t %" PRIu64 "\t %.2f\t %6.3f\t\n",
- name,
- hist->count,
- hist->summ,
- (hist->best != XP_NOBEST ? hist->best : 0),
- hist->count ? hist->summ / hist->count : 0,
- hist->worst,
- hist->count / time_frame,
- Math::doublePercent((double) hist->summ, (double) hist->delta));
-}
-
-static void
-xprof_summary_item(StoreEntry * sentry, char const *descr, TimersArray * list)
-{
- int i;
- xprof_stats_node **hist;
- xprof_stats_data *show;
- xprof_reset(&Totals);
- xprof_sorthist(list);
- hist = &sortlist[0];
-
- show = &hist[0]->hist;
-
- if (!hist[0]->hist.delta)
- show = &hist[0]->accu;
-
- time_frame = (double) show->delta / (double) xprof_average_delta;
-
- storeAppendPrintf(sentry, "\n%s:", descr);
-
- storeAppendPrintf(sentry, " (Cumulated time: %" PRIu64 ", %.2f sec)\n",
- show->delta,
- time_frame
- );
-
- storeAppendPrintf(sentry,
- "Probe Name\t Events\t cumulated time \t best case \t average \t worst case\t Rate / sec \t %% in int\n");
-
- for (i = 0; i < XPROF_LAST; ++i) {
- if (!hist[i]->name)
- continue;
-
- show = &hist[i]->hist;
-
- if (!show->count)
- continue;
-
- xprof_show_item(sentry, hist[i]->name, show);
-
- Totals.count += show->count;
-
- Totals.summ += show->summ;
-
- Totals.best += (show->best != XP_NOBEST ? show->best : 0);
-
- Totals.worst += show->worst;
-
- Totals.delta = (show->delta > Totals.delta ? show->delta : Totals.delta);
- }
-
- xprof_show_item(sentry, "TOTALS", &Totals);
-}
-
-static void
-xprof_average(TimersArray ** list, int secs)
-{
- int i;
- TimersArray *head = xprof_Timers;
- TimersArray *hist;
- hrtime_t now;
- hrtime_t keep;
- int doavg = (xprof_events % secs);
-
- if (!*list)
- *list = (TimersArray *)xcalloc(XPROF_LAST, sizeof(xprof_stats_node));
-
- hist = *list;
-
- now = get_tick();
-
- for (i = 0; i < XPROF_LAST; ++i) {
- hist[i]->name = head[i]->name;
- hist[i]->accu.summ += head[i]->accu.summ;
- hist[i]->accu.count += head[i]->accu.count; /* accumulate multisec */
-
- if (!hist[i]->accu.best)
- hist[i]->accu.best = head[i]->accu.best;
-
- if (hist[i]->accu.best > head[i]->accu.best)
- hist[i]->accu.best = head[i]->accu.best;
-
- if (hist[i]->accu.worst < head[i]->accu.worst)
- hist[i]->accu.worst = head[i]->accu.worst;
-
- hist[i]->accu.delta += xprof_delta;
-
- if (!doavg) {
- /* we have X seconds accumulated */
- xprof_move(&hist[i]->accu, &hist[i]->hist);
- xprof_reset(&hist[i]->accu);
-
- hist[i]->accu.start = now;
- }
-
- /* reset 0sec counters */
- if (secs == 1) {
- keep = head[i]->accu.start;
- xprof_move(&head[i]->accu, &head[i]->hist);
- xprof_reset(&head[i]->accu);
- hist[i]->accu.delta = 0;
- head[i]->accu.start = keep;
- }
- }
-}
-
-void
-xprof_summary(StoreEntry * sentry)
-{
- hrtime_t now = get_tick();
-
- storeAppendPrintf(sentry, "CPU Profiling Statistics:\n");
- storeAppendPrintf(sentry,
- " (CPU times are in arbitrary units, most probably in CPU clock ticks)\n");
- storeAppendPrintf(sentry,
- "Probe Name\t Event Count\t last Interval \t Avg Interval \t since squid start \t (since system boot) \n");
- storeAppendPrintf(sentry, "Total\t %lu\t %" PRIu64 " \t %" PRIu64 " \t %" PRIu64 " \t %" PRIu64 "\n",
- (long unsigned) xprof_events,
- xprof_delta,
- xprof_average_delta,
- now - xprof_verystart,
- now);
-
- xprof_summary_item(sentry, "Last 1 sec averages", xprof_stats_avg1sec);
- xprof_summary_item(sentry, "Last 5 sec averages", xprof_stats_avg5sec);
- xprof_summary_item(sentry, "Last 30 sec averages", xprof_stats_avg30sec);
- xprof_summary_item(sentry, "Last 1 min averages", xprof_stats_avg1min);
- xprof_summary_item(sentry, "Last 5 min averages", xprof_stats_avg5min);
- xprof_summary_item(sentry, "Last 30 min averages", xprof_stats_avg30min);
- xprof_summary_item(sentry, "Last 1 hour averages", xprof_stats_avg1hour);
- xprof_summary_item(sentry, "Last 5 hour averages", xprof_stats_avg5hour);
- xprof_summary_item(sentry, "Last 24 hour averages", xprof_stats_avg24hour);
-}
-
-static inline void
-xprof_chk_overhead(int samples)
-{
- while (samples--) {
- PROF_start(PROF_OVERHEAD);
- PROF_stop(PROF_OVERHEAD);
- }
-}
-
-static void
-xprofRegisterWithCacheManager(void)
-{
- Mgr::RegisterAction("cpu_profile", "CPU Profiling Stats", xprof_summary, 0, 1);
-}
-
-static hrtime_t now;
-
-// TODO: this gets called once per event. Make it only happen when enabling xprof.
-static void
-xprof_Init(void)
-{
- if (xprof_inited)
- return;
-
- xprof_delta = xprof_verystart = xprof_start_t = now;
-
- xprof_inited = 1;
-
- xprofRegisterWithCacheManager(); //moved here so it's not double-init'ed
-}
-
-void
-xprof_event(void *data)
-{
- now = get_tick();
- xprof_Init();
- xprof_delta = now - xprof_start_t;
- xprof_start_t = now;
- ++xprof_events;
-
- if (!xprof_average_delta)
- xprof_average_delta = xprof_delta;
-
- if (xprof_average_delta > (xprof_delta >> 1))
- xprof_average_delta = xprof_average_delta - (xprof_average_delta >> 8) + (xprof_delta >> 8);
-
- xprof_chk_overhead(2);
-
- xprof_average(&xprof_stats_avg24hour, 24 * 3600);
-
- xprof_average(&xprof_stats_avg5hour, 5 * 3600);
-
- xprof_average(&xprof_stats_avg1hour, 3600);
-
- xprof_average(&xprof_stats_avg30min, 1800);
-
- xprof_average(&xprof_stats_avg5min, 300);
-
- xprof_average(&xprof_stats_avg1min, 60);
-
- xprof_average(&xprof_stats_avg30sec, 30);
-
- xprof_average(&xprof_stats_avg5sec, 5);
-
- xprof_average(&xprof_stats_avg1sec, 1);
-
- xprof_chk_overhead(30);
-
- eventAdd("cpuProfiling", xprof_event, NULL, 1.0, 1);
-}
-
-#endif /* USE_XPROF_STATS */
-
#include "squid.h"
#include "base/TextException.h"
#include "mgr/Registration.h"
-#include "profiler/Profiler.h"
#include "Store.h"
#include <climits>
void
String::allocBuffer(String::size_type sz)
{
- PROF_start(StringInitBuf);
assert (undefined());
char *newBuffer = (char*)memAllocString(sz, &sz);
setBuffer(newBuffer, sz);
- PROF_stop(StringInitBuf);
}
// low-level buffer assignment
void
String::allocAndFill(const char *str, int len)
{
- PROF_start(StringAllocAndFill);
assert(str);
allocBuffer(len + 1);
len_ = len;
memcpy(buf_, str, len);
buf_[len] = '\0';
- PROF_stop(StringAllocAndFill);
}
String::String(String const &old) : size_(0), len_(0), buf_(NULL)
void
String::clean()
{
- PROF_start(StringClean);
-
/* TODO if mempools has already closed this will FAIL!! */
if (defined())
memFreeString(size_, buf_);
size_ = 0;
buf_ = NULL;
- PROF_stop(StringClean);
}
String::~String()
void
String::reset(char const *str)
{
- PROF_start(StringReset);
clean(); // TODO: optimize to avoid cleaning the buffer if we can reuse it
if (str)
allocAndFill(str, strlen(str));
- PROF_stop(StringReset);
}
void
{
assert(str && len >= 0);
- PROF_start(StringAppend);
if (len_ + len + 1 /*'\0'*/ < size_) {
xstrncpy(buf_+len_, str, len+1);
len_ += len;
absorb(snew);
}
- PROF_stop(StringAppend);
}
void
#include "Debug.h"
#include "fatal.h"
#include "globals.h"
-#include "profiler/Profiler.h"
#include "sbuf/List.h"
#include "sbuf/Stream.h"
#include "SquidConfig.h"
bool
ACL::matches(ACLChecklist *checklist) const
{
- PROF_start(ACL_matches);
debugs(28, 5, "checking " << name);
// XXX: AclMatchedName does not contain a matched ACL name when the acl
const char *extra = checklist->asyncInProgress() ? " async" : "";
debugs(28, 3, "checked: " << name << " = " << result << extra);
- PROF_stop(ACL_matches);
return result == 1; // true for match; false for everything else
}
#include "acl/Checklist.h"
#include "acl/Tree.h"
#include "Debug.h"
-#include "profiler/Profiler.h"
#include <algorithm>
Acl::Answer const &
ACLChecklist::fastCheck(const Acl::Tree * list)
{
- PROF_start(aclCheckFast);
-
preCheck("fast ACLs");
asyncCaller_ = false;
changeAcl(savedList);
occupied_ = false;
- PROF_stop(aclCheckFast);
return currentAnswer();
}
Acl::Answer const &
ACLChecklist::fastCheck()
{
- PROF_start(aclCheckFast);
-
preCheck("fast rules");
asyncCaller_ = false;
if (finished()) {
cbdataReferenceDone(acl);
occupied_ = false;
- PROF_stop(aclCheckFast);
return currentAnswer();
}
calcImplicitAnswer();
cbdataReferenceDone(acl);
occupied_ = false;
- PROF_stop(aclCheckFast);
return currentAnswer();
}
#include "MemObject.h"
#include "mime_header.h"
#include "parser/Tokenizer.h"
-#include "profiler/Profiler.h"
#include "proxyp/Header.h"
#include "proxyp/Parser.h"
#include "sbuf/Stream.h"
/* Test preconditions */
assert(node != NULL);
- PROF_start(clientSocketRecipient);
/* TODO: handle this rather than asserting
* - it should only ever happen if we cause an abort and
* the callback chain loops back to here, so we can simply return.
context->deferRecipientForLater(node, rep, receivedData);
else
http->getConn()->handleReply(rep, receivedData);
-
- PROF_stop(clientSocketRecipient);
}
/**
#include "log/access_log.h"
#include "MemObject.h"
#include "Parsing.h"
-#include "profiler/Profiler.h"
#include "proxyp/Header.h"
#include "redirect.h"
#include "rfc1738.h"
ClientHttpRequest::~ClientHttpRequest()
{
debugs(33, 3, "httpRequestFree: " << uri);
- PROF_start(httpRequestFree);
// Even though freeResources() below may destroy the request,
// we no longer set request->body_pipe to NULL here
/* moving to the next connection is handled by the context free */
dlinkDelete(&active, &ClientActiveRequests);
-
- PROF_stop(httpRequestFree);
}
/**
void
ClientHttpRequest::httpStart()
{
- PROF_start(httpStart);
// XXX: Re-initializes rather than updates. Should not be needed at all.
updateLoggingTags(LOG_TAG_NONE);
debugs(85, 4, loggingTags().c_str() << " for '" << uri << "'");
/* Use the Stream Luke */
clientStreamNode *node = (clientStreamNode *)client_stream.tail->data;
clientStreamRead(node, this, node->readBuffer);
- PROF_stop(httpStart);
}
#if USE_OPENSSL
#include "ip/QosConfig.h"
#include "ip/tools.h"
#include "pconn.h"
-#include "profiler/Profiler.h"
#include "sbuf/SBuf.h"
#include "sbuf/Stream.h"
#include "SquidConfig.h"
int new_socket;
struct addrinfo *AI = NULL;
- PROF_start(comm_open);
/* Create socket for accepting new connections. */
++ statCounter.syscalls.sock.sockets;
Ip::Address::FreeAddr(AI);
- PROF_stop(comm_open);
errno = xerrno; // restore for caller
return -1;
}
Ip::Address::FreeAddr(AI);
- PROF_stop(comm_open);
-
// XXX transition only. prevent conn from closing the new FD on function exit.
conn->fd = -1;
errno = xerrno; // restore for caller
int err = 0;
socklen_t errlen;
struct addrinfo *AI = NULL;
- PROF_start(comm_connect_addr);
assert(address.port() != 0);
Ip::Address::FreeAddr(AI);
- PROF_stop(comm_connect_addr);
-
errno = xerrno;
if (xerrno == 0 || xerrno == EISCONN)
status = Comm::OK;
assert(F->type != FD_FILE);
- PROF_start(comm_close);
-
F->flags.close_request = true;
// We have caller's context and fde::codeContext. In the unlikely event they
// must use async call to wait for all callbacks
// scheduled before comm_close() to finish
ScheduleCallHere(completeCall);
-
- PROF_stop(comm_close);
}
/* Send a udp datagram to specified TO_ADDR. */
const void *buf,
int len)
{
- PROF_start(comm_udp_sendto);
++ statCounter.syscalls.sock.sendtos;
debugs(50, 3, "comm_udp_sendto: Attempt to send UDP packet to " << to_addr <<
int xerrno = errno;
Ip::Address::FreeAddr(AI);
- PROF_stop(comm_udp_sendto);
-
if (x >= 0) {
errno = xerrno; // restore for caller to use
return x;
int new_socket;
- PROF_start(comm_open);
/* Create socket for accepting new connections. */
++ statCounter.syscalls.sock.sockets;
} else {
debugs(50, DBG_CRITICAL, MYNAME << "socket failure: " << xstrerr(xerrno));
}
-
- PROF_stop(comm_open);
return -1;
}
if (flags & COMM_NONBLOCKING) {
if (commSetNonBlocking(new_socket) != Comm::OK) {
comm_close(new_socket);
- PROF_stop(comm_open);
return -1;
}
}
if (flags & COMM_DOBIND) {
if (commBind(new_socket, AI) != Comm::OK) {
comm_close(new_socket);
- PROF_stop(comm_open);
return -1;
}
}
if (Config.tcpRcvBufsz > 0 && sock_type == SOCK_STREAM)
commSetTcpRcvbuf(new_socket, Config.tcpRcvBufsz);
- PROF_stop(comm_open);
-
return new_socket;
}
#include "fd.h"
#include "fde.h"
#include "mgr/Registration.h"
-#include "profiler/Profiler.h"
#include "SquidTime.h"
#include "StatCounters.h"
#include "StatHist.h"
fde *F;
PF *hdl;
- PROF_start(comm_check_incoming);
-
if (msec > max_poll_time)
msec = max_poll_time;
/* error during poll */
getCurrentTime();
- PROF_stop(comm_check_incoming);
return Comm::COMM_ERROR;
}
- PROF_stop(comm_check_incoming);
getCurrentTime();
statCounter.select_fds_hist.count(num);
if (num == 0)
return Comm::TIMEOUT; /* no error */
- PROF_start(comm_handle_ready_fd);
-
for (i = 0; i < num; ++i) {
int fd = (int)do_poll.dp_fds[i].fd;
F = &fd_table[fd];
DEBUG_DEVPOLL ? 0 : 8,
HERE << "Calling read handler on FD " << fd
);
- PROF_start(comm_read_handler);
F->read_handler = NULL;
hdl(fd, F->read_data);
- PROF_stop(comm_read_handler);
++ statCounter.select_fds;
} else {
debugs(
DEBUG_DEVPOLL ? 0 : 8,
HERE << "Calling write handler on FD " << fd
);
- PROF_start(comm_write_handler);
F->write_handler = NULL;
hdl(fd, F->write_data);
- PROF_stop(comm_write_handler);
++ statCounter.select_fds;
} else {
debugs(
}
}
- PROF_stop(comm_handle_ready_fd);
return Comm::OK;
}
#include "fde.h"
#include "globals.h"
#include "mgr/Registration.h"
-#include "profiler/Profiler.h"
#include "SquidTime.h"
#include "StatCounters.h"
#include "StatHist.h"
struct epoll_event *cevents;
- PROF_start(comm_check_incoming);
-
if (msec > max_poll_time)
msec = max_poll_time;
getCurrentTime();
- PROF_stop(comm_check_incoming);
-
return Comm::COMM_ERROR;
}
- PROF_stop(comm_check_incoming);
getCurrentTime();
statCounter.select_fds_hist.count(num);
if (num == 0)
return Comm::TIMEOUT; /* No error.. */
- PROF_start(comm_handle_ready_fd);
-
for (i = 0, cevents = pevents; i < num; ++i, ++cevents) {
fd = cevents->data.fd;
F = &fd_table[fd];
if (cevents->events & (EPOLLIN|EPOLLHUP|EPOLLERR) || F->flags.read_pending) {
if ((hdl = F->read_handler) != NULL) {
debugs(5, DEBUG_EPOLL ? 0 : 8, HERE << "Calling read handler on FD " << fd);
- PROF_start(comm_write_handler);
F->read_handler = NULL;
hdl(fd, F->read_data);
- PROF_stop(comm_write_handler);
++ statCounter.select_fds;
} else {
debugs(5, DEBUG_EPOLL ? 0 : 8, HERE << "no read handler for FD " << fd);
if (cevents->events & (EPOLLOUT|EPOLLHUP|EPOLLERR)) {
if ((hdl = F->write_handler) != NULL) {
debugs(5, DEBUG_EPOLL ? 0 : 8, HERE << "Calling write handler on FD " << fd);
- PROF_start(comm_read_handler);
F->write_handler = NULL;
hdl(fd, F->write_data);
- PROF_stop(comm_read_handler);
++ statCounter.select_fds;
} else {
debugs(5, DEBUG_EPOLL ? 0 : 8, HERE << "no write handler for FD " << fd);
CodeContext::Reset();
- PROF_stop(comm_handle_ready_fd);
-
return Comm::OK;
}
#include "globals.h"
#include "ICP.h"
#include "mgr/Registration.h"
-#include "profiler/Profiler.h"
#include "SquidConfig.h"
#include "SquidTime.h"
#include "StatCounters.h"
int npfds;
struct pollfd pfds[3 + MAXTCPLISTENPORTS];
- PROF_start(comm_check_incoming);
incoming_sockets_accepted = 0;
for (i = npfds = 0; i < nfds; ++i) {
}
}
- if (!nfds) {
- PROF_stop(comm_check_incoming);
+ if (!nfds)
return -1;
- }
getCurrentTime();
++ statCounter.syscalls.selects;
- if (poll(pfds, npfds, 0) < 1) {
- PROF_stop(comm_check_incoming);
+ if (poll(pfds, npfds, 0) < 1)
return incoming_sockets_accepted;
- }
for (i = 0; i < npfds; ++i) {
int revents;
}
}
- PROF_stop(comm_check_incoming);
return incoming_sockets_accepted;
}
if (commCheckTcpIncoming)
comm_poll_tcp_incoming();
- PROF_start(comm_poll_prep_pfds);
-
calldns = calludp = calltcp = 0;
nfds = 0;
}
}
- PROF_stop(comm_poll_prep_pfds);
-
if (npending)
msec = 0;
}
for (;;) {
- PROF_start(comm_poll_normal);
++ statCounter.syscalls.selects;
num = poll(pfds, nfds, msec);
int xerrno = errno;
++ statCounter.select_loops;
- PROF_stop(comm_poll_normal);
if (num >= 0 || npending > 0)
break;
/* scan each socket but the accept socket. Poll this
* more frequently to minimize losses due to the 5 connect
* limit in SunOS */
- PROF_start(comm_handle_ready_fd);
for (size_t loopIndex = 0; loopIndex < nfds; ++loopIndex) {
fde *F;
debugs(5, 6, "comm_poll: FD " << fd << " ready for reading");
if ((hdl = F->read_handler)) {
- PROF_start(comm_read_handler);
F->read_handler = NULL;
hdl(fd, F->read_data);
- PROF_stop(comm_read_handler);
++ statCounter.select_fds;
if (commCheckUdpIncoming)
debugs(5, 6, "comm_poll: FD " << fd << " ready for writing");
if ((hdl = F->write_handler)) {
- PROF_start(comm_write_handler);
F->write_handler = NULL;
hdl(fd, F->write_data);
- PROF_stop(comm_write_handler);
++ statCounter.select_fds;
if (commCheckUdpIncoming)
}
}
- PROF_stop(comm_handle_ready_fd);
-
if (calludp)
comm_poll_udp_incoming();
#include "ip/QosConfig.h"
#include "log/access_log.h"
#include "MasterXaction.h"
-#include "profiler/Profiler.h"
#include "SquidConfig.h"
#include "SquidTime.h"
#include "StatCounters.h"
Comm::Flag
Comm::TcpAcceptor::oldAccept(Comm::ConnectionPointer &details)
{
- PROF_start(comm_accept);
++statCounter.syscalls.sock.accepts;
int sock;
struct addrinfo *gai = NULL;
Ip::Address::FreeAddr(gai);
- PROF_stop(comm_accept);
-
if (ignoreErrno(errcode) || errcode == ECONNABORTED) {
debugs(50, 5, status() << ": " << xstrerr(errcode));
return Comm::NOMESSAGE;
int xerrno = errno;
debugs(50, DBG_IMPORTANT, "ERROR: getsockname() failed to locate local-IP on " << details << ": " << xstrerr(xerrno));
Ip::Address::FreeAddr(gai);
- PROF_stop(comm_accept);
return Comm::COMM_ERROR;
}
details->local = *gai;
if (conn->flags&(COMM_TRANSPARENT|COMM_INTERCEPTION) && !Ip::Interceptor.Lookup(details, conn)) {
debugs(50, DBG_IMPORTANT, "ERROR: NAT/TPROXY lookup failed to locate original IPs on " << details);
// Failed.
- PROF_stop(comm_accept);
return Comm::COMM_ERROR;
}
if (Config.client_ip_max_connections >= 0) {
if (clientdbEstablished(details->remote, 0) > Config.client_ip_max_connections) {
debugs(50, DBG_IMPORTANT, "WARNING: " << details->remote << " attempting more than " << Config.client_ip_max_connections << " connections.");
- PROF_stop(comm_accept);
return Comm::NOMESSAGE;
}
}
/* IFF the socket is (tproxy) transparent, pass the flag down to allow spoofing */
F->flags.transparent = fd_table[conn->fd].flags.transparent; // XXX: can we remove this line yet?
- PROF_stop(comm_accept);
return Comm::OK;
}
#include "fde.h"
#include "globals.h"
#include "MemBuf.h"
-#include "profiler/Profiler.h"
#include "SquidTime.h"
#include "StatCounters.h"
#if USE_DELAY_POOLS
assert(state->conn != NULL);
assert(state->conn->fd == fd);
- PROF_start(commHandleWrite);
debugs(5, 5, HERE << state->conn << ": off " <<
(long int) state->offset << ", sz " << (long int) state->size << ".");
assert(bucket->selectWaiting);
bucket->selectWaiting = false;
if (nleft > 0 && !bucket->applyQuota(nleft, state)) {
- PROF_stop(commHandleWrite);
return;
}
}
state->finish(nleft ? Comm::OK : Comm::COMM_ERROR, 0);
}
}
-
- PROF_stop(commHandleWrite);
}
#include "ip/Address.h"
#include "log/forward.h"
#include "MemBuf.h"
-#include "profiler/Profiler.h"
#include "SquidConfig.h"
/* quick reference on behaviour here.
parserState.parsing = 1;
/* we don't keep any data around */
- PROF_start(esiParsing);
-
try {
while (buffered.getRaw() && !flags.error)
parseOneBuffer();
setErrorMessage("ESI parser error");
}
- PROF_stop(esiParsing);
-
/* Tel the read code to allocate a new buffer */
incoming = NULL;
*/
{
esiProcessResult_t status;
- PROF_start(esiProcessing);
processing = true;
status = tree->process(0);
processing = false;
setError();
setErrorMessage("esiProcess: ESI template Processing failed.");
-
- PROF_stop(esiProcessing);
-
return ESI_PROCESS_FAILED;
break;
flags.finished = 1;
}
- PROF_stop(esiProcessing);
return status; /* because we have no callbacks */
}
}
#include "Debug.h"
#include "esi/Esi.h"
#include "esi/Expression.h"
-#include "profiler/Profiler.h"
#include <cerrno>
#include <cmath>
stackmember stack[ESI_STACK_DEPTH_LIMIT];
int stackdepth = 0;
char const *end;
- PROF_start(esiExpressionEval);
while (*s) {
stackmember candidate = getsymbol(s, &end);
assert(s != end);
if (!addmember(stack, &stackdepth, &candidate)) {
- PROF_stop(esiExpressionEval);
return 0;
}
} else {
assert (s == end);
debugs(86, DBG_IMPORTANT, "failed parsing expression");
- PROF_stop(esiExpressionEval);
return 0;
}
}
eval(stack, &stackdepth, stackdepth - 2, &rv)) {
/* special case - leading operator failed */
debugs(86, DBG_IMPORTANT, "invalid expression");
- PROF_stop(esiExpressionEval);
return 0;
}
}
if (stackdepth == 0) {
/* Empty expression - evaluate to false */
- PROF_stop(esiExpressionEval);
return 0;
}
assert(stack[0].valuetype == ESI_EXPR_EXPR);
- PROF_stop(esiExpressionEval);
-
return stack[0].value.integral ? 1 : 0;
}
#include "squid.h"
#include "event.h"
#include "mgr/Registration.h"
-#include "profiler/Profiler.h"
#include "SquidTime.h"
#include "Store.h"
#include "tools.h"
if (result != 0)
return result;
- PROF_start(eventRun);
-
do {
ev_entry *event = tasks;
assert(event);
break; // do not dequeue events following a heavy event
} while (result == 0);
- PROF_stop(eventRun);
return result;
}
#include "fd.h"
#include "fde.h"
#include "globals.h"
-#include "profiler/Profiler.h"
#include "SquidTime.h"
// Solaris and possibly others lack MSG_NOSIGNAL optimization
int
socket_read_method(int fd, char *buf, int len)
{
- int i;
- PROF_start(recv);
- i = recv(fd, (void *) buf, len, 0);
- PROF_stop(recv);
- return i;
+ return recv(fd, (void *) buf, len, 0);
}
int
file_read_method(int fd, char *buf, int len)
{
- int i;
- PROF_start(read);
- i = _read(fd, buf, len);
- PROF_stop(read);
- return i;
+ return _read(fd, buf, len);
}
int
socket_write_method(int fd, const char *buf, int len)
{
- int i;
- PROF_start(send);
- i = send(fd, (const void *) buf, len, 0);
- PROF_stop(send);
- return i;
+ return send(fd, (const void *) buf, len, 0);
}
int
file_write_method(int fd, const char *buf, int len)
{
- int i;
- PROF_start(write);
- i = (_write(fd, buf, len));
- PROF_stop(write);
- return i;
+ return _write(fd, buf, len);
}
#else
int
default_read_method(int fd, char *buf, int len)
{
- int i;
- PROF_start(read);
- i = read(fd, buf, len);
- PROF_stop(read);
- return i;
+ return read(fd, buf, len);
}
int
default_write_method(int fd, const char *buf, int len)
{
- int i;
- PROF_start(write);
- i = write(fd, buf, len);
- PROF_stop(write);
- return i;
+ return write(fd, buf, len);
}
int
msghdr_read_method(int fd, char *buf, int)
{
- PROF_start(read);
- const int i = recvmsg(fd, reinterpret_cast<msghdr*>(buf), MSG_DONTWAIT);
- PROF_stop(read);
- return i;
+ return recvmsg(fd, reinterpret_cast<msghdr*>(buf), MSG_DONTWAIT);
}
int
msghdr_write_method(int fd, const char *buf, int len)
{
- PROF_start(write);
const int i = sendmsg(fd, reinterpret_cast<const msghdr*>(buf), MSG_NOSIGNAL);
- PROF_stop(write);
return i > 0 ? len : i; // len is imprecise but the caller expects a match
}
#include "fs_io.h"
#include "globals.h"
#include "MemBuf.h"
-#include "profiler/Profiler.h"
#include "StatCounters.h"
#include <cerrno>
file_open(const char *path, int mode)
{
int fd;
- PROF_start(file_open);
if (FILE_MODE(mode) == O_WRONLY)
mode |= O_APPEND;
fd_open(fd, FD_FILE, path);
}
- PROF_stop(file_open);
return fd;
}
{
fde *F = &fd_table[fd];
PF *read_callback;
- PROF_start(file_close);
assert(fd >= 0);
assert(F->flags.open);
#else
F->flags.close_request = true;
debugs(6, 2, "file_close: FD " << fd << ", delaying close");
- PROF_stop(file_close);
return;
#endif
fd_close(fd);
++ statCounter.syscalls.disk.closes;
-
- PROF_stop(file_close);
}
/*
if (NULL == q)
return;
- PROF_start(diskHandleWrite);
-
debugs(6, 3, "diskHandleWrite: FD " << fd);
F->flags.write_daemon = false;
* NOTE, this callback can close the FD, so we must
* not touch 'F', 'fdd', etc. after this.
*/
- PROF_stop(diskHandleWrite);
return;
/* XXX But what about close_request??? */
}
if (do_close)
file_close(fd);
-
- PROF_stop(diskHandleWrite);
}
/* write block to a file */
{
dwrite_q *wq = NULL;
fde *F = &fd_table[fd];
- PROF_start(file_write);
assert(fd >= 0);
assert(F->flags.open);
/* if we got here. Caller is eligible to write. */
if (!F->flags.write_daemon) {
diskHandleWrite(fd, NULL);
}
-
- PROF_stop(file_write);
}
/*
return;
}
- PROF_start(diskHandleRead);
-
#if WRITES_MAINTAIN_DISK_OFFSET
if (F->disk.offset != ctrl_dat->offset) {
#else
if (len < 0) {
if (ignoreErrno(xerrno)) {
Comm::SetSelect(fd, COMM_SELECT_READ, diskHandleRead, ctrl_dat, 0);
- PROF_stop(diskHandleRead);
return;
}
cbdataReferenceDone(ctrl_dat->client_data);
memFree(ctrl_dat, MEM_DREAD_CTRL);
-
- PROF_stop(diskHandleRead);
}
/* start read operation */
file_read(int fd, char *buf, int req_len, off_t offset, DRCB * handler, void *client_data)
{
dread_ctrl *ctrl_dat;
- PROF_start(file_read);
assert(fd >= 0);
ctrl_dat = (dread_ctrl *)memAllocate(MEM_DREAD_CTRL);
ctrl_dat->fd = fd;
ctrl_dat->handler = handler;
ctrl_dat->client_data = cbdataReference(client_data);
diskHandleRead(fd, ctrl_dat);
- PROF_stop(file_read);
}
void
#include "neighbors.h"
#include "pconn.h"
#include "peer_proxy_negotiate_auth.h"
-#include "profiler/Profiler.h"
#include "refresh.h"
#include "RefreshPattern.h"
#include "rfc1738.h"
}
if (!flags.headers_parsed) { // have not parsed headers yet?
- PROF_start(HttpStateData_processReplyHeader);
processReplyHeader();
- PROF_stop(HttpStateData_processReplyHeader);
if (!continueAfterParsingHeader()) // parsing error or need more data
return; // TODO: send errors to ICAP
}
// kick more reads if needed and/or process the response body, if any
- PROF_start(HttpStateData_processReplyBody);
processReplyBody(); // may call serverComplete()
- PROF_stop(HttpStateData_processReplyBody);
}
/**
#include "HttpHeaderTools.h"
#include "MemBuf.h"
#include "mime_header.h"
-#include "profiler/Profiler.h"
#include "SquidConfig.h"
Http::Message::Message(http_hdr_owner_type owner):
*parse_end_ptr = parse_start;
- PROF_start(HttpMsg_httpMsgParseStep);
-
if (pstate == Http::Message::psReadyToParseStartLine) {
if (!httpMsgIsolateStart(&parse_start, &blk_start, &blk_end)) {
- PROF_stop(HttpMsg_httpMsgParseStep);
return 0;
}
if (!parseFirstLine(blk_start, blk_end)) {
- PROF_stop(HttpMsg_httpMsgParseStep);
return httpMsgParseError();
}
configureContentLengthInterpreter(interpreter);
const int parsed = header.parse(parse_start, parse_len, atEnd, hsize, interpreter);
if (parsed <= 0) {
- PROF_stop(HttpMsg_httpMsgParseStep);
return !parsed ? 0 : httpMsgParseError();
}
hdr_sz += hsize;
pstate = Http::Message::psParsed;
}
- PROF_stop(HttpMsg_httpMsgParseStep);
return 1;
}
#include "http/one/RequestParser.h"
#include "http/ProtocolVersion.h"
#include "parser/Tokenizer.h"
-#include "profiler/Profiler.h"
#include "SquidConfig.h"
Http1::Parser::size_type
// stage 2: parse the request-line
if (parsingStage_ == HTTP_PARSE_FIRST) {
- PROF_start(HttpParserParseReqLine);
const int retcode = parseRequestFirstLine();
// first-line (or a look-alike) found successfully.
debugs(74, 5, "request-line: url: " << uri_);
debugs(74, 5, "request-line: proto: " << msgProtocol_);
debugs(74, 5, "Parser: bytes processed=" << (aBuf.length()-buf_.length()));
- PROF_stop(HttpParserParseReqLine);
// syntax errors already
if (retcode < 0) {
#include "http/one/ResponseParser.h"
#include "http/ProtocolVersion.h"
#include "parser/Tokenizer.h"
-#include "profiler/Profiler.h"
#include "sbuf/Stream.h"
#include "SquidConfig.h"
// stage 2: parse the status-line
if (parsingStage_ == HTTP_PARSE_FIRST) {
- PROF_start(HttpParserParseReplyLine);
-
const int retcode = parseResponseFirstLine();
// first-line (or a look-alike) found successfully.
debugs(74, 5, "status-line: status-code " << statusCode_);
debugs(74, 5, "status-line: reason-phrase " << reasonPhrase_);
debugs(74, 5, "Parser: bytes processed=" << (aBuf.length()-buf_.length()));
- PROF_stop(HttpParserParseReplyLine);
// syntax errors already
if (retcode < 0) {
#include "peer_sourcehash.h"
#include "peer_userhash.h"
#include "PeerSelectState.h"
-#include "profiler/Profiler.h"
#include "protos.h"
#include "redirect.h"
#include "refresh.h"
int
SignalEngine::checkEvents(int)
{
- PROF_start(SignalEngine_checkEvents);
-
if (do_reconfigure)
mainReconfigureStart();
else if (do_rotate)
doShutdown(do_shutdown > 0 ? (int) Config.shutdownLifetime : 0);
if (do_handle_stopped_child)
handleStoppedChild();
- PROF_stop(SignalEngine_checkEvents);
return EVENT_IDLE;
}
eventAdd("fqdncache_purgelru", fqdncache_purgelru, nullptr, 15.0, 1);
-#if USE_XPROF_STATS
-
- eventAdd("cpuProfiling", xprof_event, nullptr, 1.0, 1);
-
-#endif
-
eventAdd("memPoolCleanIdlePools", Mem::CleanIdlePools, nullptr, 15.0, 1);
configured_once = 1;
#include "squid.h"
#include "Debug.h"
#include "mime_header.h"
-#include "profiler/Profiler.h"
#include "sbuf/SBuf.h"
size_t
int state = 1;
containsObsFold = false;
- PROF_start(headersEnd);
-
while (e < l && state < 3) {
switch (state) {
++e;
}
- PROF_stop(headersEnd);
if (3 == state)
return e;
#include "http/one/RequestParser.h"
#include "http/Stream.h"
#include "HttpHeaderTools.h"
-#include "profiler/Profiler.h"
#include "servers/Http1Server.h"
#include "SquidConfig.h"
#include "Store.h"
Http::Stream *
Http::One::Server::parseOneRequest()
{
- PROF_start(HttpServer_parseOneRequest);
-
// reset because the protocol may have changed if this is the first request
// and because we never bypass parsing failures of N+1st same-proto request
preservingClientData_ = shouldPreserveClientData();
/* Process request */
Http::Stream *context = parseHttpRequest(parser_);
- PROF_stop(HttpServer_parseOneRequest);
return context;
}
#include "HttpReply.h"
#include "mem_node.h"
#include "MemObject.h"
-#include "profiler/Profiler.h"
#include "stmem.h"
/*
bool
mem_hdr::write (StoreIOBuffer const &writeBuffer)
{
- PROF_start(mem_hdr_write);
debugs(19, 6, "mem_hdr::write: " << this << " " << writeBuffer.range() << " object end " << endOffset());
if (unionNotEmpty(writeBuffer)) {
debugs(19, DBG_CRITICAL, "mem_hdr::write: writeBuffer: " << writeBuffer.range());
debugDump();
fatal_dump("Attempt to overwrite already in-memory data. Preceding this there should be a mem_hdr::write output that lists the attempted write, and the currently present data. Please get a 'backtrace full' from this error - using the generated core, and file a bug report with the squid developers including the last 10 lines of cache.log and the backtrace.\n");
- PROF_stop(mem_hdr_write);
return false;
}
currentSource += wrote;
}
- PROF_stop(mem_hdr_write);
return true;
}
#include "MemStore.h"
#include "mgr/Registration.h"
#include "mgr/StoreIoAction.h"
-#include "profiler/Profiler.h"
#include "repl_modules.h"
#include "RequestFlags.h"
#include "SquidConfig.h"
{
assert(mem_obj != NULL);
/* This assert will change when we teach the store to update */
- PROF_start(StoreEntry_write);
assert(store_status == STORE_PENDING);
// XXX: caller uses content offset, but we also store headers
writeBuffer.offset += mem_obj->baseReply().hdr_sz;
debugs(20, 5, "storeWrite: writing " << writeBuffer.length << " bytes for '" << getMD5Text() << "'");
- PROF_stop(StoreEntry_write);
storeGetMemSpace(writeBuffer.length);
mem_obj->write(writeBuffer);
void
storeGetMemSpace(int size)
{
- PROF_start(storeGetMemSpace);
if (!shutting_down) // Store::Root() is FATALly missing during shutdown
Store::Root().freeMemorySpace(size);
- PROF_stop(storeGetMemSpace);
}
/* thunk through to Store::Root().maintain(). Note that this would be better still
void
StoreEntry::release(const bool shareable)
{
- PROF_start(storeRelease);
debugs(20, 3, shareable << ' ' << *this << ' ' << getMD5Text());
/* If, for any reason we can't discard this object because of an
* outstanding request, mark it for pending release */
if (locked()) {
releaseRequest(shareable);
- PROF_stop(storeRelease);
return;
}
lock("storeLateRelease");
releaseRequest(shareable);
LateReleaseStack.push(this);
- PROF_stop(storeRelease);
return;
}
storeLog(STORE_LOG_RELEASE, this);
Store::Root().evictCached(*this);
destroyStoreEntry(static_cast<hash_link *>(this));
- PROF_stop(storeRelease);
}
static void
#include "squid.h"
#include "mem_node.h"
#include "MemStore.h"
-#include "profiler/Profiler.h"
#include "SquidConfig.h"
#include "SquidMath.h"
#include "store/Controller.h"
{
static time_t last_warn_time = 0;
- PROF_start(storeMaintainSwapSpace);
swapDir->maintain();
/* this should be emitted by the oversize dir, not globally */
last_warn_time = squid_curtime;
}
}
-
- PROF_stop(storeMaintainSwapSpace);
}
void
int
Store::Controller::callback()
{
- /* This will likely double count. That's ok. */
- PROF_start(storeDirCallback);
-
/* mem cache callbacks ? */
- int result = swapDir->callback();
-
- PROF_stop(storeDirCallback);
-
- return result;
+ return swapDir->callback();
}
/// update reference counters of the recently touched entry
#include "Debug.h"
#include "DebugMessages.h"
#include "globals.h"
-#include "profiler/Profiler.h"
#include "sbuf/Stream.h"
#include "SquidConfig.h"
#include "Store.h"
#include "MemBuf.h"
#include "MemObject.h"
#include "mime_header.h"
-#include "profiler/Profiler.h"
#include "SquidConfig.h"
#include "StatCounters.h"
#include "Store.h"
static bool copying (false);
assert (!copying);
copying = true;
- PROF_start(storeClient_kickReads);
/* we might be blocking comm reads due to readahead limits
* now we have a new offset, trigger those reads...
*/
entry->mem_obj->kickReads();
- PROF_stop(storeClient_kickReads);
copying = false;
anEntry->lock("store_client::copy"); // see deletion note below
dlink_node *nx = NULL;
dlink_node *node;
- PROF_start(InvokeHandlers);
-
debugs(90, 3, mem_obj->nclients << " clients; " << *this << ' ' << getMD5Text());
/* walk the entire list looking for valid callbacks */
storeClientCopy2(this, sc);
}
CodeContext::Reset(savedContext);
- PROF_stop(InvokeHandlers);
}
// Does not account for remote readers/clients.
#define SQUID_WORDLIST_H
#include "globals.h"
-#include "profiler/Profiler.h"
#include "sbuf/List.h"
/** A list of C-strings