aboutsummaryrefslogtreecommitdiffstats
path: root/vectors
pre { line-height: 125%; margin: 0; } td.linenos pre { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; } span.linenos { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; } td.linenos pre.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; } .highlight .hll { background-color: #ffffcc } .highlight { background: #ffffff; } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* 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 */
#ifndef __XEN_PERFC_H__
#define __XEN_PERFC_H__

#ifdef PERF_COUNTERS

#include <xen/lib.h>
#include <xen/smp.h>
#include <xen/percpu.h>

/*
 * NOTE: new counters must be defined in perfc_defn.h
 * 
 * Counter declarations:
 * PERFCOUNTER (counter, string)              define a new performance counter
 * PERFCOUNTER_ARRAY (counter, string, size)  define an array of counters
 * 
 * Unlike counters, status variables do not reset:
 * PERFSTATUS (counter, string)               define a new performance stauts
 * PERFSTATUS_ARRAY (counter, string, size)   define an array of status vars
 * 
 * unsigned long perfc_value  (counter)        get value of a counter  
 * unsigned long perfc_valuea (counter, index) get value of an array counter
 * unsigned long perfc_set  (counter, val)     set value of a counter  
 * unsigned long perfc_seta (counter, index, val) set value of an array counter
 * void perfc_incr  (counter)                  increment a counter          
 * void perfc_decr  (counter)                  decrement a status
 * void perfc_incra (counter, index)           increment an array counter   
 * void perfc_add   (counter, value)           add a value to a counter     
 * void perfc_adda  (counter, index, value)    add a value to array counter 
 * void perfc_print (counter)                  print out the counter
 */

#define PERFCOUNTER( name, descr ) \
  PERFC_##name,
#define PERFCOUNTER_ARRAY( name, descr, size ) \
  PERFC_##name,                                \
  PERFC_LAST_##name = PERFC_ ## name + (size) - sizeof(char[2 * !!(size) - 1]),

#define PERFSTATUS       PERFCOUNTER
#define PERFSTATUS_ARRAY PERFCOUNTER_ARRAY

enum perfcounter {
#include <xen/perfc_defn.h>
	NUM_PERFCOUNTERS
};

#undef PERFCOUNTER
#undef PERFCOUNTER_ARRAY
#undef PERFSTATUS
#undef PERFSTATUS_ARRAY

typedef unsigned perfc_t;
#define PRIperfc ""

DECLARE_PER_CPU(perfc_t[NUM_PERFCOUNTERS], perfcounters);

#define perfc_value(x)    this_cpu(perfcounters)[PERFC_ ## x]
#define perfc_valuea(x,y)                                               \
    ( (y) <= PERFC_LAST_ ## x - PERFC_ ## x ?                           \
	 this_cpu(perfcounters)[PERFC_ ## x + (y)] : 0 )
#define perfc_set(x,v)    (this_cpu(perfcounters)[PERFC_ ## x] = (v))
#define perfc_seta(x,y,v)                                               \
    ( (y) <= PERFC_LAST_ ## x - PERFC_ ## x ?                           \
	 this_cpu(perfcounters)[PERFC_ ## x + (y)] = (v) : (v) )
#define perfc_incr(x)     (++this_cpu(perfcounters)[PERFC_ ## x])
#define perfc_decr(x)     (--this_cpu(perfcounters)[PERFC_ ## x])
#define perfc_incra(x,y)                                                \
    ( (y) <= PERFC_LAST_ ## x - PERFC_ ## x ?                           \
	 ++this_cpu(perfcounters)[PERFC_ ## x + (y)] : 0 )
#define perfc_add(x,v)    (this_cpu(perfcounters)[PERFC_ ## x] += (v))
#define perfc_adda(x,y,v)                                               \
    ( (y) <= PERFC_LAST_ ## x - PERFC_ ## x ?                           \
	 this_cpu(perfcounters)[PERFC_ ## x + (y)] = (v) : (v) )

/*
 * Histogram: special treatment for 0 and 1 count. After that equally spaced 
 * with last bucket taking the rest.
 */
#ifdef PERF_ARRAYS
#define perfc_incr_histo(x,v)                                           \
    do {                                                                \
        if ( (v) == 0 )                             
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge pull request #1876 from simo5/ECDHPaul Kehrer2015-05-062-2/+2
|\ \ | | | | | | Add loader for ECDH test vectors
| * | Add loader for ECDH test vectorsSimo Sorce2015-05-012-2/+2
| | | | | | | | | | | | | | | | | | | | | Also fix test vector files, they had a truncated line for the EE set in both init and resp files. Signed-off-by: Simo Sorce <simo@redhat.com>
* | | add some authority information access x509 vectorsPaul Kehrer2015-05-043-0/+59
| |/ |/|
* | add another authority key identifier vectorPaul Kehrer2015-05-031-0/+19
| |
* | add AKI vectorPaul Kehrer2015-05-031-0/+1929-0/+70475
|\ | | | | add keywrap test vectors from NIST
| * add keywrap test vectors from NISTPaul Kehrer2015-03-1529-0/+70475
| | | | | | | | From http://csrc.nist.gov/groups/STM/cavp/documents/mac/kwtestvectors.zip
* | add 3 new certificate vectors for upcoming basic constraints testsPaul Kehrer2015-03-203-0/+70
|/
* reopen tree for 0.9 development workPaul Kehrer2015-03-091-1/+1
|
* update changelog and bump version to 0.8Paul Kehrer2015-03-081-1/+1
|
* DER conversion of PKCS1 rsa.pub.pemPaul Kehrer2015-03-021-0/+0
|
* add RSA/DSA PKCS1 public keysPaul Kehrer2015-03-022-0/+12
| | | | | | unenc-rsa-pkcs8.pub.pem is PEM PKCS1 formatted public key converted from the subjectPublicKeyInfo version dsa.pub.pem is the DSA key from the ruby OpenSSL tests
* add X509 request custom vectorsPaul Kehrer2015-02-245-0/+73
|
* add legacy Verisign PCA (MD2) root to vectorsPaul Kehrer2015-02-141-0/+14
|
* add utf8 certificatePaul Kehrer2015-01-171-0/+18
|
* add two custom certificates for x509 name parsing testsPaul Kehrer2015-01-172-0/+62
|
* add DER asymmetric keysPaul Kehrer2015-01-0415-0/+0
|
* Fixed #1598 -- "it's 2015 somewhere"Alex Gaynor2014-12-311-1/+1
|
* who can remember where all these files belong? nobody.Paul Kehrer2014-12-231-0/+2
|
* open master for eighth release developmentPaul Kehrer2014-12-171-1/+1
|
* 0.7 changelog and version bumpPaul Kehrer2014-12-171-1/+1
|
* Merge pull request #1498 from reaperhulk/x509-more-vectorsAlex Stapleton2014-12-136-0/+118
|\ | | | | add several new x509 test vectors
| * rename DSA test vector certificate to be more clearPaul Kehrer2014-12-121-0/+0
| |
| * add ECDSA certificate that does not have a named curve OIDPaul Kehrer2014-12-121-0/+16
| |
| * add several new x509 test vectorsPaul Kehrer2014-11-265-0/+102
| |
* | alter vector file loader to support passing read modePaul Kehrer2014-11-271-2/+2
|/
* add NIST PKITS X.509 vectorsPaul Kehrer2014-11-241558-0/+27956
| | | | | http://csrc.nist.gov/groups/ST/crypto_apps_infra/pki/pkitesting.html http://csrc.nist.gov/groups/ST/crypto_apps_infra/documents/PKITS_data.zip
* Upgrade the encryption algorithm on another thing. This uses the same PBES2 ↵Alex Gaynor2014-11-181-38/+16
| | | | | | parameters as the previous one. If someone has a choice for a 2nd algorithm, I'm happy to do that. See previous PR for ideas about how to review
* Re-encrypts one of our vectors from a truly atrocious algorithm (single DES, ↵Alex Gaynor2014-11-171-4/+5
| | | | | | MD5) to a PBES#2 based one (PBKDF2HMAC + AES) Refs #1390
* Update the license header for every source file, as well as the documentation.Alex Gaynor2014-11-163-36/+10
| | | | Fixes #1209
* fixAlex Gaynor2014-10-311-1/+1
|
* Update the license in setup.pyAlex Gaynor2014-10-311-1/+1
|
* Added new license files. Refs #1209Alex Gaynor2014-10-313-202/+232
|
* Remove the EC PARAMETERS section from the PEMAlex Gaynor2014-10-081-3/+0
|