From patchwork Thu Oct 22 19:56:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 55450 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lf0-f72.google.com (mail-lf0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id E4D0A22AA5 for ; Thu, 22 Oct 2015 19:56:43 +0000 (UTC) Received: by lffv3 with SMTP id v3sf38365844lff.1 for ; Thu, 22 Oct 2015 12:56:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=ZvsTWvWqph2SUM/BskTC3FRb3KMEbEJePmpnKF+9f6c=; b=aQs3QVfsMn45P9GhcckhGd8GgDzYp/xTKrKpDiYelbdmKjdUkmzRx6i1AlU/pWm//N se53diHFqjjfohF+m/LhfGoDITBW8YT2MGmHm3xBdHpXuL0YEpuLnzke6z6Nrvwb2joj DJV2WpVSuJUEgM2u0SMve57dJD5yKGUfXx+zOrdkaL84bEk54RTd8J7+654CPmXNdpTu bWWBumBmu6dgdhImhMedhMiSDki3m01mVjtPYWvJh7Oxd1b49YcX43S0EXp8lJoSgovZ Iz+hTrLWfTFFajPCjnnifNULkJtlutKqEjA+4pmudTuHTeyudfdqiS4mumZgLtSR0hfw SmHw== X-Gm-Message-State: ALoCoQmXVZzcW5BRwTnf00qDRWAKsgT1GHv9TWPx3mChBcRjQAFwkJsrd2kA6sh5azK4/itFkq+j X-Received: by 10.194.203.33 with SMTP id kn1mr58019wjc.3.1445543802767; Thu, 22 Oct 2015 12:56:42 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.166.200 with SMTP id p191ls325145lfe.37.gmail; Thu, 22 Oct 2015 12:56:42 -0700 (PDT) X-Received: by 10.25.82.76 with SMTP id g73mr6385227lfb.56.1445543802475; Thu, 22 Oct 2015 12:56:42 -0700 (PDT) Received: from mail-lf0-x230.google.com (mail-lf0-x230.google.com. [2a00:1450:4010:c07::230]) by mx.google.com with ESMTPS id 17si10593615lfz.148.2015.10.22.12.56.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Oct 2015 12:56:42 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c07::230 as permitted sender) client-ip=2a00:1450:4010:c07::230; Received: by lfbn126 with SMTP id n126so26497885lfb.2 for ; Thu, 22 Oct 2015 12:56:42 -0700 (PDT) X-Received: by 10.112.17.34 with SMTP id l2mr9520700lbd.117.1445543802271; Thu, 22 Oct 2015 12:56:42 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp799396lbq; Thu, 22 Oct 2015 12:56:41 -0700 (PDT) X-Received: by 10.55.221.139 with SMTP id u11mr21031389qku.50.1445543801365; Thu, 22 Oct 2015 12:56:41 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 198si5161656qhh.41.2015.10.22.12.56.40; Thu, 22 Oct 2015 12:56:41 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id 968B462C19; Thu, 22 Oct 2015 19:56:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,T_DKIM_INVALID,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id D8B7962C0D; Thu, 22 Oct 2015 19:56:35 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id E597862C15; Thu, 22 Oct 2015 19:56:31 +0000 (UTC) Received: from mail-qg0-f47.google.com (mail-qg0-f47.google.com [209.85.192.47]) by lists.linaro.org (Postfix) with ESMTPS id 2579462C0D for ; Thu, 22 Oct 2015 19:56:30 +0000 (UTC) Received: by qgem9 with SMTP id m9so66735299qge.1 for ; Thu, 22 Oct 2015 12:56:30 -0700 (PDT) X-Received: by 10.140.150.143 with SMTP id 137mr21346033qhw.48.1445543789862; Thu, 22 Oct 2015 12:56:29 -0700 (PDT) Received: from localhost.localdomain (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by smtp.gmail.com with ESMTPSA id s84sm6014716qki.14.2015.10.22.12.56.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 Oct 2015 12:56:29 -0700 (PDT) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Thu, 22 Oct 2015 15:56:14 -0400 Message-Id: <1445543775-11220-2-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1445543775-11220-1-git-send-email-mike.holmes@linaro.org> References: <1445543775-11220-1-git-send-email-mike.holmes@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 2/3] doc: images: add resource_management.msc for users-guide X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Original-Sender: mike.holmes@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c07::230 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Mike Holmes --- DEPENDENCIES | 5 +++++ configure.ac | 10 +++++++++ doc/images/Makefile.am | 13 +++++++++-- doc/images/resource_management.msc | 45 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 doc/images/resource_management.msc diff --git a/DEPENDENCIES b/DEPENDENCIES index 7d22bde..d551a58 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -194,6 +194,11 @@ Prerequisites for building the OpenDataPlane (ODP) API # Debian/Ubuntu # apt-get install imagemagick + Message squence diagrams are stored as msc files and the png or eps versions generated when the docs are built + mscgen is used + #Debian/Ubuntu + # apt-get install mscgen + 5.1 API Guide See http://www.stack.nl/~dimitri/doxygen/manual/install.html diff --git a/configure.ac b/configure.ac index 0d08e58..fde7d94 100644 --- a/configure.ac +++ b/configure.ac @@ -258,6 +258,16 @@ AM_CONDITIONAL([user_guide], [test "x${user_guides}" = "xyes" ]) AM_CONDITIONAL([HAVE_IMAGEMAGIC], [test "x${IMAGEMAGIC}" = "xconvert"]) ########################################################################## +# Check for mscgen availability +########################################################################## + AC_CHECK_PROGS([MSCGEN], [mscgen]) + if test -z "$MSCGEN"; + then AC_MSG_WARN([mscgen not found - continuing without sequence message support]) + fi + +AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"]) + +########################################################################## # Save and set temporary compilation flags ########################################################################## OLD_LDFLAGS=$LDFLAGS diff --git a/doc/images/Makefile.am b/doc/images/Makefile.am index df8f9d4..0f9a8a8 100644 --- a/doc/images/Makefile.am +++ b/doc/images/Makefile.am @@ -3,8 +3,10 @@ SVG_SRCS = atomic_queue.svg \ parallel_queue.svg SVG_TARGETS = $(SVG_SRCS:svg=png) SVG_TARGETS += $(SVG_SRCS:svg=eps) +MSG_SRCS = resource_management.msc +MSG_TARGETS = $(MSG_SRCS:msc=png) -EXTRA_DIST = $(SVG_SRCS) +EXTRA_DIST = $(SVG_SRCS) $(MSG_SRCS) TARGETS= @@ -12,10 +14,14 @@ if HAVE_IMAGEMAGIC TARGETS += $(SVG_TARGETS) endif +if HAVE_MSCGEN +TARGETS += $(MSG_TARGETS) +endif + all-local: $(TARGETS) clean-local: - rm -f $(TARGETS) + rm -f $(SVG_TARGETS) $(MSG_TARGETS) atomic_queue.png: atomic_queue.svg convert $< $@ @@ -31,3 +37,6 @@ parallel_queue.png: parallel_queue.svg convert $< $@ ordered_queue.eps: ordered_queue.svg convert $< $@ + +resource_management.png: resource_management.msc + mscgen -T png -i $< -o $@ diff --git a/doc/images/resource_management.msc b/doc/images/resource_management.msc new file mode 100644 index 0000000..fa54c4c --- /dev/null +++ b/doc/images/resource_management.msc @@ -0,0 +1,45 @@ +# ODP resource management +msc { + + a,b,c; + + a->a [ label = "odp_init_global()"]; + a->b [ label = "odp_thread_start()"]; + a->c [ label = "odp_thread_start()"]; + a->a [ label = "odp_init_local()"], + b->b [ label = "odp_init_local()"], + c->c [ label = "odp_init_local()"]; + ---; + b->b [ label = "pool = odp_pool_create()", textcolour="#7f7fff"]; + + a->a [ label = "barrier()"], + b->b [ label = "barrier()"], + c->c [ label = "barrier()"]; + + a->a [ label = " buf = alloc(pool)", textcolour="#ffb000"], + b->b [ label = " buf = alloc(pool)", textcolour="#ffb000"], + c->c [ label = " buf = alloc(pool)", textcolour="#ffb000"]; + + a->a [ label = " free(buf)", textcolour="#ffb000"], + b->b [ label = " free(buf)", textcolour="#ffb000"], + c->c [ label = " free(buf)", textcolour="#ffb000"]; + + a->a [ label = "barrier()"], + b->b [ label = "barrier()"], + c->c [ label = "barrier()"]; + + a->a [ label = "pool = odp_pool_destroy(pool)", textcolour="#7f7fff"]; + ---; + a->a [ label = "barrier()"], + b->b [ label = "barrier()"], + c->c [ label = "barrier()"]; + + --- [ label = "do work", ID="*" ]; + + a->a [ label = "odp_term_local()"], + b->b [ label = "odp_term_local()"], + c->c [ label = "odp_term_local()"]; + b->a [ label = "odp_thread_term()"]; + c->a [ label = "odp_thread_term()"]; + a->a [ label = "odp_term_global()"]; +}