aboutsummaryrefslogtreecommitdiffstats
path: root/vlib
diff options
context:
space:
mode:
authorBud Grise <griseb@cisco.com>2016-03-16 13:09:46 -0400
committerGerrit Code Review <gerrit@fd.io>2016-04-12 11:44:50 +0000
commit42f2006975c5a0ea58c835df4461213072f8813f (patch)
treed8921fa7f1297685deac7ff91376003ede28f1b0 /vlib
parentcbed90c8cbf8449ff8ed6da08ec248f1e49a374d (diff)
Add counter for the number of barrier syncs performed.
Change-Id: I42b26c8f95c17577006f13e3419b8ccc9ef7c4f3 Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
Diffstat (limited to 'vlib')
-rw-r--r--vlib/vlib/threads.c2
-rw-r--r--vlib/vlib/threads.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/vlib/vlib/threads.c b/vlib/vlib/threads.c
index 970e4a55b34..a69e4555af0 100644
--- a/vlib/vlib/threads.c
+++ b/vlib/vlib/threads.c
@@ -1083,6 +1083,8 @@ void vlib_worker_thread_barrier_sync(vlib_main_t *vm)
if (++vlib_worker_threads[0].recursion_level > 1)
return;
+ vlib_worker_threads[0].barrier_sync_count++;
+
ASSERT (os_get_cpu_number() == 0);
deadline = vlib_time_now (vm) + BARRIER_SYNC_TIMEOUT;
diff --git a/vlib/vlib/threads.h b/vlib/vlib/threads.h
index 6c16878a5b5..5773ed05a62 100644
--- a/vlib/vlib/threads.h
+++ b/vlib/vlib/threads.h
@@ -93,6 +93,7 @@ typedef struct {
u32 instance_id;
vlib_thread_registration_t *registration;
u8 *name;
+ u64 barrier_sync_count;
long lwp;
int dpdk_lcore_id;
d } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
/*
 * SegmentURL.h
 *****************************************************************************
 * Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
 *
 * Email: libdash-dev@vicky.bitmovin.net
 *
 * This source code and its use and distribution, is subject to the terms
 * and conditions of the applicable license agreement.
 *****************************************************************************/

#ifndef SEGMENTURL_H_
#define SEGMENTURL_H_

#include "config.h"

#include "ISegmentURL.h"
#include "../helpers/Path.h"
#include "Segment.h"
#include "AbstractMPDElement.h"

namespace dash
{
    namespace mpd
    {
        class SegmentURL : public ISegmentURL, public AbstractMPDElement
        {
            public:
                SegmentURL         ();
                virtual ~SegmentURL();

                const std::string&  GetMediaURI     ()  const;
                const std::string&  GetMediaRange   ()  const;
                const std::string&  GetIndexURI     ()  const;
                const std::string&  GetIndexRange   ()  const;
                uint64_t					GetActualRate	();

                ISegment*           ToMediaSegment  (const std::vector<IBaseUrl *>& baseurls) const;
                ISegment*           ToIndexSegment  (const std::vector<IBaseUrl *>& baseurls) const;

                void    SetMediaURI     (const std::string& mediaURI);
                void    SetMediaRange   (const std::string& mediaRange);
                void    SetIndexURI     (const std::string& indexURI);
                void    SetIndexRange   (const std::string& indexRange);
                void	SetBitrate	(const std::string& bitrate);
            private:
                std::string mediaURI;
                std::string mediaRange;
                std::string indexURI;
                std::string indexRange;
                int			bitrate;
        };
    }
}

#endif /* SEGMENTURL_H_ */