Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make selftest() work #9

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
23a301c
luajit update with upstream LuaJIT/LuaJIT:v2.1
capr Jan 14, 2016
b6dc83d
DynASM update from upstream capr/LuaJIT:v2.1-dynasm-luamode
capr Jan 14, 2016
4786a6d
fixed symlinks (oops)
capr Jan 14, 2016
848005d
loading dasm linker from within the snabb exe
capr Jan 18, 2016
a045284
apps/ipsec: Implement ESP (RFC 4303) apps.
eugeneia Dec 1, 2015
e89a787
apps/ipsec: Add and link with Intel's AES-NI/AES-GCM routines (RFC 41…
eugeneia Dec 11, 2015
4c9b0dd
apps.ipsec.aes_128_gcm: Verify ICV in decrypt.
eugeneia Dec 11, 2015
b11c5a1
apps/ipsec/README.md: Draft spec for IPsec apps (NYI)
lukego Nov 26, 2015
1a88185
Update “apps/ipsec/README.md” to match implementation.
eugeneia Dec 11, 2015
b14497e
DynASM implementation of AES-GCM encryption
corsix Jan 3, 2016
3d014f3
Convert IPsec ESP apps to library (lib.ipsec.esp).
eugeneia Jan 7, 2016
a82f9cc
try to run selftest
hb9cwp Jan 19, 2016
d32295f
remove redudant header file which now lives in src/
hb9cwp Jan 19, 2016
34af7c0
explicitely def/undef DASM_CHECKS
hb9cwp Jan 19, 2016
c70b606
re-activate M.checkstep()
hb9cwp Jan 19, 2016
9f9d990
back out and sync with capr's change #709
hb9cwp Jan 20, 2016
19de305
re-add drawing from @corsix
hb9cwp Jan 20, 2016
77bd459
withdraw drawing because it's a lib and not an app anymore
hb9cwp Jan 20, 2016
e1abe8e
lib.ipsec.esp:encapsulate: document clobbering effect.
eugeneia Jan 20, 2016
23a2b4e
try to run selftest
hb9cwp Jan 19, 2016
b191e97
remove redudant header file which now lives in src/
hb9cwp Jan 19, 2016
8f7a04b
explicitely def/undef DASM_CHECKS
hb9cwp Jan 19, 2016
365b912
re-activate M.checkstep()
hb9cwp Jan 19, 2016
366054f
back out and sync with capr's change #709
hb9cwp Jan 20, 2016
44caa05
re-add drawing from @corsix
hb9cwp Jan 20, 2016
91cbbcf
withdraw drawing because it's a lib and not an app anymore
hb9cwp Jan 20, 2016
b3b0f83
debug
hb9cwp Jan 21, 2016
f30a11d
after 'git pull rebase' from eugenia 2
hb9cwp Jan 21, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
498 changes: 0 additions & 498 deletions lib/luajit/dynasm/dasm_x86.h

This file was deleted.

7 changes: 1 addition & 6 deletions lib/luajit/src/jit/dump.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ local bcline, disass
-- Active flag, output file handle and dump mode.
local active, out, dumpmode

-- Information about traces that is remembered for future reference.
local info = {}

------------------------------------------------------------------------------

local symtabmt = { __index = false }
Expand Down Expand Up @@ -553,7 +550,6 @@ local function dump_trace(what, tr, func, pc, otr, oex)
if dumpmode.m then dump_mcode(tr) end
end
if what == "start" then
info[tr] = { func = func, pc = pc, otr = otr, oex = oex }
if dumpmode.H then out:write('<pre class="ljdump">\n') end
out:write("---- TRACE ", tr, " ", what)
if otr then out:write(" ", otr, "/", oex) end
Expand Down Expand Up @@ -706,7 +702,6 @@ end
return {
on = dumpon,
off = dumpoff,
start = dumpon, -- For -j command line option.
info = info
start = dumpon -- For -j command line option.
}

47 changes: 5 additions & 42 deletions lib/luajit/src/jit/p.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
-- G Produce raw output suitable for graphical tools (e.g. flame graphs).
-- m<number> Minimum sample percentage to be shown. Default: 3.
-- i<number> Sampling interval in milliseconds. Default: 10.
-- S[<string>] Events source if performace events are enabled
--
----------------------------------------------------------------------------

