On Mon, Oct 18, 2010 at 16:57, <[email protected]> wrote: > > http://codereview.chromium.org/3831002/diff/3001/4004 > File src/log-utils.cc (right): > > http://codereview.chromium.org/3831002/diff/3001/4004#newcode158 > src/log-utils.cc:158: memcpy(code_name, name, name_len); > On 2010/10/18 12:38:09, Michail Naganov wrote: >> >> On 2010/10/18 10:48:54, Vitaly wrote: >> > On 2010/10/17 19:51:12, Michail Naganov wrote: >> > > OS::StrNCpy? >> > >> > I need the length anyway, so memcpy is easier. >> > > >> Well, StrNCpy does require length: >> void StrNCpy(Vector<char> dest, const char* src, size_t n) > >> My point is that using string functions for strings provides better > > clarity, >> >> than using a generic memcpy. > >> You can fix that before committing. > > Technically, the first memcpy is not a string operation, the terminating > NUL byte is not copied. StrNCpy will require calling Vector::SubVector > to append the suffix. Do you still think it'd be nicer?
Ah, right, let's end this discussion ;) > > http://codereview.chromium.org/3831002/diff/10001/11016 > File tools/ll_prof.py (right): > > http://codereview.chromium.org/3831002/diff/10001/11016#newcode206 > tools/ll_prof.py:206: command = "dd if=%s.code of=%s bs=1 count=%d > skip=%d && " \ > On 2010/10/18 12:38:09, Michail Naganov wrote: >> >> Well, I thought you could just pipe them, no? 'dd if=... | objdump > > ...' > > I had tried this. (Initially I was going to pass the bytes to > process.communicate() as stdin.) Won't work, because objdump has to be > able to seek in its input. > > http://codereview.chromium.org/3831002/show > -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