Expand All @@ -45,8 +44,6 @@ local jit = require("jit")
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
local profile = require("jit.profile")
local vmdef = require("jit.vmdef")
local jutil = require("jit.util")
local dump = require("jit.dump")
local math = math
local pairs, ipairs, tonumber, floor = pairs, ipairs, tonumber, math.floor
local sort, format = table.sort, string.format
Expand Down Expand Up @@ -77,38 +74,7 @@ local function prof_cb(th, samples, vmmode)
-- Collect keys for sample.
if prof_states then
if prof_states == "v" then
if map_vmmode[vmmode] then
key_state = map_vmmode[vmmode]
else
-- Sampling a trace: make an understandable one-line description.
local tr = tonumber(vmmode)
local info = jutil.traceinfo(tr)
local extra = dump.info[tr]
-- Show the parent of this trace (if this is a side trace)
local parent = ""
if extra and extra.otr and extra.oex then
parent = "("..extra.otr.."/"..extra.oex..")"
end
-- Show what the end of the trace links to (e.g. loop or other trace)
local lnk = ""
local link, ltype = info.link, info.linktype
if link == tr or link == 0 then lnk = "->"..ltype
elseif ltype == "root" then lnk = "->"..link
else lnk = "->"..link.." "..ltype end
-- Show the current zone (if zone profiling is enabled)
local z = ""
if zone and zone:get() then
z = (" %-16s"):format(zone:get())
end
-- Show the source location where the trace starts
local loc = ""
if extra and extra.func then
local fi = jutil.funcinfo(extra.func, extra.pc)
if fi.loc then loc = fi.loc end
end
local s = ("TRACE %3d %-8s %-10s%s %s"):format(vmmode, parent, lnk, z, loc)
key_state = map_vmmode[vmmode] or s
end
key_state = map_vmmode[vmmode] or vmmode
else
key_state = zone:get() or "(none)"
end
Expand Down Expand Up @@ -277,18 +243,15 @@ end
-- Start profiling.
local function prof_start(mode)
local interval = ""
mode = mode:gsub("i%d+", function(s) interval = s; return "" end)
mode = mode:gsub("i%d*", function(s) interval = s; return "" end)
prof_min = 3
mode = mode:gsub("m(%d+)", function(s) prof_min = tonumber(s); return "" end)
prof_depth = 1
mode = mode:gsub("%-?%d+", function(s) prof_depth = tonumber(s); return "" end)
local flavour = "S[vanilla]"
mode = mode:gsub("S%[.+%]", function(s) flavour = s; return "" end)

local m = {}
for c in mode:gmatch(".") do m[c] = c end
prof_states = m.v or m.z
if m.z == "z" then zone = require("jit.zone") end
prof_states = m.z or m.v
if prof_states == "z" then zone = require("jit.zone") end
local scope = m.l or m.f or m.F or (prof_states and "" or "f")
local flags = (m.p or "")
prof_raw = m.r
Expand Down Expand Up @@ -322,7 +285,7 @@ local function prof_start(mode)
prof_count1 = {}
prof_count2 = {}
prof_samples = 0
profile.start(scope:lower()..interval..flavour, prof_cb)
profile.start(scope:lower()..interval, prof_cb)
prof_ud = newproxy(true)
getmetatable(prof_ud).__gc = prof_finish
end
Expand Down
8 changes: 1 addition & 7 deletions lib/luajit/src/lib_jit.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,6 @@ LJLIB_CF(jit_util_traceinfo)
setintfield(L, t, "nk", REF_BIAS - (int32_t)T->nk);
setintfield(L, t, "link", T->link);
setintfield(L, t, "nexit", T->nsnap);
setintfield(L, t, "szmcode", T->szmcode);
setintfield(L, t, "mcode", (int32_t)(intptr_t)T->mcode);
setintfield(L, t, "mcloop", T->mcloop);
setstrV(L, L->top++, lj_str_newz(L, jit_trlinkname[T->linktype]));
lua_setfield(L, -2, "linktype");
/* There are many more fields. Add them only when needed. */
Expand Down Expand Up @@ -558,10 +555,7 @@ static void jit_profile_callback(lua_State *L2, lua_State *L, int samples,
setfuncV(L2, L2->top++, funcV(tv));
setthreadV(L2, L2->top++, L);
setintV(L2->top++, samples);
if (vmstate >= 256)
setintV(L2->top++, vmstate-256);
else
setstrV(L2, L2->top++, lj_str_new(L2, &vmst, 1));
setstrV(L2, L2->top++, lj_str_new(L2, &vmst, 1));
status = lua_pcall(L2, 3, 0, 0); /* callback(thread, samples, vmstate) */
if (status) {
if (G(L2)->panic) G(L2)->panic(L2);
Expand Down
Loading